Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the advantages and disadvantages of JSF/Spring MVC/Stripes/Struts 2/Tapestry/Wicket

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces "what are the advantages and disadvantages of JSF/Spring MVC/Stripes/Struts 2/Tapestry/Wicket". In daily operation, I believe many people have doubts about the advantages and disadvantages of JSF/Spring MVC/Stripes/Struts 2/Tapestry/Wicket. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful for you to answer the doubts about "what are the advantages and disadvantages of JSF/Spring MVC/Stripes/Struts 2/Tapestry/Wicket?" Next, please follow the editor to study!

JSF

Advantages:

◆ Java EE standard, which means that there is a great market demand and more job opportunities

◆ is fast and relatively easy to use.

◆ has a large number of component libraries available

Disadvantages:

◆ has a large number of JSP tags

◆ does not support REST and security well.

There is no unified implementation of ◆. There are not only the implementation of SUN, but also the implementation of Apache-MyFaces.

◆ 's domestic OperaMasks also supports AJAX and development tools.

Spring MVC

Advantages:

◆ provides lifecycle management for overlay binding (overriding binding), verification (validation), etc.

◆ integrates seamlessly with many presentation layer technologies / frameworks: JSP/JSTL, Tiles, Velocity, FreeMarker, Excel, XSL, PDF, etc.

◆ is easy to test-thanks to IoC

Disadvantages:

◆ 's large number of XML configuration files

◆ is too flexible-there is no common parent controller

◆ does not have built-in Ajax support

Stripes

Advantages:

◆ does not need to write XML configuration files

Good learning documentation for ◆

Members of the ◆ community are very enthusiastic

Disadvantages:

The ◆ community is relatively small

◆ is not as active as other projects.

The URL in ◆ ActionBean is hard-coded

Struts 2

Advantages:

◆ architecture is simple-- easy to extend

The ◆ tag library can be easily customized using FreeMarker or Velocity

◆ controller-based or page-based navigation

Disadvantages:

◆ documents are poorly organized

◆ pays too much attention to new features

Most of the documents searched by ◆ through Google are Struts 1.x documents.

Tapestry

Advantages:

Once ◆ learns it, it will greatly increase productivity.

◆ HTML templates-- very good for page designers

With every new version of ◆, there will be a lot of innovation.

Disadvantages:

◆ documents are too conceptual and not practical enough

◆ learning curve is steep

◆ has a long release cycle-there are major upgrades every year

Wicket

Advantages:

◆ is good for Java developers (not Web developers)

The ◆ page is tightly bound to the display

The ◆ community is active-with support from the creators

Disadvantages:

The ◆ HTML template is next to the Java code

◆ needs a good understanding of OO

◆ Wicket Logic-everything is done with Java

Then, by interviewing the authors of these frameworks, Matt discusses various open source Java Web frameworks with them, highlights the strengths of each framework, and listens to the authors' views on other frameworks, hoping to understand the future direction of these frameworks.

Here are some interviewees:

JSF:Jacob Hookom

RIFE:Geert Bevin

Seam:Gavin King

Spring MVC:Rob Harrop

Spring Web Flow:Rob Harrop and Keith Donald

Stripes:Tim Fennell

Struts 1:Don Brown

Tapestry:Howard Lewis Ship

Trails:Chris Nelson

Struts 2:Patrick Lightbody

Wicket:Eelco Hillenius

Matt summed up the interview as follows:

JSF:

If you want web applications to have desktop-like functionality, you can trust the standard specification of JSF and the support of a large number of third-party component libraries.

Spring MVC:

It integrates many different technologies, which makes it widely used in different types of projects; it can be used as a basic platform for web application development.

Stripes:

It can be applied to programs with a large number of complex data interactions; it has powerful type conversion, binding and validation capabilities; it makes it easy to manage large and complex forms and map them directly to domain objects.

Tapestry:

Perform well in medium to large projects (of course, you can apply it only to a single page), where you can leverage by simply creating new components.

Struts 2:

It is usually more suitable for small project teams that want to really get started and are willing to spend a lot of time learning the open source tools they use. Struts 2 is not aimed at "armchair programmers" who prefer drag-and-drop development.

Wicket:

Ideal for intranet / extranet applications where UI is complex and you want to make the most of your developer resources.

The above summary basically highlights the strengths of each framework. However, what are their bad points?

Matt proposes criteria for evaluating whether a framework is good or bad:

◆ Ajax support

Is it built-in? Is it easy to use?

◆ bookmarking ability

Can the user collect a page and easily return to it?

Verification

Is it easy to use? Is client-side (JavaScript) authentication supported?

◆ testability

Is it simple enough to test the controller out of the container?

◆ submission and redirection

How does the framework deal with repeated submissions?

◆ internationalization

How to support internationalization? Is it easy for the controller to use international information?

◆ page modification

What type of page modification / composition mechanism does the framework support?

◆ Community and Technical support

Can questions be answered quickly and respectfully?

◆ development tools

Are there good tools to support this framework, especially IDE?

◆ market demand

After learning this framework, can it help you find a job?

Number of ◆ posts

What is the need for this framework skill on dice.com and indeed.com?

The author thinks that this evaluation standard is worth using for reference.

Then, in accordance with these evaluation criteria, Matt elaborated on each framework as follows:

Ajax support

◆ JSF: there is no built-in Ajax support, ICEfaces and Ajax4JSF are required

◆ Stripes: there is no corresponding class library, which supports stream output

◆ Struts 2: built-in Dojo with plug-ins for GWT and JSON

◆ Spring MVC: there is no corresponding class library, you need to use DWR and Spring MVC extensions

In ◆ Tapestry:Tapestry 4.1, there is a built-in Dojo

◆ Wicket: supported by Dojo and Script.aculo.us

Bookmarking ability

◆ JSF: can be submitted at will-URL is not even considered

◆ Stripes: use conventions, but you can ignore them

◆ Struts 2: there is the concept of namespaces, which makes it easy to collect a page and return it

◆ Spring MVC: allows full URL control

◆ Tapestry: there are still some ugly URL

◆ Wicket: allow assembly (mount) page / URL

Verification

◆ JSF: the default internationalization information is ugly, but easy to configure

◆ Stripes and Wicket: validate with Java class-client authentication is not supported

◆ Struts 2: use OGNL for powerful expression validation; client-side validation is supported only if rules are specified on the Action.

◆ Spring MVC: allows you to use public validators-this is a mature solution

◆ Tapestry: robust verification capabilities-beautiful internationalization information without customization

Testability

◆ Spring MVC and Struts 2: allow simple testing using mocks (such as EasyMock, jMock, and Spring Mocks)

◆ Tapestry: testing is difficult because page classes are abstracted and concrete classes are simplified

◆ JSF: page classes can be easily tested, actually much like actions in Struts 2

◆ Wicket: there is a powerful solution for WicketTester--

◆ Stripes: there are Servlet API Mocks and MockRoundtrip

Submit and redirect

The easiest way to solve the problem of repeated submission is to redirect after submission

◆ Spring MVC: allows you to add parameters to the redirect URL

◆ Stripes, Tapestry and Wicket: with "flash" support

◆ Struts 2: need a custom solution

◆ JSF: you need a custom solution, and it is difficult to add internationalization information to the page bean.

Internationalization

◆ JSTL tags make internationalization easy; there is no unified standard for how to put internationalization information into controller classes.

◆ Stripes, Spring MVC, and JSF: one resource binding file per region

◆ Struts 2, Tapestry, and Wicket: promote the separation of resource files used by each page / action

◆ JSF: resource binding information needs to be defined on each page

◆ Tapestry: the tags are scary.

Page modification

◆ Tiles can be used in Struts 2, Spring MVC, and JSF; each page needs to be configured.

◆ SiteMesh can be used in all of these frameworks (not recommended in JSF, Tapestry, or Wicket); after setup, very little maintenance is required.

Development tools

◆ Spring MVC:Spring IDE, but only do XML check, not a UI/web tool

◆ Struts 2:Eclipse

◆ Tapestry:Spindle, which is very beneficial to the coders

◆ JSF: a lot of IDE support, and doing better and better

◆ Stripes and Wicket: there are no official tools

◆ NetBeans currently supports Struts *, JSF (+ Facelets), Tapestry and Wicket, but does not support Stripes and Spring MVC

Market demand

◆ Struts 1: demand is still high and widely used

◆ Spring MVC: getting more and more attention, but mostly because of some other features of the Spring framework

◆ JSF: quickly became popular

◆ Struts 2: is gaining ground, but there are few related job opportunities

◆ Tapestry: over the past few years, popularity has been growing

◆ Wicket and Stripes: still unknown

At this point, the study of "what are the advantages and disadvantages of JSF/Spring MVC/Stripes/Struts 2/Tapestry/Wicket" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report