Traditional Culture Encyclopedia - Traditional festivals - What is the MVC development model and the difference between it and the traditional development model

What is the MVC development model and the difference between it and the traditional development model

This model is suitable for small-scale WEB application development.JSP+JavaBean development, although the separation of logical functions and display functions, but due to the view layer and the control layer are realized by the JSP page, that is, the view layer and the control layer did not realize the separation, so it still belongs to the Model1 model.Model2 model MVC development model it is to overcome the shortcomings of the Model1 design, MVC specific meaning: model + view + control, that is, model + view + control, such a model integrated JSP, Serclet, JavaBean, very suitable for large-scale project development. view view layer: On behalf of the interface and user interaction can be achieved through html, xml, applet small java program , it is only responsible for data collection and processing (display). In the JSP it is realized by the JSP page alone.Model model layer: it is often written using JavaBean, which accepts the data requested by the view layer, and then carry out the corresponding business processing and return the final results, it is the responsibility of the most core, and the use of JavaBean has the characteristics of the code to achieve the reuse and expansion, as well as to the maintenance of the convenience brought about by the. Control control layer: (1) each layer has its own responsibility and does not interfere with each other. After their respective updates on other layers without any interference; (2) MVC development model is conducive to the division of responsibilities, so that specialists are engaged in specialized layers of the design, improve efficiency and quality; (3) components can be very good reuse, due to a clear division of labor, each layer of the components can be independent of a reusable component.