Modular GUI MVC Components

I am trying to find a way to create complex web pages with MVC3 and AJAX.

I would like to use components to achieve this. Each component consists of its own model, view and controller.

Several components are then placed on some complex view and must act together to provide the desired behavior.

In some situations, when the user performs some action (interaction) with one of the components, I have to update other parts of the page via AJAX. The component on which the action (interaction) took place, in its implementation, does not imply anything about the view on which it will be used, and which parts of the pages should be updated and how.

Therefore, when some interaction happens in some component, I need a mechanism (the external component itself) that will handle this situation and update the relevant parts of the page. How would you typically implement such a mechanism?

+1


source to share


1 answer


I would use the Mediator Pattern , also sometimes mistakenly called the Manager Pattern.



This class will inform about the connection of your components.

0


source







All Articles