Comparison of advantages and disadvantages of JSP architecture and JSP development tools (1)

Source: Internet
Author: User

Bkjia.com comprehensive report] With the rapid development of technology, new JSP technologies are emerging one after another. To help everyone learn and work, the following describes the JSP architecture, JSP development tools, Web servers, and their disadvantages.

JSP Architecture:

Struts:Like many Apache projects such as Tomcat and Turbine, Struts is an open-source software, which provides developers with a deeper understanding of its internal implementation mechanism.
In addition, the advantages of Struts are mainly embodied in two aspects: Taglib and page navigation. Taglib is a Struts tag library, which is flexible and can greatly improve development efficiency. In addition to common JSP tags, JSP developers in China rarely develop their own tags. Struts may be a good starting point. After more than six years of development, struts is currently the most popular framework among users, development teams, and communities. It is suitable for the rapid development of small and medium-sized projects.

Tapestry:Tapestry is an open-source servlet-based application framework that uses component object models to create dynamic and interactive web applications. A component is any html tag with the CID attribute. Jwc indicates Java Web Component. Tapestry completely isolates java code from html, making it easy to use this framework to develop large-scale applications. In addition, the developed applications are easy to maintain and upgrade. Tapestry supports localization and detailed error reports. Tapestry is mainly developed using javabean and xml technologies. It is a component-based, event-driven framework with advanced concepts. It wants to implement a convenient mode similar to desktop program development. However, its learning curve is steep, and it takes a lot of time to grasp it. It is suitable for large-scale project development. With the accumulation of components, the more components that can be reused in the future, the faster the development speed.

Spring mvc: Spring's Web MVC framework is designed around DispatcherServlet, which distributes requests to the processing program, it also supports configurable handler ing, view parsing, local language, topic parsing, and file uploading. The default handler is a very simple Controller Interface, with only one method ModelAndView handleRequest (request, response ). Spring provides a controller hierarchy that can be derived from child classes. If the application needs to process the user input form, it can inherit AbstractFormController. If you need to process multi-page input to a form, you can inherit AbstractWizardFormController. Spring provides Dongdong, which uses spring's IoC and is also very powerful. However, it feels like it is close to the lower layer, and there are many things to be concerned about.

JSF:JSF is responsible for influencing client devices. It provides tools to integrate the presentation layer, application layer, and business logic layer. However, the scope of JSF is limited to the presentation layer.

The following are the most important services provided by JSF Framwork.

◆ MVC Architecture

Software Users always need to operate on various types of data, such as registration information submitted by a potential user, which is called model. Software developers must present the data to users, which is the view views. In Web applications, HTML files are used to depict the data.

JSF combines model and view. You can bind the model property to the view component in the following way:

"# (User. username)"/>

In addition, JSF also acts as the Controller. It can respond to user events, such as submitting data or modifying a value ), submit the data of these events to the class that processes the model to update the model. For example, you can call a method to determine whether a user is allowed to log on:

◆ Data type conversion

Users input text in HTML forms, and we need numbers, dates, and Other types. JSF provides a very simple method to specify or customize data conversion rules.

◆ Verification and error handling

In JSF, you can easily implement rules such as "a field cannot be blank" or "a field must be a number automatically. The customer also hopes to get a proper prompt after entering the error data. JSF provides a method to complete most similar tasks.

◆ Internationalization

JSF provides international publishing management to address topics such as character encoding and resource file selection.

◆ Custom components

◆ Selectable Renderer

By default, JSF renders tags in HTML format. However, it can also be easily extended to meet other rendering requirements, such as WML.

◆ Tool support

And so on.

Webwork: Webwork is an open-source Web application framework used to simplify Web-based application development.
The biggest advantage of Webwork is its simplicity and flexibility. Webwork has a very small API that allows developers to quickly develop jobs.
Webwork is a combination of many features and applicability, including the use of variour view technology, such as assumerver Pages (JSP), Velocity, Extensible Stylesheet Language Transformations
Specification (XSLT) and JasperReporters. Also, Webwork has excellent support for JFreechart. A classic framework like struts is easier to use than struts, but the community is not as powerful as struts.

Struts2: The combination of struts and webwork has not yet been officially released. I don't know if it will be a freak.


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.