Sorry if my question is a silly one but I am new in MVC and I am confused what is the actual difference between MVC and the 3-tier architecture (Data Access Layer, Business Layer and Presentation Layer)? both are seperating the logic from the UI and there
is a layer to control them?!
Thanks for the reply but I am still confused because during my working experience, The web applications I have created where using N-Tier architecture and all were on same web server only different classes and folders like MVC.... in other words, buisniss
layer, data layer and presentation, they were all in the same physical location, just different classes and folders (Logical seperation not physical)
A fundamental rule in three-tier architecture is the client tier never communicates directly with the data tier; in a three-tier model all
communication must pass through the middleware tier.
It’s liner architecture. This addresses the question of how to pass information between a user and a database. Where as MVC is a triangular architecture: the View sends updates to the Controller, the Controller updates the Model, and the View gets updated directly
from the Model. This addresses questions of how a user interface manages the components on the screen.
A 3 tier business project is composed of presentation, business and data access layers; one or more of these can be, but are not always, placed in separate code projects.
An MVC project is composed of Models, Views and Controllers. You will often, but not always, find that the Models are contained in a separate project to the Views and Controllers.
The Model part of MVC is equivalent to the business and data access layers you find in 3 tier applications, and indeed the Model maybe split along those lines. However, the View and Controller parts are all about user interaction and are the equivalent of
the presentation tier in a 3 tier project and are usually kept in the same project.
as stated above MVC can be a used in 2 or 3 tier architectures depending on the model. MVC is an old pattern used for the presentation. The mac api has used it for years, java has had swing for web apps, and is common in multi-threaded applications.
the main tenant of MVC is the view sends commands (messages) to the controller, the controller updates the model, the model sends update messages to the view. Because web apps are client request/server response, the view send to the controller, and the model
update of the view are combined into one request, as the model can not send update messages to the view. in the web world, a new view is produced.
if you do a 3 tier mvc app now days, there are a lot more layers. you may business layer and data access in the business model, and you may have view models that talk to the business models. the view models have view and navigation rules rather than business
rules.
elghoul_girl
Member
2 Points
2 Posts
MVC V.S N-Tier Architecture
Mar 23, 2011 01:54 PM|LINK
Hello Everybody,
Sorry if my question is a silly one but I am new in MVC and I am confused what is the actual difference between MVC and the 3-tier architecture (Data Access Layer, Business Layer and Presentation Layer)? both are seperating the logic from the UI and there is a layer to control them?!
Thanks,
Sally
raduenuca
All-Star
24675 Points
4250 Posts
Re: MVC V.S N-Tier Architecture
Mar 23, 2011 02:01 PM|LINK
http://stackoverflow.com/questions/698220/mvc-vs-n-tier-architecture
Radu Enuca | Blog
elghoul_girl
Member
2 Points
2 Posts
Re: MVC V.S N-Tier Architecture
Mar 23, 2011 02:10 PM|LINK
Hello,
Thanks for the reply but I am still confused because during my working experience, The web applications I have created where using N-Tier architecture and all were on same web server only different classes and folders like MVC.... in other words, buisniss layer, data layer and presentation, they were all in the same physical location, just different classes and folders (Logical seperation not physical)
Thanks,
Sally
bhavik.y.sha...
Participant
1610 Points
449 Posts
Re: MVC V.S N-Tier Architecture
Mar 23, 2011 02:10 PM|LINK
Hello,
A fundamental rule in three-tier architecture is the client tier never communicates directly with the data tier; in a three-tier model all communication must pass through the middleware tier.
It’s liner architecture. This addresses the question of how to pass information between a user and a database. Where as MVC is a triangular architecture: the View sends updates to the Controller, the Controller updates the Model, and the View gets updated directly from the Model. This addresses questions of how a user interface manages the components on the screen.
Please visit below link for detail understanding.
http://forums.asp.net/p/1020216/1379168.aspx
Thanks & Regards.
Skype ID : bhavik.shah2004
ignatandrei
All-Star
137690 Points
22151 Posts
Moderator
MVP
Re: MVC V.S N-Tier Architecture
Mar 23, 2011 02:41 PM|LINK
please see
http://msprogrammer.serviciipeweb.ro/2010/03/29/asp-net-mvc-orm-and-viewmodels/
and using from DOS
http://msprogrammer.serviciipeweb.ro/2010/07/05/asp-net-mvc-and-dos-re-using-the-viewmodels/
frez
Contributor
5418 Points
913 Posts
Re: MVC V.S N-Tier Architecture
Mar 23, 2011 02:51 PM|LINK
A 3 tier business project is composed of presentation, business and data access layers; one or more of these can be, but are not always, placed in separate code projects.
An MVC project is composed of Models, Views and Controllers. You will often, but not always, find that the Models are contained in a separate project to the Views and Controllers.
The Model part of MVC is equivalent to the business and data access layers you find in 3 tier applications, and indeed the Model maybe split along those lines. However, the View and Controller parts are all about user interaction and are the equivalent of the presentation tier in a 3 tier project and are usually kept in the same project.
bruce (sqlwo...
All-Star
37616 Points
5574 Posts
Re: MVC V.S N-Tier Architecture
Mar 23, 2011 03:36 PM|LINK
as stated above MVC can be a used in 2 or 3 tier architectures depending on the model. MVC is an old pattern used for the presentation. The mac api has used it for years, java has had swing for web apps, and is common in multi-threaded applications.
the main tenant of MVC is the view sends commands (messages) to the controller, the controller updates the model, the model sends update messages to the view. Because web apps are client request/server response, the view send to the controller, and the model update of the view are combined into one request, as the model can not send update messages to the view. in the web world, a new view is produced.
if you do a 3 tier mvc app now days, there are a lot more layers. you may business layer and data access in the business model, and you may have view models that talk to the business models. the view models have view and navigation rules rather than business rules.
Jonathan Che...
Member
525 Points
97 Posts
Re: MVC V.S N-Tier Architecture
Mar 28, 2011 08:17 AM|LINK
Hi,
Look at this thread: http://forums.asp.net/t/1658411.aspx/1?Difference+between+MVC+and+N+tier+Architectures
OR: http://forums.asp.net/search?q=title%3A%28Tier%29+OR+body%3A%28Tier%29+AND+forumid%3A%281146%29
Regards,
--Jonathan