Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top