Saturday, February 16, 2008

GWT

Google Web Toolkit or GWT is a Java framework that can be used to develop AJAX applications in Java language. Developers basically write code in Java which can then be compiled into HTML and Javascript. There’re some great advantages of developing AJAX apps with GWT (especially if you're a Java developer):

  1. Browser independent compiled code. Coding in Javascript can be complex and tedious if you want to write browser independent code. GWT simply eliminates that complexity for the developer. How? No JavaScript coding. You code in Java and GWT compiles it for you in JavaScript that's browser independent (runs in most browsers).

  2. Compile time errors. JavaScript errors can be very frustrating especially if you have a large code base. And you won't find the bug until you run it. It could be as simple as a misspealt variable name. Developers can code with GWT in their favorite Java IDE and you can weed away the compile time errors.

  3. Testing in hosted mode. In hosted mode your application basically runs within a JVM. This helps you debug your application in your favorite IDE.

  4. Component Library. GWT contains a basic set of UI components called widgets, that can be used (and extended) to lay out well functional UIs. If you're a Swing developer, this will be cakewalk for you.

  5. Server Communication. You can easily communicate with your webserver using java objects. GWT automatically serializes and deserializes your request and server response. With some smart coding you can create applications that have a non-java back-end. For example a contact page that calls a php page for saving data in some database.


To learn more, visit http://code.google.com/webtoolkit/

Enjoy!

1 comments:

Sure said...

GWT is making easier to develop and deploy Ajax applications.
However there are few disadvantages with this great toolkit:

->It takes much longer to get anything running with GWT when compared with the deployment of Ajax Tags by java developer.

->You never put direct JavaScript in your HTML. Instead, you use JSNI to wrap JavaScript in Java. Very powerful in the long run, but hard to get used to at first.