What metaphor is good for understanding the Model-View-Controller pattern?
-
I'm trying to understand the MVC pattern and I'd love an intuitive way to understand it.
-
Answer:
A painting Paints are the model. They have unique and similar properties to other paints. You can mix them or use them as pure as possible. The painter is the controller. The painter performs the task using the paint and easel. The painter takes the paint from the palette and decides how to apply it to the easel. The easel is the view. It is agnostic of the painter and paint and doesn't care how it will be used. It does, however, have qualities like size and texture that effect the outcome of the painting. Notice here that the paint and easel have nothing to do with each other, as should your models and views. Only the painter, or controller, merges the two mediums.
Ryan Nystrom at Quora Visit the source
Other answers
A good metaphor would be TV : The model are TV channels The view would be the TV screen The controller would be the end user, using his remote control to change the view by switching channels. But even in technical terms, it's pretty simple : The model is the data storage (your database). The view is what the user interacts with (html page, app view...). The controller is sitting in the middle, interpreting what the user want in the view and applying it to the model.
Alain Mevellec
This one is the best IĆ¢ve come accross so far, and my job is to explain MVC pattern to coding complete beginners. https://medium.freecodecamp.com/model-view-controller-mvc-explained-through-ordering-drinks-at-the-bar-efcba6255053#.vcygtwprjEnjoy the reading!
Nicolas Flz
Related Q & A:
- What's a good design pattern for bidirectional signals/events?Best solution by Programmers
- how to pass data from table view to second view controller?Best solution by Stack Overflow
- What is the secret to understanding women?Best solution by Quora
- What was a flaw in the Copernican model?Best solution by Yahoo! Answers
- What is a business, revenue, and advertising model?Best solution by Quora
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.