As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened,
visit the help center for guidance.
Closed 7 years ago.
Which is best, or in other words, whish is easiest to use? Stripes or JSF.
Although I haven't used both in anger I need to gauge what is the best option to work with for both starting new projects and converting existing Struts projects.
I have a fear that JSF won't render as nicely as I want but what are others experiences?
Seems Stripes is far more straight forward, would I be correct in this assumption?
Which is best, or in other words, which is easiest to use? Stripes or JSF.
Which is the best? Well, Stripes and JSF are different. The former is an action-based framework (like Struts) while the later is component-based (like Wicket). So the answer will depend on your experience and knowledge of action-based flow vs component-based hierarchy and both have their strengths and weaknesses. Which is the easiest? Stripes, no doubts about that.
What I love about Stripes:
- It's simple and easy i.e. it has a low learning curve.
- I love its convention over configuration approach.
- It's lightweight.
- It's well documented (and you don't need tons of documentation because of its simplicity).
- It has a small but reactive community (you'll get answers on the mailing lists).
If both are new to you, I'd go for Stripes. If you want to learn a component-based framework, I think it's easier to start with Wicket (also see what Gavin King says in How to start learning Java EE 6).
JSF does not have good press and bad reputation is unfortunatelly justified (one more missed opportunity by the late Sun Microsystems). But, BUT a lot has changed since the question was asked - the new JSF 2.0 version was released.
So what was wrong with JSF 1.X, what made it so iritating when compared to Stripes, Spring MVC or Wicket, Play, Click, etc.?
- Only POST requests were supported, which caused performance problems (GET requests can be effectively cached), hard to achieve bookmarkable URLs and more
- JSF 1.X was based on JSP pages, which were not were suited to handle more complicated JSF page lifecycle
- Creation of components was difficult and cumbersome.
- Defining of navigation rules was far from flexible and very verbose
- Mandatory XML configuration
- No clean resource management method
The good thing is that all this shortcomings were addressed by the new JSF version.
- GET and POST requests are equally well supported.
- Configuration can be done with the help of annotations (we can stick to XML where it is better solution), navigation rules definitions are simplified, we can even use convention over configuration approach.
- Components creation is easy.
- There are new and very usefull component scopes: view scope and flash scope (similar to that known from Ruby on Rails) that enable users to handle easily more complicated flows.
- There is standard resource management method and better error handling facility
- We can define project stages for easier project handling in various environments (testing, production, etc.)
- XHTML based Facelets replaced JSP as much better view definition alternative
- Built-in AJAX requests support
- JSF is a part of Java EE standard, which means they are not going to dissapear overnight if bored developers decide to move to the next shining and more fashionable framework.
And the last, huge JSF 2.X advantage: tones of well designed, great looking and well performing ready to use components (RichFaces, PrimeFaces, ICEFaces). These libraries provide hundreds of of typically used on WWW pages components that are available without writing a single line of JavaScript or CSS. That's huge productivity boost.
Still, JSF might have performance issues as compared to action-based frameworks like Stripes, which work more closely to HTTP requests, without building component model (which is using more memory, more network bandwidth).
But for application which does not have to be extremely performant JSF 2.0 is a very good and rational choice. Learning curve is no longer that steep as is was plus ability to reuse existing components makes it truly appealing. Looking from that point of view Stripes is not so attractive.
So, for instance, for an intranet corporate application used by 2000 employees JSF 2.0 would be great choice.
The best web framework? Like often this question results in an “it depends” answer.
The other question: “what the easiest to use framework”. Is easier to answer, that Stripes. JSF has a notorious steep learning curve. Stripes on the other hand is easy to setup and easy to learn.
The Stripes framework is like Struts but only better. For example, it uses annotations instead of XML configuration files. Just like the Struts framework it’s an action based framework, only more elegant. This means it closely follows the stateless nature of the HTTP event processing. This is good if you want high performance and maximum flexibility in how you’re pages are generated.
A framework like JSF is not an action based framework but component based framework. This means it moves a layer of abstraction between HTTP and your application. This layer makes it possible to program JSF applications as if you’re programming a Swing application. Thus JSF basically handles the paradigm mismatch between the components model and the stateless HTTP life cycle. This layer of abstraction however, will cost some performance; also it will give you somewhat lesser degree of control on the generated HTML.
jsf far more used, so you should have better support if anything weird happens. That is enough reason for me to use it.
I would use JSF. It is used far more widely and iceFaces is a very handy package for JSF based apps.
JSF is part of Java EE 6+. That means it will be available and maintained for a very long time, which is important to us.
Also different implementations may occur which allows you to choose the best one for a given purpose.
Seam is nice application stack for developing JSF apps, not sure about Stipes.
- Conversions
- Nice ajax support
- Rich set of components
- Annotations over XML configuration
One thing I don't like about JSF is hight learning curve specially if you are new comer to JSF.
Stripes like Struts does not really do a lot for your app. Besides some elementary routing and populating of forms and executing actions it does basically nothing. Last time i checked most(all) stripes tags are basically fascades for the equivalent html tag with little or no extras. That said JSF does give more but if you want a real technology that is not stuck in the year 2000 - consider GWT.