Home >Java >javaTutorial >The road to learning Webwork (1) The past and present life of Webwork and Struct

The road to learning Webwork (1) The past and present life of Webwork and Struct

黄舟
黄舟Original
2016-12-23 16:27:551473browse

Struts 1 is the world's first released MVC framework. It was released by Craig McClanahan in 2001. Once the framework was launched, it was supported by Java Web developers around the world. After 6 years of hard work, Struts 1 The framework is more mature and stable, and its performance is also well guaranteed.

So far, Struts 1 is still the most widely used MVC framework in the world. Currently, there are many web-based MVC frameworks and they are developing rapidly. A new MVC framework is released every once in a while.

Although Struts 2 is known as a brand new framework, this is only relative to Struts 1. Compared with Struts 1, Struts 2 does have many revolutionary improvements, but it is not a newly released new framework, but developed on the basis of another well-known framework: WebWork. To some extent, Strut2 does not inherit the lineage of Struts 1, but inherits the lineage of WebWork. In other words, WebWork derived Struts 2, rather than Struts 1 derived Struts 2. Because Struts 2 is an upgrade of WebWork, rather than a brand new framework, stability, performance and other aspects are well guaranteed; it also absorbs the advantages of both Struts 1 and WebWork.

Struts 2 takes WebWork as the core and uses an interceptor mechanism to handle user requests. This design also enables the business logic controller to be completely separated from the Servlet API. In many ways Struts just changed the name under WebWork. Struts2 corresponds to its own tags and is powerful. Webwork also has its own tags. Correspondence table between Struts 2 and WebWork member names (changes in naming):

The road to learning Webwork (1) The past and present life of Webwork and Struct

In addition, Struts 2 also deleted a few features in WebWork:

AroundInterceptor: Struts 2 no longer supports AroundInterceptor in WebWork . If you need to use AroundInterceptor in your application, you should manually import the AroundInterceptor class in WebWork yourself.

Rich text editor tag: Struts 2 no longer supports WebWork's rich text editor. If you need to use a rich text editor in your application, you should use Dojo's rich text editor.

IoC container support: Struts 2 no longer supports the built-in IoC container, but instead fully supports SPRing's IoC container, using Spring's IoC container as the default Object factory.

WebWork framework flow diagram:

The road to learning Webwork (1) The past and present life of Webwork and Struct

The above is the content of the Webwork learning path (1) The past and present of Webwork and Struct. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn