• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

are GWT and JSF competing?

 
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can GWT replace JSF?
I use JSF, do I need GWT?
Thanks.
 
author
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Both GWT and JSF aim to provide a user interface for a backend. You could mix the two by having GWT modules run within JSF pages. The JSF page would be generated on the server and the GWT module would run on the client once the rendered page is downloaded.

The disadvantage to mixing the two technologies is that you have a fairly substantial barrier between the two sets of code: one runs on the server and the other the client. So you need to use web technology, XML or JSON, to communicate between the two. It is probably easier to use a GWT RPC servlet on your server instead of communicating directly to JSF.

If you're starting a new project I would recommend choosing one technology over the other. I would side with GWT since you can push quite a bit of state to the client side making server performance better and at the same time decoupling the client application from the server.
 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't they are competing.
JSF is a server side framework, GWT compiles your code to client side JavaScript.
By using Ajax enabled JSF components like ICEfaces or RichFaces, you can create the same illusion of GWT.
If you asked me, I would go with GWT.
 
Bruce Jin
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.
So if one uses GWT then he would not need to use JSF or JSP (although he could)?
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's correct, Bruce. All you need for GWT is the HTML and JavaScript that result from compiling your Java classes. And yes, if you'd like to use JSF and JSP, you can.
 
Bruce Jin
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It took a few years and huge effort from many big companies to make JSF a powerful web application building tool. It is a little hard to believe GWT can do all what JSF does.
Let�s google this topic: compare GWT to JSF.
 
Bruce Jin
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It took a few years and huge effort from many big companies to make JSF a powerful web application building tool. It is a little hard to believe GWT can do all what JSF does.
Let�s google this topic: compare GWT to JSF.
 
Ryan Dewsbury
author
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wouldn't say that GWT does what JSF does. JSF tackles some hard problems with developing application views that are generated on the server. This is a really hard problem because with every action the view needs to be rendered and transferred to the client. Models for creating user interfaces have been around for a while but web user interfaces, being generated on the server, are inherently harder to build and require a solid infrastructure like JSF.

Applications build with GWT take a different approach and avoid the difficult problem of building interfaces on the server. They are thick clients. Like desktop Java clients. They have their own internal architecture that is decoupled from the server. They contact the server less than a traditional web app.

You can think of GWT apps as sharing the distribution benefits of web apps while sharing the feature rich capabilites of desktop clients.
 
Hussein Baghdadi
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JBoss Seam now allows you to take the best from the both worlds with a very nice recipe.
You can create your views as GWT pages and your back end as Seam components(POJO or EJB3)
 
Josh Brown
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bruce Jin:
It is a little hard to believe GWT can do all what JSF does.


Yes, that would be hard to believe. That's not what I meant when I said you can use GWT without JSF. You can use GWT without JSF. That doesn't necessarily mean you'll get the same functionality. I only meant that GWT has no dependencies on JSF. It can be used separately, though you probably wouldn't have all the functionality you'd have if you used it in conjunction with JSF.
 
Bruce Jin
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let me ask this question in another way:
I am using JSF but not GWT what do I miss?
Thanks.
 
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It will be requirement base decision. What you want or what you want to use?? Sometime you decide on technology before project starts (not in my hand on that decision) and in other cases after getting specification. I know in big companies where they replace SAP with their own implementation of in-house develop technology where you have no choice.

JSF has strong bond with database compare to loose coupling of GWT. I mean you can take various approaches to connect database with GWT compare to JSF. If you have well define backend and need new frontend GWT is great. Again it is boil down to many things but GWT looks good overall in learning compare to JSF (in my view). It is shielding you from AJAX, Javascript, XML and other little things.

One things is for sure Google should be push GWT with new feature sets and releases in future but time will tell..
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic