Thanks for your reply.
I will try to explain what I'm doing in order to receive criticism again or to favor this pattern or whatever thing it is. May be this pattern isn't new and I'm reinventing the wheel, but I want share it with the community to contribute with something useful
or realize how crazy I'm. I don't have time to research more right now cos I already consume all the time I can spent learning without get in troubles in my current project ;) so here we go:
What I'm proposing is a way to organize the Views of an application in the composite world. I'm thinking that may be in some scenarios is good exposes a set of properties to the Shell through its ViewModel and consider such properties as the semantic definition
of the UI. For example, in the following Shell:
are referenced two views statically (the MainMenuView and the FooterView) and one other view dynamically (the view that is assigned to the CenterPlaceholder ShellViewModel’s property), so what is showed at a given time in the row 1 depend of the implementation
of the CenterPlaceholder property. If then we add a set of ICommands to the ShellViewModel and said that those ICommands are the way to change the semantic status of the UI (the navigation system), we got a system with some advantages. To clarify let’s
suppose that exist another two views, ProductListView and CustomerListView, and due to, two ShellViewModel ICommands named ShowProductListViewAtCenter and ShowCustomerListViewAtCenter that basically switch the CenterPlaceholder ShellViewModel’s
property to one view and to the other.
Expect you get the point, pls, don’t look the logic of the example or how tuned is the code, etc. get the idea and talk about it, again or to favor.
Using the above approach we can get the following advantages in some scenarios:
Very clear division between the navigations views (MainMenuView in the above example) and the navigation semantic (what each navigation action imply in term of UI semantic changes).
Very clear division between navigation semantic and the navigation-system-layout UI.
Possibility of easily implement view caching when desired, think that a given view can be stored as a ShellViewModel field and just created the first time its corresponded property is acceded, saving processing when user request show other view and the it again
through the navigation system.
Exist others pro, but let’s first gurus tell me how wrong I’m ;)
Miguel, if we store the dynamic views in a Children collection we lost ones of the points of this pattern, cos then designers can’t arrange the placeholders/dynamic-views (the semantic of the UI) to define the UI as they want.