Model View Controller (MVC) Summary

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 for Noobs

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)

2.2.2 MVC in action

AngularJS – MVC Architecture

Should Controller know about View & Model? or vice versa?

Business logic in MVC

 

3 thoughts on “Model View Controller (MVC) Summary

  1. 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.

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s