Thursday, November 19, 2009

RIA Design Patterns: NavigationModelAdapter

In our current application we use a nice design pattern for controlling the views. I call it NavigationModelAdapter.

We have a central NavigationModel, which contains a url property, e.g. /main/sub/subsub. Every part of the url controls a viewstack or a state. The navigatable views have a instance of a NavigationModelAdapter. Whenever the NavigationModel changes, the NavigationModelAdapters synchronize their view with the NavigationModel. Nice and clean.

No comments:

Post a Comment