I mostly experience with "server-side" MVC frameworks, such as framework for ASP.NET MVC or Zend PHP Spring for Java, etc.
Some of them are also possible to use for desktop application development, but I have never done that.
I fully understand that the design should not be limited to the patterns of implementation, they should generally provide ideas and general rules that can be implemented differently.
Now I am playing with one of these MVC frameworks (this does not have many tutorials or a good quick startup) for the development of normal desktop applications and I have some questions about the MVC paradigm here One of them is:
What are the common ways to link different views / controllers? If I click on a button, the event that is generated by the special controller of that button is dispatched, does something with the model, the visual scene changes, but what if I need to interact with the other scene Will happen? As such, when I click on a button, it changes a model, but I have to change the model without opening any other window or changing the position of the second window (hiding a button on the second window ...) What are the common ways to deal with this? Will my first controller create an event for another controller (or second view)? Or should the second controller handle events from the first scene?
Some links or examples for any language / frameworks will be really helpful, thanks!
/ blockquote>
It allows communication between objects through an intermediary An object publishes a message for an arbitrator, and zero or more objects subscribe Receive messages \ messages are made through the Pub \ Sub-moderator, not directly, this is No direct coupling.
An example of "Event Aggregator Service" in Cal (aka Prism), an overall application framework, MVVM, MVVM:
H2> Update
In MVVM, the event aggregator service (mediator) is usually used to allow loose coupled communication (some types of controllers such as MVC) between view-model. In this way, view models can publish and subscribe to interesting general messages.
Comments
Post a Comment