wood burning stoves 2.0*
The moose likes Struts and the fly likes JSF and Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "JSF and Struts" Watch "JSF and Struts" New topic
Author

JSF and Struts

David Geary
Author
Ranch Hand

Joined: Apr 23, 2003
Posts: 45
If you, like me, are not a regular here at the ranch, you might not know about this article written by Gregg Bolinger. I just read through it and it's a very good introduction to get you started using JSF.

It's interesting to note that Gregg emphasizes the similarities between Struts and JSF. In many respects, JSF is to Java what Struts is to C++: JSF is a leaner, meaner Struts, and there is an easy migration path from Struts to JSF. Contrast that to Tapestry, a wonderful framework based on WebObjects, which nevertheless, is quite foreign to the average Struts developer.


David Geary Sabreware, Inc<br /><a href="http://www.corejsf.com" target="_blank" rel="nofollow">http://www.corejsf.com</a><br /> <br />Author: Graphic Java Series, Advanced JavaServerPages, Core JSTL and Core JavaServer Faces
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
Originally posted by David Geary:
and there is an easy migration path from Struts to JSF. Contrast that to Tapestry, a wonderful framework based on WebObjects, which nevertheless, is quite foreign to the average Struts developer.


Hi David,

I just googled and found articles that compare jsf and tapestry a lot. Should relative ease of migration from struts decide the better framework? Which one as per your opinion is better and why?

thanks
Varun Khanna
Ranch Hand

Joined: May 30, 2002
Posts: 1400
May be a stupid question, but I am curious what exactly the term "migration" means?
Does it mean, as pointed in other thread, replacing the view part of struts with JSF or something of that sort (should n't this ideally be called as "integration" rather than "migration")

OR, does it mean replacing Struts "completely" with JSF?
Moreover, how to select which approach to use out of these two?


- Varun
David Geary
Author
Ranch Hand

Joined: Apr 23, 2003
Posts: 45
First, Struts and JSF. Sometimes it makes sense to use both together. You can use Struts client-side validation (which JSF does not have out of the box) in a JSF application or JSF components in a Struts app, with the struts-faces integration library. By migration, I assume most people mean moving from Struts to JSF completely.

Now, JSF and Tapestry. Fundamentally, these two frameworks are very much alike. Both are second-generation web frameworks that have components and an event model. JSF's strengths are that it's the standard and is familiar to Struts developers, however, JSF 1.0 has a rather skimpy set of components. Tapestry has a richer component set and some nice features, such as developing custom components without writing Java code, that JSF lacks. But Tapestry is a radical departure from Struts.
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by David Geary:
First, Struts and JSF. Sometimes it makes sense to use both together. You can use Struts client-side validation (which JSF does not have out of the box) in a JSF application or JSF components in a Struts app, with the struts-faces integration library. By migration, I assume most people mean moving from Struts to JSF completely.

I guess complete migration from Struts to JSF could be a bit awesome... Struts developers are pretty settled down to the framework that they are currently using and learning curve would matter also... I guess JSF evangelists should approach to those who are not currently using any web application frameworks...

Now, JSF and Tapestry. Fundamentally, these two frameworks are very much alike. Both are second-generation web frameworks that have components and an event model. JSF's strengths are that it's the standard and is familiar to Struts developers, however, JSF 1.0 has a rather skimpy set of components. Tapestry has a richer component set and some nice features, such as developing custom components without writing Java code, that JSF lacks. But Tapestry is a radical departure from Struts.

You are right. IMO, Tapestry does not get much acceptance from the industries like Struts, even though each of them work different ways... I feel that open-source tools need industry acceptance to survive in the competitive world of I.T....


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Struts users may be interested in Shale(as Gregg had mentioned in anotherb thread) which will replace structs taglibs
http://svn.apache.org/viewcvs.cgi/*checkout*/struts/sandbox/trunk/struts-shale/README.html


Groovy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF and Struts