aspose file tools*
The moose likes JSF and the fly likes JSF vs GWT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF vs GWT" Watch "JSF vs GWT" New topic
Author

JSF vs GWT

Jacob Fenwick
Ranch Hand

Joined: Apr 28, 2006
Posts: 55
I'm interested in the AJAX component of JSF, and how this component shapes up to the Google Web Toolkit.

Over the summer some interns added a single autocomplete pulldown to one of our jsps using the GWT. The process seemed laborious to me. You build an event driven model. This model generates client side xml and html pages for each kind of browser the GWT supports. These files contain the JS that calls on the server. They talk to some sort of servlet, which talks to an RPC serlvet, which makes a call to your actual server. It all seemed very hard coded and I had a hard time seeing if there was any chance of reusability.

After seeing the process of the GWT, I'm curious about JSF and how it compares.

Similarity: How similar is the JSF way of AJAX to the GWT way?

Development Time: Does it take more or less time to develop the JSF widgets?

Reuse: The part I disliked about the GWT is that it seemed difficult, if not impossible, to build one of these AJAX widgets once, and then instantiate it multiple times. In JSF, how much new code/configuration do I need to add every time I build an autocomplete? Do I need to build a servlet specific to each instatiation? Is it much simpler than that?

Generated Code: The GWT generates an xml file and an html file containing the code specific for each browser. What does JSF actually generate?

More questions when I think of them.

Thanks,
Jacob Fenwick
Chris Schalk
author
Ranch Hand

Joined: Aug 31, 2006
Posts: 62
Originally posted by Jacob Fenwick:
I'm interested in the AJAX component of JSF, and how this component shapes up to the Google Web Toolkit.

Over the summer some interns added a single autocomplete pulldown to one of our jsps using the GWT. The process seemed laborious to me. You build an event driven model. This model generates client side xml and html pages for each kind of browser the GWT supports. These files contain the JS that calls on the server. They talk to some sort of servlet, which talks to an RPC serlvet, which makes a call to your actual server. It all seemed very hard coded and I had a hard time seeing if there was any chance of reusability.

After seeing the process of the GWT, I'm curious about JSF and how it compares.

Similarity: How similar is the JSF way of AJAX to the GWT way?

Development Time: Does it take more or less time to develop the JSF widgets?

Reuse: The part I disliked about the GWT is that it seemed difficult, if not impossible, to build one of these AJAX widgets once, and then instantiate it multiple times. In JSF, how much new code/configuration do I need to add every time I build an autocomplete? Do I need to build a servlet specific to each instatiation? Is it much simpler than that?

Generated Code: The GWT generates an xml file and an html file containing the code specific for each browser. What does JSF actually generate?

More questions when I think of them.

Thanks,
Jacob Fenwick


Jacob,

In a way comparing the core JSF spec to GWT is a little like comparing apples and oranges. However comparing custom JSF components that at runtime provide a rich/AJAX experience is probably a better comparison.

Chapter 11 provides examples of how to build custom JSF components that use AJAX, but JSF by itself does not inherently do richclient/AJAX for free out of the box - as opposed to GWT. There is work currently underway both in the OS arena as well as with vendors that will provide JSF components that come pre-equipped to provide a rich AJAX experience without having to dive into a lot JavaScript code - which of course GWT negates having to do.

Who knows - maybe someone will integrate the two technologies..... hmmmm
Jacob Fenwick
Ranch Hand

Joined: Apr 28, 2006
Posts: 55
Thanks for your reply.
I think some marketing on the Sun site confused me into thinking that Ajax was a well supported feature in JSF. It may have been this jMaki tutorial.
Speaking of which, have you tried jMaki? Know if it's any good?
Chris Schalk
author
Ranch Hand

Joined: Aug 31, 2006
Posts: 62
I don't mean to convey AJAX is "not" well supported within JSF. AJAX and JSF are perfectly compatible. It's just GWT and the core JSF spec operate at different levels.

JMaki is an example of how JSF can support AJAX - I've tried it and I think it's pretty cool. Anything that shows how JSF and AJAX can work together I think is cool.
-Chris
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JSF vs GWT