0% found this document useful (0 votes)
99 views1 page

Basic MVC Architecture

The document discusses the basic architecture of the MVC pattern, which separates an application into three main components: the model, the view, and the controller. The model manages the application's data, the view displays data to the user, and the controller handles interactions between the model and view.

Uploaded by

prashant078
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
99 views1 page

Basic MVC Architecture

The document discusses the basic architecture of the MVC pattern, which separates an application into three main components: the model, the view, and the controller. The model manages the application's data, the view displays data to the user, and the controller handles interactions between the model and view.

Uploaded by

prashant078
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

BASIC MVC ARCHITECTURE

http://www.tuto rialspo int.co m/struts_2/basic_mvc_archite cture .htm


Co pyrig ht tuto rials po int.co m

M odel View C ontroller or MVC as it is popularly called, is a software desig n pattern for developing web applications. A Model View Controller pattern is made up of the following three parts: Model - T he lowest level of the pattern which is responsible for maintaining data. View - T his is responsible for displaying all or a portion of the data to the user. Controller - Software Code that controls the interactions between the Model and View. MVC is popular as it isolates the application log ic from the user interface layer and supports separation of concerns. Here the Controller receives all requests for the application and then works with the Model to prepare any data needed by the View. T he View then uses the data prepared by the Controller to g enerate a final presentable response. T he MVC abstraction can be g raphically represented as follows.

The model
T he model is responsible for manag ing the data of the application. It responds to the request from the view and it also responds to instructions from the controller to update itself.

The view
A presentation of data in a particular format, trig g ered by a controller's decision to present the data. T hey are script based templating systems like JSP, ASP, PHP and very easy to integ rate with AJAX technolog y.

The controller
T he controller is responsible for responding to user input and perform interactions on the data model objects. T he controller receives the input, it validates the input and then performs the business operation that modifies the state of the data model. Struts2 is a MVC based framework. In the coming chapters, let us see how we can use the MVC methodolog y within Struts2.

You might also like