Developer Release: GWT on Rails

Just over two weeks after the release of GWT-REST, the next layer of the Actionatr stack is ready for release.

GWT on Rails

http://code.google.com/p/gwt-on-rails/

GWT on Rails integrates GWT client side compiled JavaScript with Rails RESTful web services by providing client and resource generators, migration support, asynchronous RESTful client support, and Rake automation. A summary follows.

GWT Client Generator

Until now, building a GWT interface for a Rails project required the use of either an IDE or command line tools to build a GWT “module” which then had to be tweaked for use with Rails instead of the default embedded Tomcat server. Using Rails conventions as a starting point, the GWT client generator allows one to generate a GWT interface (or any number of them) with a single command:

script/generate gwt_client dashboard /Users/jdoe/java_libs/gwt-mac-1.4.61

Rake support is included so that cleaning, compiling, and running your hybrid project are also one-liners:

rake dashboard:compile

rake dashboard:hosted

rake dashboard:clean

GWT Resource Generator

Any ActiveRecord model can be exposed on the client side by simply running the GWT resource generator:

script/generate gwt_resource Project dashboard

Migration Support

Once the resource generator has created a client side resource/model, your ActiveRecord migrations will transparently keep everything in sync. Any fields that are added, altered or removed will likewise be updated in JavaScript-land. By generating a base class that is recreated after each migration and a corresponding model that extends this base, custom code can remain intact while the basic model changes.

GWT-REST

The GWT-REST module comes bundled with this plugin, allowing easy CRUD operations with the built in RailsJsonResourceCollection class.

More details are available on the Google Code project site. Enjoy!

Comments (1) left to “Developer Release: GWT on Rails”

  1. links for 2008-01-06 « Mike Does Tech wrote:

    […] KaBlog / Developer Release: GWT on Rails (tags: gwt rails) […]