samaxes

samaxes logo

Ramblings about Open Source, Java and other Web technologies by Samuel Santos

Comparison between Stripes and JSF

Reading the TheServerSide.COM news I’ve found a comparison’s article between Stripes and JSF frameworks.

I can’t agree more with the author Gregg Bolinger when he says Since I stumbled on Stripes, I’ve found it to be the best all around framework for my purposes.

Read it at “Stripes and JSF: A Brief Comparison“.

Don Brown on Unification of Struts Action and JSF

In Unification: Struts Action and JSF, Don Brown show us how to use Struts Action 2 and JSF as one framework.

Struts Action 2, based on the WebWork 2.2 code, has builtin support for JSF, using an approach that smoothly combines both frameworks into one configuration file, one framework. Struts Action takes the familiar Action-based approach to page logic and navigation, and sprinkles in optional support for JSF components. The result is a framework that lets the developer easily incorporate component-driven pages as application needs dictate.

The JSF components still have access to the entire JSF lifecycle while retaining the action-based paradigm.

JSF/Struts Action configuration file example:

<action name="employee" class="org.apache.struts.action2.showcase.jsf.EmployeeAction">
    <interceptor-ref name="basicStack" />
    <interceptor-ref name="jsfStack" />
    <result name="success" type="jsf" />
    <result name="index" type="redirect-action">index</result>
</action>

Comparing Java Web Frameworks

Struts is by far the most common web framework, but it is by no means the only option.
Java Server Faces has made a splash lately, but there are a number of open source alternatives, including Spring MVC, WebWork, Tapestry, and Cocoon.

I’ve found two interesting presentations that survey these available web frameworks, taking a look at what kind of code and content you need to write for each, specific strengths or weaknesses, and how to select the best web framework for your unique application requirements.

The second one takes even a closer look at how do these web frameworks work.

Sponsors