Design Pattern - MVC

In MVC are two types model (design Model)
1.MVC  1 Architecture
2.MCV  2 Architecture

MVC 1 Architectre:
Model 1 MVC architecture is easiest way of developing JSP based web application, It cannot get any easier. In model 1,the browser directly access JSP pages, in other words ,user requests are handled directly y the JSP .
Servlet and JSP are the main technologies to develop the web application. Servlet technology doesn’t create process, rather it create thread to handle request. The advantage of the creating thread over process is that it doesn’t allocate separate memory area and multiple subsequent request can be easily handled by the servlet.

Problem in this MVC-1 architecture presentation and business logic are mixed up,see in below flow of the model 1 Architecture.
Step 1: Browser send request for the JSP page.
Step 2: JSP accesses Java Bean and invokes business logic.
Step 3: Java Bean connect to database and make CURD operation.
Step 4: Response is send to browse which is generated by JSP 

MVC 2 Architecture:
In this short section I would try to provide a basic overview of the MVC framework.The MVC framework,is generally a term for a software architecture for implementing the user interface.You can separate the software's source code code onto different layers.
Model:This part of the framework is to store the data of the application,Such as database,text data,files and /or other web resource.
View: This is the graphical user interface of the application.That would could contain different button,text boxes and other controls to let the user interact with the application to complete his projects depending on sort of the software he is using
Controller: The actual back-end code constitutes the controller of the framework.A controller controls the data coming from the users or going to the user from a model,
In MVC-2 Architecture one very good feature framework is that is hides the data access layer from the users.That is,the data access layer or the data is never actually called directly by user;from the interface.



No comments: