Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 681
Martin Doms Avatar asked Nov 06 '08 08:11

Martin Doms


2 Answers

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.

like image 152
tvanfosson Avatar answered Oct 12 '22 04:10

tvanfosson


The link you've posted for the Data Access Tutorial is implementation of MVC pattern. MVC pattern is a concept, implementation can differ; you have this in ASP.NET whereas in Java there's one framework called Struts, which is an implementation MVC.

DAL & BLL patterns differ from the MVC pattern in terms of concepts; but NOT this specific implementation. MVC is actually achieved through usage of DAL, BLL & View Patterns.

like image 32
Salman Kasbati Avatar answered Oct 12 '22 04:10

Salman Kasbati