Tuesday, December 25, 2007

GWT-Ext and Grails just works!

After about a year of experimenting with web frameworks I think I've finally found something that works well...

Using GWT as a client framework is so helpful because you don't need to worry about HTML, javascript, CSS and the zillion frameworks that wraps these technologies.

Using Grails as a server framework is helpful because it's a DSL (groovy) which provides many additions to the Java JDK, closures, convention over configuration, dynamic finders, and many more useful features that make you productive.

If you use just plain GWT then you will need to know a little something about CSS if you want your webapp to look good, but I didn't want to spend time messing with that because I knew there is already tons of options out there that make your entire widget suite look good. That is when I found the javascript library Ext and the GWT-Ext project which wraps the Ext javascript library so that you can easily use it in the GWT framework. This framework is AWESOME! It looks good, the framework is easy to learn and extend, and you get tons of functionality right out of the box.

Now, I still think using Flex/Flash based clients with Grails or Rails(JRuby) servers are probably just as good since they follow the same concepts as my example application, but I'm not sure how easily Flex applications can be debugged. It probably works pretty well though given the Flex Builder IDE that Adobe has developed.

Anyways, check out my sample GWT-Ext+Grails application here (http://www.brentryan.com/client) <-- Doesn't work sometimes because my IP address changes and too lazy to setup dynamic DNS. This application has complete separation between the client and server because the client makes RESTful like Http request to the grails back end and the grails server app returns JSON responses when needed. In this example I'm also generating charts using JFreeChart from the grails backend and displaying them in the GWT client.

Example application login/password
username: admin
password: admin

Email if you have any questions brent.ryan@gmail.com

Source code for this example can be found here

Pre-built client and server war files can be downloaded:
Download --> client
Download --> server

Update: GWT-Ext 2.0 was released and requires much of these api's to be updated. Check out the live demo. I think it's very impressive.