0

First off, I've never used GWT before. I have good experience in HTML/CSS/JS/JSP.

I'm looking for people's opinions on the suitability of Google Web Toolkit for a brand new web app I'm developing.

  • A big requirement is that the UI is attractive and well designed (Does not look like a clunky Java/Swing App).
  • It should look like any typical HTML/CSS/JS based modern website.
  • It is an internal company application so no SEO is required.
  • JSF is not an option.

The web app frameworks used will be Spring Webflow and Spring MVC. It will use lightweight controllers to communicate with a service layer.

Would Spring Tiles combined with JSP be an easier or more flexible option than GWT for what I am trying to achieve?

Advantages/Disadvantages of GWT and other options welcome.

Thanks

Thomas Buckley
  • 5,836
  • 19
  • 62
  • 110

1 Answers1

2

Advantages of GWT

  • You don't really need to know any JavaScript, since all your client side code will be in Java

This is usually the main reason people go for GWT. They're backend developers who know Java but don't know Javascript, and they don't really want to learn it. Still, you should be careful about this. GWT is a very complete and complex framework with many concepts that are specific to GWT. Even though you'll be coding in Java you will still have to go through many tutorials and documentation before you can build a clean GWT app

  • Ready to use widgets, like date pickers, dynamic tables, layout panels, popups

It's not really specific to GWT. Other front end framework, like jQuery or Dojo or whatever also give you these. You can have a look at the GWT Showcase to see what GWT has to offer.

  • GWT takes care of a lot of complex and potentially dangerous stuff for you.

Stuff like Cross-Browser Support, Internationalization, Image and static resources bundling, Front end security, Ajax communication with a server, Events and MVP (just like MVC) framework support. Have a look at the documentation, it is very well done and very thorough.

  • Debugging is easy

GWT has two different 'modes'. When you're building your app for production, gwt will compile all the java code for the front-end that you wrote into javascript. This javascript will be executed in your clients' browsers. But when you're developping, you can run your app without compiling your java code to javascript. This lets you use a debugger to debug your interface. It's a very good tool.

Disadvantages of GWT

  • As I said before, GWT is a full framework, with concepts specific to it. Don't think that just because it's in java and you know java that you won't have to learn new stuff.

  • Interfacing GWT with back end frameworks is not easy

The most common way for your GWT client code to communicate with a server is by using GWT RPC mechanism. It means that you will need to have servlets that implement specific interfaces. You should definetly read the docs on client-server communication to see if that fits well with Spring. A search on SO or Google should give you pointers to setup your application.

jonasr
  • 1,876
  • 16
  • 18
  • 2
    I must add interfacing GWT with Spring at the backend is easy and you can get the best of both by using [GWT-SL - GWTHandler](http://code.google.com/p/gwt-sl/wiki/Documentation) (which delegates to the implementation of your GWT Services, which become POJOS managed by Spring). Also, you should add a disadvantage: the long compiling times in GWT, which can be managed but never truly go away. – Renato Jun 13 '12 at 23:11
  • Last time i used Spring with GWT was over a year ago, so I'm sure there's been some real improvements since then. It's true that GWT compilation takes a lot of time and resources, but usually you don't have to compile until you're in production so it's a minor side effect i think. – jonasr Jun 14 '12 at 08:02
  • Thanks for the opinions guys. Is there regular and significantly active development on GWT by Google? Is there there a good user community? I.e. Is help/advice/documentation of a good standard? – Thomas Buckley Jun 14 '12 at 08:49
  • GWT has become quite stable. The last few releases didn't add many features, mainly some bugs fixes and HTML5 support. So I would say it's stable enough for any project. Google itself uses it on some of its projects, the famous Google Wave was developed in part with GWT. The documentation is of very good quality in my opinion. I can't really say about the community. – jonasr Jun 14 '12 at 09:10
  • One final question guys. In terms of design of the front-end, for a new developer....would there be a steep learning curve to produce a graphically rich multi-page web app within 3 weeks using GWT? – Thomas Buckley Jun 14 '12 at 14:58
  • @ThomasBuckley From my experience with other developers, if you have UI experience with other frameworks, GWT is not difficult to learn, but you should still take some time to understand the concepts involved (writing code in pure Java, but which is translated to JavaScript by the compiler, learn something about i18n, Messages/MessagesWithLookup interfaces, GWT Generators which allow similar features to reflection etc) which could take a few weeks. If you have no experience in UI design/event-driven programming with callbacks etc, you will need more time, perhaps a couple of months. – Renato Jun 17 '12 at 23:34