aspose file tools*
The moose likes GWT and the fly likes are GWT and JSF competing? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "are GWT and JSF competing?" Watch "are GWT and JSF competing?" New topic
Author

are GWT and JSF competing?

Bruce Jin
Ranch Hand

Joined: Sep 20, 2001
Posts: 671
Can GWT replace JSF?
I use JSF, do I need GWT?
Thanks.


BJ - SCJP and SCWCD
We love Java programming. It is contagious, very cool, and lot of fun. - Peter Coad, Java Design

Crazy Bikes created by m-Power
Ryan Dewsbury
author
Greenhorn

Joined: Nov 07, 2007
Posts: 22
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.


GWT Book - GWT Poker
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

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

Joined: Sep 20, 2001
Posts: 671
Thanks.
So if one uses GWT then he would not need to use JSF or JSP (although he could)?
Josh Brown
Ranch Hand

Joined: Oct 09, 2007
Posts: 35
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.


Josh
Inside the Machine
Bruce Jin
Ranch Hand

Joined: Sep 20, 2001
Posts: 671
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

Joined: Sep 20, 2001
Posts: 671
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
Greenhorn

Joined: Nov 07, 2007
Posts: 22
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
Bartender

Joined: Nov 08, 2003
Posts: 3479

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

Joined: Oct 09, 2007
Posts: 35
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

Joined: Sep 20, 2001
Posts: 671
Let me ask this question in another way:
I am using JSF but not GWT what do I miss?
Thanks.
Ken Boyd
Ranch Hand

Joined: Dec 10, 2003
Posts: 329
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..


SCJP, SCWCD, SCBCD, SCJD, BB Java2 and JSP1.1
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: are GWT and JSF competing?