views:

841

answers:

6

I am interested in the possibility that GWT could serve as the basis for my entire presentation layer.

I would be interested to know if anyone has tried this successfully - or unsuccessfully - and could persuade or unpersuade me from attempting this.

+1  A: 

GWT is relatively new. The compiling process tends to get kinda slow as your code base grows. When we worked with it we found many problems with the layout and rendering of more sophisticated widgets, and the emulator acted totally different from real servers. Also, we had trouble with i18n for right-to-left languages...

All in all, GWT has (the usual?) problems of young technologies. However, it does make certain things really easy, like Ajaxifying as you named it.

abyx
Do you mean Java in general? The whole team has years of experience...
abyx
I'm surprised to hear this. How experienced are you with Java technologies?
karl
Yes, I meant Java in general. I wasn't sure if your troubles were a result of unfamiliarity with the Java way of doing things.
karl
But it sounds like the technology may have been the culprit in this case.
karl
Thanks for raising this red flag. I will definitely move cautiously with GWT with this in mind.
karl
Which framework would you recommend instead of GWT?
karl
+3  A: 

I worked with GWT about a year ago. At the time it seemed like a great idea, with a number of caveats:

  • I had "gotcha" problems with some parts of the API, that were probably related to the fact that you're coding as if you're in java when in fact you're actually writing for a separately compiled environment that acts like java, so you make some incorrect assumptions (in this case, passing nested values to the front end). I think there was another was rewriting my ant scripts to use a 32-bit jvm for the gwt compile.
  • I spent a bit of time trying to tweak the appearence - we never deployed a finished project so I'm not sure how much work this would've taken to get to a professional level, but it seemed (logically) like it'd be comparable to tweaking a swing interface. maybe a bit more unwieldy, visually, than html.
  • Because the ajax is so hidden from you in the final product, I had some concerns about what I might do if the performance was poor.

That being said,it definitely seems worth playing with, and my experiences were a long, long time ago in internet years, especially given that it's probably much more mature now. It's also worth pointing out that it's a very different (and refreshing) way of developing GUI code from most MVC frameworks, and worth a look if for no other reason than that.

My feeling is that if you're building a high-load professional site with very demanding graphical requirements GWT is probably not a good choice, otherwise ok.

Steve B.
My concern was it's not so intuitive to write Java code to generate a visual interface. Doesn't sound like you really had that problem much. Didn't think about tweaking the ajax - that could be too tricky to bother with I would say. I wonder how different GWT is from when you used it.
karl
Not sure why you say this - "My feeling is that if you're building a high-load professional site with very demanding graphical requirements GWT is probably not a good choice, otherwise ok" - is it because GWT is "heavy" in the browser - performance-wise?
karl
Given the seriousness of your caveats, I'm surprised you're not talking me out of it. But it sounds like you think these concerns are outweighed by . . . what? I'm not seeing many positives here :)
karl
I'd be leery of using it for high load because the ajax traffic is tightly wrapped and not in my control- it might actually be fine. As for the graphical -I'd hate to be in the difficult position of trying to match the client's mockups with swing-ish generated gui code.
Steve B.
I see what you mean about the graphical complications. I assume the experts have figured out a way around this. But getting help might be tricky since it's not so popular. Thanks.
karl
+1  A: 

We have done this for a very large project, and as long as you know it's limitations, strengths and weaknesses it works great. Funnily enough presentation was the least of our hassles, as we just skinned it just like you would any other HTML page, using CSS. The project went live, and ran flawlessly so I have no complaints.

The pitfalls I found with it you can find here:

http://stackoverflow.com/questions/99866/biggest-gwt-pitfalls/99977#99977

rustyshelf
+1  A: 

You mentioned that GWT would handle the presentational layer. Would you be doing the business layer in Java too? If that's the case, I'd like to point you towards IT Mill Toolkit, that does exactly this: It's a toolkit that uses GWT to render its GUI components, allowing you to do your applications entirely in Java. I think the term it's trying to coin is "server driven RIA".

I come from a PHP background, but instantly came to like the toolkit. But it's probably better that I won't say anything more and let you do your own decisions.

Disclamer: I do work at IT Mill, although that's irrelevant to my opinions.

Henrik Paul
I guess you're not allowed to like the product you work with on a daily basis...
Henrik Paul
Probably not if it costs money... the post is CW though, so it doesn't matter what people think :)
Bill K
Bill: the toolkit is free as in beer and open source. Oh, and I'm not worried about reputation, CW or not. I just was puzzled the reactions. I mean, if I would've kept it a 'secret' that I, indeed, do get paid by my company, would it been better? Would've probably just gotten fried harder, if someone would've noticed what I omitted, I guess.
Henrik Paul
If a google employee came on SO and pointed out some hot new feature of GWT, would they get downvoted too?
Peter Recore
A: 

some good info on about that on this raible video: http://raibledesigns.com/rd/entry/my_drunk_on_software_interview

Ray Tayek
+1  A: 

We have developed a large HR Portal application with the whole presentation layer done in GWT. The backend is Spring. It all works very well and the UI has been very well received by users. Very importantly it is easy for us to add new functionality and maintain the application. I think it would be much harder to do something comparable and maintainable using Javascript libraries.

You do need some sort of client side framework or you will end up writing one (as we did!): Our app is built on GWT Portlets (free and open source).

We use HTML fragments for skinning the app for different deployments and the layout of each "page" is stored in an XML file.

David Tinker