XWork struts2

XWork is a standard Command pattern implementation and is completely separated from the web layer. Xwork provides many core functions: front-end interceptor (interceptor), runtime form property validation, type conversion, powerful expression language (OGNL - the Object Graph Navigation Language), IoC (Inversion of Control) container, etc.


The purpose of XWork is to create a generalized, reusable, and extensible command pattern framework, rather than a framework specific to one domain. [1]
Features
Edit
Its features are:
1. Flexible and customizable configuration based on a simple interface;
2. The core command pattern framework can adapt to any request/response environment by customizing and extending interceptors;
3. The entire framework is constructed through type conversion and validation using OGNL's action attribute;
4. Contains a powerful validation framework based on runtime attributes and validation interceptors.
The relationship between Xwork and WebWork WebWork2
is built on top of XWork, based on XWork. By using the command pattern framework and interceptor framework of XWork, it provides a command pattern framework that supports Web functions and can quickly build Web applications.

--
struts2 is a new MVC framework developed on the basis of webwrok technology, which uses the interceptor mechanism to process user requests. And webwork is a powerful web-based MVC framework built on the command pattern framework called xwork. So all in all, both struts2 and the bottom layer of webwork are xwork.
        From the introduction of its official website, XWork not only provides a series of basic components, including: an IoC container, powerful expression language (OGNL) support, data type conversion, data verification framework, pluggable functions Module (plug-in mode) and its configuration, and on top of this series of basic components, a set of "event request execution framework" based on the Command design pattern is implemented.
        Then, XWork, as the underlying core that Struts2 relies on, makes Struts2 only need to focus on the part that deals with the Web container, and leave the rest of the work to XWork. When Struts2 receives an Http request, Struts2 only needs to receive the request parameters and hand them over to XWork to complete the execution sequence. When XWork finishes executing, return the result to Struts2 to return the corresponding view


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326262872&siteId=291194637