• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

JSF vs GWT

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic