MVC for a desktop application, connection a view/controller pair with another one
Posted
by lcf
on Stack Overflow
See other posts from Stack Overflow
or by lcf
Published on 2010-05-16T01:24:01Z
Indexed on
2010/05/16
1:30 UTC
Read the original article
Hit count: 215
mvc
Hello. I've had mostly experience with "server-side" mvc frameworks very popular in different languages like ASP.NET MVC or Zend Framework for php, Spring for Java etc.
Some of them are also possible to use for desktop applications development but I never tried that.
I fully understand that design patterns should not limit implementation, they should generally provide ideas and common rules that can be differently implemented.
Now I'm playing with one of those mvc frameworks for usual Desktop Applications development (it does not have many tutorials or a decent quickstart) and I have some questions regarding to the mvc paradigm. Here is one of them:
What are common ways to link different views / controllers? If I click a button, special controller for that button dispatches the event that is generated, does something with the model, changes view state. But what if I need to interact with another view? Like, when I click on a button, it changes a model, but also I need to open another window or change state of another window (hiding a button on another window let's say...), without changing actually the model. What are common ways here to address this? Should my first controller generate an event for the second controller (or second view)? Or should the second controller be handling events from first view?
Some links or examples for any languages/frameworks would be really helpful, thanks!
© Stack Overflow or respective owner