MVC and Mediation Pattern

I am trying to create a set of reusable components for an ASP.Net MVC3 application. Each component consists of its own model, view and controller.

Interaction between components should be handled using the "as" mediator pattern.

Since components are a higher level concept (abstraction) and not "real" (technically a component is a short-lived group of model, view and controller functions), it is probably difficult to implement a mediator.

I need some good ideas how to technically implement mediator communication between components using ASP.Net MVC3 and AJAX?

My initial question with an initial problem: Modular GUI MVC Components

+3


source to share


1 answer


I would keep the controllers and views as simple and possible as possible and create a service layer where all interactions with other components and logic sit. Also I would create a separate project for the service layer, so if you want to create different types of interfaces (phone applications, etc.), you can still use the same service layer. It would also allow automated testing to validate the logic and interactions between your components. Hope this helps.



+1


source







All Articles