MVC vs 3-Tier Pattern
I have had several people ask me what the difference is betweenMVC (Model View Controller) and Three-Tier architectural patterns. It is my intent to clarify the confusion by comparing the two patterns side-by-side.
At least in part, I believe the source of some of the confusion is that they both have three distinct layers or nodes in their respective diagrams.
![]() | ![]() |
Three-Tier | MVC |
Three-Tier
A 3-tiered system really is made up of layers (think of cake layers). The UI Layer has access to the Business Logic Layer, and the Business Layer has access to the Data Layer. But the UI Layer cannot directly access the Data Layer. In order for the UI Layer to access data, it must go through the Business Logic Layer via some kind of interface. If it helps, you could think of each layer as one big loosely coupled component with strict design rules of access between layers.MVC (Model View Controller)
In contrast, the MVC pattern obviously does not keep a layered system. The Contoller accesses the Model (a runtime data repository) and the View. The View then accesses the Model. Exactly how does that work? The Controller ultimately is the logical decision point. What sort of logic? Typically, the Controller will retrieve, build, or modify a Model base on some triggered action. The Controller then decides which View is appropriate via some internal logic. At that point the Controller will push the Model to View.Note: Because I mostly develop with .NET, Microsoft has adopted the MVC pattern for ASP.NET with their own platform (seehttp://www.asp.net/mvc). You can certainly use the MVC pattern without Microsoft's platform, but why reinvent the wheel? I have been very happy using it so far.
rotau0glut_ru_Yonkers Kevin Gatling Here
Trả lờiXóarutgoternusc
OdiucaXando David Townes R-Studio
Trả lờiXóaAlcohol 120%
Check it
Vivaldi Browser 5.4.2753.40
fitugwardvirb