2019-05-12
Model, View, Controller. MVC is a great way to structure web applications, it is widely used throughout many frameworks and languages.
Written by: Joseph Reilly
While pondering my approach to the next three weeks of coding bootcamp, I decided to do some research on MVC and try to understand why it is such a powerful design pattern in programming.

MVC is an application design model comprised of three interconnected parts. Model talks to the database and the controller. View is what the user sees and interacts with, it is mostly comprised of HTML, CSS, and Javascript.
Controller is the glue. It takes in a user request then interacts with both the views and the model. Here is where everything is organized and updated. The controller tells views what to display to a user, and gets the data needed from the model to make that happen.

Let’s say you walk into an ice cream shop and order a vanilla milkshake. You are the User, the guy behind the counter (we are going to call him Phil) is the Controller, the recipe and instructions to make a milkshake is data, obtained from the model. The model also holds all the tools to make a milkshake, (Phil couldn’t make a milkshake if he didn’t have milk! It would also be a lot harder without a mixer as well.) Thankfully Phil had the tools and made the tastiest vanilla milkshake ever!! The finished product is the view, its what you see and taste.

You just remembered you need an oil change, Phil has been so helpful so you ask him if he could do it. He cannot help you with that Phil only has a unique set of skills that pertain to ice cream.