How does the MVC pattern differ, if at all, from the DAL / BLL design pattern?

Martin Doms picture Martin Doms · Nov 6, 2008 · Viewed 10.8k times · Source

I'm making my way through the early Data Access Tutorials on Microsoft's ASP.NET website and it occurred to me that this all seems awfully similar to what I have read about separating your logic and presentation code using the MVC pattern. As a newbie I have yet to implement the MVC pattern but I'm curious as to how these two design structures differ and if I should be focusing my attention on one or the other, particularly in the context of web design.

Answer

tvanfosson picture tvanfosson · Nov 6, 2008

MVC addresses more than just data access. In MVC, both the DAL and BLL is incorporated into the Model. The view defines how the model data is presented to the user, while the controller is what responds to user inputs (GET/POST on the web).

An alternative to MVC is a classic N-tier architecture where you have a presentation layer, a business layer, and a data access layer. In this architecture, the components of the view and controller are wrapped together in the presentation layer. WebForms/WinForms is an example of the N-tier architecture, while ASP.Net MVC is an example of MVC in the Microsoft space.