MVC architecture in Java

Friday, February 19, 2010 Posted by Unknown

What is MVC architecture?

MVC is a Design pattern. MVC stands for Model View Controller.It contains two models.

1. MVC model 1 Architecture:
A request is made to a JSP and then that JSP handles all responsibilities for the request, including processing the request, validating data, handling the business logic, and generating a response.





2. MVC model 2 Architecture:
In this architecture a central servlet, known as the Controller, receive all requests for the application. The Controller then process the request and works with the Model to prepare any data needed by the View(JSP) and forwards the data to a JSP. The JSP then uses the data prepared by the Controller to generate a response to the browser.





Model - View - Controller:
In the MVC architecture, model components provide an interface to the data and/or services used by an application. This way, controller components don't unnecessarily embed code for manipulating an application's data. Instead, they communicate with the model components that perform the data access and manipulation. Thus, the model component provides the business logic. Model components come in many different forms and can be as simple as a basic Java bean or as intricate as Enterprise JavaBeans (EJBs) or Web services.

This information gathered from Complete Reference
Labels:

Post a Comment