Struts1.0 summary, year-end summary

Source: Internet
Author: User

Struts1.0 summary, year-end summary
Overview

Struts1.0 is a framework and a half product that implements the MVC idea.

MVC ideas

The core of MVC is to remove the coupling between page content display and request processing.

In the initial development mode of dynamic pages, both content display and request processing are on the same page. The advantage of this mode is that development is relatively simple, because there are few classes involved in the involved files, therefore, development is relatively simple. The disadvantage is that modification is troublesome. because fewer classes lead to more responsibilities, especially when the page logic is complex, the modification is very troublesome.

The initial development mode of dynamic pages can adapt to the current era, but it is no longer suitable for the current era, because people now have a very large demand for page functions, if we still use the previous development model, the consequences of its shortcomings will be unbearable for the enterprise.

In order to effectively solve the problem of huge page function requirements, we have produced MVC. MVC is an idea. Its central purpose is to separate page display and request processing.

Struts1.0

Learn before. net. net MVC Framework, which was learned at that time. MVC3.0 provided by net. When learning java, I once again came into contact with MVC. At this time, I felt that it was not a stranger. After learning, I felt that, the idea is the same. The only difference is the specific implementation method. Let's introduce the functions provided by struts1.0.

If you want to know what functions struts1.0 provides to me, you need to know which classes it provides to us. What classes does struts1.0 provide to me?

ActionServlet: a central controller that sends requests to the specified Action class.

Action: The specific class that responds to the request. The class name of this class is not true. This class is defined by ourselves.

DispathAction: a method that converts an Action class to a DispathAction class. Multiple methods in an Action class can process requests.

ActionForm: Collects form data, data objects transmitted between set V and set C

ActionForward: Information Required for packaging and forwarding
ActionMapping: Describes the request and the entire process.

ActionMessage: an object corresponds to an international message text.

ActionMessage: a collection of actionmessages

Summary

There are two types of MVC Architecture: one is the U-layer MVC Architecture and the other is for the entire project architecture. The above description is for the first.

Learn before. net, I had access to MVC. What I learned at that time was. MVC3.0 provided by net. At this time, when I learned java, I once again came into contact with MVC. At this time, I felt that I was not very familiar with it. When I learned it, I felt that I was still very familiar with it, I made a summary of MVC. At that time, I still thought that this may be different from that of java. At that time, I thought about MVC.

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.