14.11.08

ASP.NET MVC. I love dumb models

I have seen and worked with various implementations of the MVC pattern. These range from the classic observer pattern implementation where the model has a reference to views/controllers that are interested in its state changes to independent standalone models that are view and controller agnostic. The ASP.NET MVC framework follows the latter approach.

This makes solutions implemented using this approach ammenable to the repository pattern(DomainDrivenDesign). The model is pure in intent and does not care about non-model related concepts. The attendant benefit of such an approach is that models can be injected into the controller via IoC techniques.

No comments: