The Google Webtoolkit

Developing web applications in Java for a couple of years now the big annoyance part always was the GUI part. Making it work in every browser, implementing AJAX, etc.. AJAX is hot nowadays and when demands are rising I started looking for an easy to use AJAX framework to build a web application GUI in. I came across many frameworks like YUI (Yahoo User Interfaces), DWR in combination with spring MVC, Wicket and many more. The one that stood out the most was GWT (Google Web Toolkit). The nice thing about this framework is that you only code in Java :-). No more HTML, Javascript etc.. But if you really want to use HTML and Javascript (In some specific cases) you can, so full flexibility is available.


How does it work than? Your package structure needs to have a package called ...client and ...server. All code that is written in the client application is compiled to javascripts and HTML files are created where needed. The javascript that is created is compliant to the most used browsers like:
IE, Firefox, Mozilla, Safari and Opera. So no need to focus on that part anymore ;-). It's also optimized already for you so it will work as fast as possible.


Since this framework/toolkit is component oriented and implemented very nice it's much easier to reuse components. You can actually reuse components by using JAR files :-). Another great thing is that you don't have to do a mind switch because you are still coding Java with type checking etc. So you know what you write actually works. Something that you don't have when coding javascript. As we all know it's very error prone and hard to write good quality javascript that will work in every browser. The learning curve is therefore not steep at all. Coding with GWT looks and feels like coding a regular Swing application. I think this is the real power of GWT. Creating GUI's like you are used to be doing. Even if you didn't develop in Java it's the same principal i.e. in VB, Delphi, Borland C++ etc.. It's all roughly the same unlike using Struts, JSF, Spring MVC etc. Those are frameworks using a different approach and have a steep learning curve. Actually I wonder why no one else came up with this kind of technology earlier. It would have saved us a lot of headaches. At least that is my experience. I didn't come across any other framework that is as easy as the GWT. A lot off people think it's wonderful but I think they didn't really take a good look at GWT. I used Wicket and GWT both and must say that GWT is much better implemented and saves you more time in development.


I must say that Wicket is much better than i.e. Struts or Spring MVC but it doesn't beat GWT. GWT has more capabilities. To make your application look good and have drag & drop etc.. you can use i.e. GWT-ext. This way you can use the Javascript Ext components in GWT without writing javascript! :-D It looks very nice: http://code.google.com/p/gwt-ext/
So on that part you also save a lot of time because this library has a lot of controls/widgets you can use out of the box like a sortable table, calendars and many more. GWT 1.5 will support Java 5 syntax so that will be no issue anymore for the people that use Java 5. It's already available but isn't released yet.


There are also some nice Eclipse plug-ins for GWT like the GWT Designer from instantiations. You can take a look at it here:
http://www.instantiations.com/gwtdesigner/index.html


I recommend this one. It doesn't cost much and saves you a lot of time creating a GUI. Just drag & drop your components on to the screen and voila!


So I would say invest some time in the GWT and I am sure you will like it ;-)

Comments

Popular posts from this blog

Fastest XML parser

Tomcat behind Apache HTTP server using Spring Security

Cargo-itest open source project