Two STRUTS2 MVC Architecture

Source: Internet
Author: User

Model-View-controller, often referred to as MVC, is a software design pattern for developing Web applications. The software design pattern consists of the following three parts:

  • Model -The underlying foundation of software design patterns, primarily responsible for data maintenance.
  • View -This section is responsible for rendering all or part of the data to the user.
  • controller --control the interaction between the model and the view through software code.
The reason for the popularity of MVC is that it distinguishes between the logical and user interface layers of an application and supports the separation of focus points for development. In MVC mode, the controller receives all requests from the application, invokes the model to prepare the data needed for the view, and then the view uses the data provided by the controller to eventually generate a visual response. The abstract concept of MVC can be expressed by means of a form:

The model model is primarily responsible for managing the data of the application, which updates its own data by responding to the request of the view and the instructions of the Controller. The view is triggered by the instructions of the Controller to show a special data format. They are based on a template system such as JSP, ASP, PHP script, easier to integrate with Ajax technology. The controller controller is responsible for responding to user input and performing interactions with data model objects. The controller performs a business operation that modifies the state of the data model after receiving and confirming the input.
Struts2 is an MVC-based framework. In the next section, let's look at how to use MVC in Struts2.

Two STRUTS2 MVC Architecture

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.