46
After all, how does this architecture pattern work by following the model, view and controller layers ?
46
After all, how does this architecture pattern work by following the model, view and controller layers ?
65
MVC is nothing more than a standard software architecture, separating your applying in 3 layers. To layer of user interaction(view), the layer of data manipulation (model) and the layer of control().
Whenever you think about data manipulation, think about model. It is responsible for reading and writing data, and also for its validations.
Simple: the user interaction layer. It just makes the data display.
The person responsible for receiving all user requests. Its methods called actions are responsible for a page, controlling which model to use and which view will be shown to the user.
(The image below represents the flow of MVC in an Internet context, with an HTTP request and response in HTML or XML format)
View - Speak Controller ! The user just asked to access Facebook ! Get the login data there.
Controller - Blz. I’ll send you the answer. Ai model, my partner, takes this login data and checks if it logs in.
Model - Data are valid. Sending login reply.
Controller - Blz. View, the user informed the correct data. I will send you his data and you load the profile page.
View - Vlw. Showing the user...
OBS: This text was taken from my article on the Tableless site: MVC, what is it, after all ?
It’s interesting to complement that old answer of mine:
The MVC architectural pattern predates the Internet. Specific technologies (XML, HTML, HTTP) can be included in an example to help understanding the concept but I suggest leaving out the formal definition of the standard.
@Piovezan I made changes. What did you think ?
Well, View means that it is the viewer, the vision, controller is the controller, whereas the model comes from BUSINESS MODEL, which means Business Model. It would be nice to put something of the kind, especially the model part, to increase. Hug.
What an interesting answer. This dialogue between the layers I found genius for the less experienced staff understand. :)
The guy asked a question and answered himself after 3 minutes. I thought that these manipulation practices to earn points were prohibited.
Browser other questions tagged mvc
You are not signed in. Login or sign up in order to post.
possible duplicate of What is MVP and MVVM?
– Otto
@Otto Does it fit as a duplicate, even though they are different architectures ? (as much as MVP is an evolution of MVC)
– Allan Ramos
I think so because it has their explanation @Allan Ramos
– Otto
but let’s see if the rest of the people find heheheh
– Otto