Traditional Culture Encyclopedia - Traditional festivals - What is MVC development mode? What's the difference between it and the traditional development model?
What is MVC development mode? What's the difference between it and the traditional development model?
They each deal with their own tasks:
(1) model: the model saves all data, states and program logic. This model is independent of view and controller.
(2) View: used to present the model. A view usually obtains the state and data it needs to display directly from the model. The same information can have many different display forms or views.
(3) Controller: located between the view and the model, responsible for accepting the user's input, parsing the input and feeding it back to the model. Usually, a view has a controller.
MVC pattern separates them to improve the flexibility and reusability of the system. Without MVC pattern, user interface design often mixes these objects together. MVC pattern realizes the separation of model and view, which brings several benefits.
(1) A model provides different representations of multiple views, and you can also create new views for the model without rewriting the model. Once the data of the model changes, the model will inform the relevant views, and each view will refresh itself accordingly.
(2) The model can be reused. Because the model is independent of the view, it can be transplanted to the new platform independently.
(3) Improve the development efficiency. When developing the display part of the interface, you only need to consider how to lay out the user interface; When developing a model, only business logic and data maintenance need to be considered, so that developers can focus on one aspect of development and improve development efficiency.
It is not accurate to say that MVC is suitable for a project directly, so we should give full play to its advantages and advantages when using MVC mode!
- Related articles
- What is the development trend and future development direction of modern agriculture?
- I am 55 years old. What medicine should I take if my hands and feet are numb?
- What are the origins and legends of Tomb-Sweeping Day?
- The Dragon Boat Festival elementary school students 400 words
- A Brief Comment on Star Train and White Travel: A Beautiful Travel on Star Train
- Why don't blind people talk about the tradition of opening a library?
- What if there are no customers in the physical store? How to drain the physical store?
- What enlightenment does Confucianism, Legalism and Mohism have for us to build a harmonious socialist society today?
- What are the taboos of Tibetan customs?
- A prostitute was born and hijacked by pirates. What is the legendary story of this female pirate?