Using a MVC Framework for Web App
The MVC architecture lends itself very well to web applications.
Model
The page content is stored in the models that underpin the application. The technical details may vary—the text and images may be stored in a database, as server files, or in some other way—but the content, and the rules of how it all fits together, are encoded into the model part of the framework.
View
View—The HTML and CSS add one or more visual display layers to the content —the veneer we apply to give our web application a particular appearance and style. We can change how the content is displayed without altering the original content, as stored in the model(s), at all.
Controller
The controller element consists of program code linked to the interactive elements on the page, such as form fields, buttons, and links. Such code interprets user input and communicates with models and views.