The full name of MVC is the model View Controller, which is the abbreviation for the models-view-controller, a software design paradigm that organizes the code with a method of business logic, data, and interface display separation. Aggregating business logic into a single component does not require rewriting business logic while improving and personalizing the interface and user interaction. MVC is uniquely developed to map the traditional input, processing, and output functions in a logical graphical user interface structure.
MVC begins in the desktop program, M refers to the business model, v refers to the user interface, C is the controller, the purpose of using MVC is to separate m and v implementation code, so that the same program can use different representations. For example, a batch of statistical data can be represented by histogram, pie chart. C exists to ensure the synchronization of M and V, and once M is changed, V should be updated synchronously.
MVC is a pattern of creating WEB applications using MVC (Model View Controller-View-controller) Design:
- Model (models) represent the core of the application (such as a list of database records).
- View displays data (database records).
- The controller (Director) processes the input (writes to the database record).
The MVC pattern also provides complete control over HTML, CSS, and JavaScript. Model is the part of your application that handles application data logic.
Typically, model objects are responsible for accessing data in the database. View is the part of the application that handles the display of data.
Typically views are created from model data. A controller is a part of an application that handles user interaction.
Usually the controller is responsible for reading data from the view, controlling user input, and sending data to the model. MVC layering helps you manage complex applications because you can focus on one aspect at a time. For example, you can focus on view design without relying on business logic. It also makes testing of applications easier. The MVC hierarchy also simplifies group development. Different developers can develop views, controller logic, and business logic at the same time.
Introduction to the MVC framework