The Model View Controller (MVC) is possibly the most well-known software design pattern used in web development.
What is it? It is separating the code into these areas of concern:
Model – The data. This can include the SQL commands and also the business logic, i.e. validations.
View – This is what the user sees.
Controller – This is responsible for handling the GET and POST requests and CRUD actions. The Controller is the connection between the Model and the View.
For instance, if a user presses the Show All button in the View, the Controller will send the appropriate request to the Model, the Model will query the database and then send the results to the Controller, then the Controller will send that information to the appropriate View.
For more thorough and detailed explanations check out the following links:
Elementary Model View Controller (MVC) by Example
MVC (model-view-controller) – can it be explained in simple terms? [closed]
Understanding Model-View-Controller
Can someone provide the simplest explanation of MVC pattern, in simple English?
1.3.3 Model-View-Controller (MVC)
Should Controller know about View & Model? or vice versa?
I feel like MVC holds water when you’re talking about a server-side framework like Rails/ASP.net with a dumb (view-only) front end like JQuery or React, or the on the other hand, an Angular app that talks to a simple REST api.
However, I don’t understand how one should structure an MVC backend with an MVC front-end.
To top it off, there’s no clear definition of what Angular is. While it started as MVC, it started looking more like MVVM or MVP, then people started having debates, and I guess most agreed to end the debates and call it MVW (MVWhatever), and so everyone and their dog now has their own design patterns for Angular.
Interesting discussion here: http://stackoverflow.com/questions/20286917/angularjs-understanding-design-pattern
All of this sounds incredibly messy
I think Flux as a design pattern is taking over these days, but its biggest con is that it isn’t as simple as MVC, and requires basic familiarity with pure functional programming.
LikeLiked by 1 person
Thanks for the link! I agree with you on the confusion, plus who knows what Angular 2.0 will be like…
Here’s another link to add even more confusion
https://www.quora.com/What-is-the-difference-between-MVC-and-the-usual-3-tier-architecture-and-why-do-developers-say-the-MVC-architecture-is-better
LikeLike