STRUTS/TAPESTRY/JSF Comparison of performance layer frames

Source: Internet
Author: User
Tags comparison requires

STRUTS/TAPESTRY/JSF is a framework technique for the new and old combination of the current Java EE performance layer. From the time of birth, struts should be relatively early, use very widely, Tapestry 3.0 gradually aroused widespread attention, just as Tapestry is about to show off, Sun introduced JSF standard technology, although the JSF first launched is not mature, set aside a period of gap, But with the introduction of the JSF1.1 Standard, JSF began to hit the front, and the powder noodles came into a grand debut.

In fact, JSF and tapestry are not the same competing technologies for head-meeting, both of which are focused, but subtle, but the nuances may bring different feelings and changes in achieving a large project.

First, we abstract from a height the technical framework that the presentation layer framework should have, and the following diagram shows the functional architecture diagrams that all presentation layer framework technologies must implement:

Of course, we don't have to talk about the MVC pattern, the MVC pattern is the benchmark, and now the framework technology doesn't have to spell the MVC pattern anymore. On the basis of the MVC pattern above, a presentation layer framework does not need to implement three functions in the diagram:

1. It is possible to display the contents of a Component object on the current page, instead of writing the Java Code "invoke object Method" in the JSP page like a pure JSP.

2. When the user presses the page submission button or link, the event occurs, the server side should be triggered and the current page parameters submitted to the server. This mechanism is presented in form form submission and with parametric links <a href= "" ></a>

3. Jump from one page view directly to another page view, simple navigation function.

We use the table below to compare the technical details of these three frameworks in realizing the functions of the above diagram, so as to get their similarities and differences and points of focus.

Struts Tapestry3.0 JSF

The component that is displayed in view requires that the component must inherit Actionform

Explicit invocation and implicit invocation

Component must inherit basecomponent normal POJO

No need to inherit

Managed Bean

Components in the View Display Granularity view page can only display the actionform corresponding to the form, in which the action Actionform page in the configuration can only 1:1:1 relationships. You can embed a component in any row of the page, without restrictions on the number of components used. With Tapestry

Page partitioning is implemented using the Tiles tag library, which requires a different Tiles-def.xml profile component to have its own view page, which directly implements multiple page combinations by calling a component tiles. The powerful natural page combination is its feature. Through the component + Tag library to achieve subview, but if you need to reuse layout, but also with tiles.

Page jumps use the tag library html:link to specify that the target Url,url name needs to be coupled to the component action, in contrast to the configuration file's path. The URL name is the target's component name, and does not involve the URL and the path and other operations, convenient and stable. Like struts, you also need to look in the configuration file and detach from the component.

Parameter passing using Html:link when passing arguments over more than one handle trouble. Directly call the component, give the parameter directly, without parameter number limit parameter separation pass to component

Event triggers are submitted for submit activation through the form and cannot be subdivided into fields in the form. To be able to put an event on each field of the form, the event component must implement the Pagelistener interface with the tapestry, and the event component must intern ActionListener interface

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.