Thursday, July 14, 2011

GWT Development Advantages/Disadvantages

After having coded in GWT form sometime. Here is my take on it
1. If you don't have web UI experience and were mainly server side/Swing/Flex developer, GWT is a boon.

2. If you come from web UI development world then GWT kinda sucks. Primarily because the style is mixed in with the java code. Getting the Styling and pixel perfection can be involved. With MVP pattern, the UI Styling and UI Code can be separated out, but things just become very XML(Xsmelly and bloated)

3. Also, you will have to go with some framework for widgets (GXT/SmartGWT/Vaadin), unless you want to hire 2 more engineers to do only widgets for you from scratch using GWT.

Choosing between GXT, SmartGWT and Vaadin?
Just remember that GXT is all written in JAVA, so it is great for debugging.

SmartGWT is mostly Javascript and hence if you are a no-no JS person, SmartGWT will become a pain to debug.

Vaadin appears …like 1998, all the interactions and client code is sitting on the server. Everything goes to server and comes back.
Widgets look good but the idea of client code being on the server was intriguing and uncomfortable, especially with more powerful client machines pervasive all around.

Over all, GWT has the following

Advantages
1. A very structured project (great for large teams)
2. Awesome HOSTED mode debugging of Client side code. This is a GREAT GREAT productivity boon.
3. Write once and run on any browser (GWT generates JS for each browser type)
4. People complain that GWT takes long time to compile. Well, for development mode (client side) I can recompile and just refresh the browser (5 sec). In case of RPC interface changes, it depends on how big your module is, based on that it can range from 30-60s. If you use JUnit to test your server side interfaces then you will rarely compile the entire code. So the possibility of waiting for a completel compile (30-60sec) is rare.


Disadvantages
1. Initial launch of a simple project is time consuming hence not suited for quick prototypes.
2. the JS files can become big and hence needs good client machine power.
3. Styling is intermingled with UI code and things look messy. If using MVP, things look too bloated due to the UIBinder. Most of the people who code in JScript/HTML/CSS will find GWT very restrictive in allowing them to design.
4. Your app cannot be SEO'ed. So not suited for developing web pages. GWT is more suited for Web Applications.

Note: If you are using PHP and JS and living in the unruly land of code anywhere without any structure and hate the pain to debug your own code, GWT will be a productivity boost.
Structure and great Debugging are AWESOME in GWT.