1, the benefits of MVC
(1) can create and use multiple views at run time for a model. The change-propagation mechanism ensures that all related views are in time to get model data changes, so that all associated views and controllers behave in a synchronous manner. The
(2) view is pluggable with the controller, allowing the view and controller objects to be replaced, and the object can be switched on or off dynamically, even during run time, depending on the requirements. The portability of the
(3) model. Because the model is independent of the view, it is possible to migrate a model independently to the new platform work. All you need to do is make new changes to the view and controller on the new platform.
(4) A potential framework structure. The application framework can be built on this model, not just in the design of the interface.
2, the disadvantage of MVC
(1) increases the complexity of the system structure and implementation. For a simple interface, strict adherence to MVC, which separates the model, view, and controller, increases the complexity of the structure and may result in excessive update operations and reduced operational efficiency. An overly tight connection between the
(2) View and the controller. Views and controllers are separated from each other, but they do have a tight connection, the view has no controller, its application is very limited, and vice versa, which prevents them from being reused independently.
(3) View inefficient access to model data. Depending on the model operator interface, the view may need to be called multiple times to obtain sufficient display data. Unnecessary frequent access to unchanged data will also compromise operational performance.
(4) Currently, the MVC pattern is not supported for general advanced interface tools or constructors. The cost of transforming these tools to accommodate MVC needs and to build separate parts is high, resulting in the difficulty of using MVC.
Advantages:
1) View control model separation for improved code reuse.
2) Improve development efficiency.
3) Facilitates later maintenance and reduces maintenance costs.
4) facilitates the division of labor between multiple developers.
Cons:
1) A clear architecture at the expense of the complexity of the code may reduce development efficiency for small projects.
2) less efficient
3) There is no better solution for rich clients
4) The control layer and the presentation layer are sometimes too tight, resulting in no real separation and reuse of