Is MVC a Three-Tiered Architecture?


Architecture, Software / Saturday, May 25th, 2019

No.

Many (senior) MVC developers think that because they have “M”, “V” and “C” (three things), they have a three-tiered architecture.

That is a very misguided opinion.

Here’s what the actual difference is (though it’s an apples-to-oranges comparison) that I came across on a StackOverflow discussion (as usual, the accepted answer is not the best answer 😛 ):

3-tier architecture usually has each layer separated by the network. I.E. the presentation layer is on some web servers, then that talks to back-end app servers over the network for business logic, then that talks to a database server, again over the network, and maybe the app server also calls out to some remote services (say Authorize.net for payment processing).

[. . .]

MVC is a programming design pattern where different portions of code are responsible for representing the Model, View, and controller in some application.

So, to conclude: a tier represent actual, physical separation (caused by the network separation) while the MVC is a software design pattern, i.e., it concerns itself with how to arrange code in an application.

So, it’s now easy to see how the MVVM is not a 4-tiered architecture. 😉

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.