MVC1 and MVC2 are models that are a further categorisation of MVC (Model Controller View). They are two distinct types of programming or design models that are used to create web applications.
MVC1 vs MVC2
The difference between MVC1 and MVC2 is that MVC1 has only one component responsible for collecting and receiving information. On the other hand, MVC2 has two distinct components to receive and collect information. Moreover, in the MVC1 model, there is an association between presentation and business logic. In contrast, the MVC2 isolates presentation from business logic.
In this model, both the controller and model are JSP. In addition, there is a single component for receiving and collecting information.
MVC2 is a complex version of the Model Controller View which is used to design web applications. MVC2 model consists of three components: model, view, and controller.
Comparison Table
Parameters of Comparison | MVC1 | MVC2 |
---|---|---|
Definition | MVC1 is a programming model which has a use in designing web applications for simple stand alone programs. | MVC2 is a design model which has a use in designing relatively larger web applications. |
Technology | MVC1 uses only JSP technology. | MVC2 uses both JSP and Servlet technology. |
Relation of presentation logic and business logic | MVC1 model associates the presentation logic with business logic. | MVC2 model isolates presentation logic from business logic. |
Practical Use | MVC1 model is widely used for study purposes. | MVC2 model is popularly used to create web applications today. |
Reusability of components | MVC1 model doesn’t allow for reusability of components. | MVC2 model allows for reusability of components. |
What is MVC1?
Model 1 is an easy and quick design model to develop web applications. It has a simple architectural structure which makes it easily understandable.
In the MVC1 model, the browser sends a request for the JSP page, which accesses Java Bean. The Java Bean then invokes business logic, and connects to the database, thereafter saving information.
In the MVC1 model, both the controller and model are JSP. In addition, only one component is responsible for receiving and sending responses in the MVC1 model.
The MVC1 model is time-consuming because an individual has to develop custom tags in JSP to avoid using a scriptlet tag. Another drawback of this model is that it is difficult to extend.
What is MVC2?
MVC2 is a subcategory of MVC that has a relatively complex design model. The model consists of two components for receiving and sending responses.
Based on the Model View Controller, the MVC2 model consists of three components that are model, view, and controller. The model serves the purpose of representing the business logic and stage data of the application.
The MVC2 model offers several advantages. It is easy to test, maintain, and extend. In addition, it allows for a separation of concerns in an effective manner.
In the MCV1 model, the controller uses servlet technology, and the model is a java class. The MVC1 model allows for the reusability of components.
Main Differences Between MVC1 and MVC2
- MVC1 model associates the presentation logic with business logic. In contrast, the MVC2 model isolates presentation logic from business logic.
- MVC1 model doesn’t allow for the reusability of components. On the other hand, the MVC2 model allows for the reusability of components.
References
- https://www.researchgate.net/profile/Praveen-Gupta-12/publication/49619227_MVC_Design_Pattern_for_the_multi_framework_distributed_applications_using_XML_spring_and_struts_framework/links/5672564e08ae54b5e462aac5/MVC-Design-Pattern-for-the-multi-framework-distributed-applications-using-XML-spring-and-struts-framework.pdf
- http://infocomp.dcc.ufla.br/index.php/INFOCOMP/article/view/242
I am Sandeep Bhandari; I have 20 years of experience in the technology field. I have various technical skills and knowledge in database systems, computer networks, and programming. You can read more about me on my bio page.