File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes GWT and the fly likes Why choose GWT framework ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "Why choose GWT framework ?" Watch "Why choose GWT framework ?" New topic

Why choose GWT framework ?

Claude Moore
Ranch Hand

Joined: Jun 24, 2005
Posts: 724

I know that this question may seem nasty, but I'm just trying to clean up my mind...

I'm not an expert in Web Application programming, and I'm searching for an enduring technology to adopt for webapps development. During my search (on various web sites, forums and so on) I've never found a definitive answer -- and maybe a definitive answer doesn't exist ever -- so I came to conclusion that adopting pure HTML + css + Javascript and endorsing of some powerful Javascript framework (like JQuery or Dojo just to name some in the crowd of JS frameworks) should be the most conservative approach.
I started with humble expectations, and achieved some results... but I'm in doubt if my choice may would be still valid when dealing with large applications.

Times ago I tried to use GWT, I found it very promising because it would make possible to write web apps in Java in a very portable way, and most important, to build your own widgets and components; but I gave up, to be honest, because it generally took a very long compilation time, and because the whole thing seemed a bit over sized for me. Maybe now things are different, and a colleague recently suggested me that it may be a good idea to adopt GWT for our projects, or, at least, to give it a try; I tried to form my own opinion reading some technical blogs and articles, but of course on the web one may find very different opinion about it: somebody claims that GWT will be the next big thing, others disagree less or more deeply. For sure, I've no much time to make experiments...

What would you suggest to me, experts ?

Thank you for any help.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63870

In my opinion GWT will never be "the next big thing" or even "any big thing". It's very useful for the niche market that it caters to, and that is shops who have lots of Java experience but no web experience, and don't want to invest in HTML/CSS/JavaScript training or people.

[Asking smart questions] [About Bear] [Books by Bear]
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10836

I think Bear has summarize the "big thing" part perfectly. His reasoning of where GWT might be useful is absolutely spot on. I am one of those people who had no web experience (in fact for some reason, I absolutely hated html, still do). Then I discovered GWT and could churn out my own "web apps"

From my experience, GWT started off very nicely. All the css, html, cross browser stuff is abstracted away from you. If you come from a swing/java background (like me) its almost like using some third party library which provides its own widgets and api. The basic concepts like layouts, event delegation model, parent container with child widgets are very similar to Swing.
Then google bloated it. They kept adding all kinds of stuff. Cell widgets? To optimize? I mean really? How much difference does it make by optimizing when at most you are going to display say 25 data items? I mean hello? Pagination? They didn't stop at MVP and History and Places. Somewhere down they line, they even encouraged to have your own css. Even your own HTML code. Gasp! Wasnt GWT supposed to take care of all this for me once? Sadly its grown too complicated unnecessarily. Sadly, when the pied piper pipes his tune, people follow in hoards without pausing to think "Do I really need all that"

Anyway, coming back to your question.
I personally am (still) a fan of GWT and I would encourage you to explore it (along with other options) before making an education decision.
Long compilation time: You can cut it down by explicitly setting the user agent. By default GWT compiles for all OS+Browser combinations. After all thats what makes it cross browser compatible. When you specify your user agent explicitly, it will compile only for that particular browser.
A bit oversized: Yup. But you need not really use all the available stuff. You will be surprised how much you can cull down. UI Binder + MVP + RPC should give you a minimal working set.

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Having overseen development of a big GWT site, and gotten my hands somewhat dirty in the process, my impression is that you need to commit to it fully. With some frameworks you can start off small, and only use some of their features, and maybe use more over time. But with GWT you really have to scale a big learning curve before it pays off. And even then you encounter gotchas where it does things in a way that you would not normally want to have done a certain way. For example, by default it's SEO-hostile - even though it's a Google framework, its pages can't be crawled without further effort. Or that it creates gigantic entry pages where all images and all styles are downloaded at the beginning, resulting in bad performance on the first page. You can work around that, but it's extra effort. Or that you can't use the java.util.regex for validation, because GWT can't compile that into JavaScript code - you need to use GWT-supplied regex classes. Some of these points even the GWT-experienced developers we worked with didn't know.
Claude Moore
Ranch Hand

Joined: Jun 24, 2005
Posts: 724

Thank you a lot, all of you... your suggestions and opinions are really important to me.
I agree. Here's the link:
subject: Why choose GWT framework ?
It's not a secret anymore!