In my last blog, I spoke of RestLet, a server-side Java framework for REST. When I first learned of this technology, my cronies at Solertium Corporation and I fully embraced the concept, even doing some development on the open-source tool. Between then and now, I have been experimenting with client-side tools that provide reliable API through GWT to a RESTful server.
I first found GWT-REST, which if you saw my comments, I found to be pretty usable. Like the original developers of RestLet, though, I found it to have almost too much going on to make it work for me at the time. In addition, since, at the time, I have a strong code pattern that worked, it didn't make me want to go through the trouble of refactoring. After speaking with their development team, though, it looks to be strong in the future.
Since then, the RestLet guys have announced the release of a Restlet-GWT module, a port of RestLet to GWT, supported by the release of GWT 1.5. You can check out the official announcement here:
I am interested in seeing the differences between this and GWT-REST, but from my initial reading it seems that the RestLet version is an attempt at a direct port as opposed to something customized to have client-side conveniences implemented -- which I feel has strong and weak points, but the good should outweigh the bad here. I'm excited to see the implementation details, though! If you want a quick overview, the RestLet wiki provides pretty pictures and diagrams:
Again, I want to express that the RESTful method is more of an alternative to RPC than a replacement, both having benefits and drawbacks. The main drawback to RPC that has turned me to this approach is the tight client-server coupling issues and the limitations it enforces on your back-end server technologies.
My suggestion -- give Restlet's GWT module a shot. Like I said, it's an alternative, and it works right alongside RPC so it's not an either-or situation. We all have our own ways of getting the job done, but I'm always excited to hear of new developments and try them out, especially ones like these which make my job that much easier!
Thanks for your time in reading this. Feel free to comment with opinions for or against REST in GWT as I'd love to hear both sides. Also, if you'd recommend any technologies, again, feel free.
Software Developer, Solertium Corporation
- GWT-REST: http://code.google.com/p/gwt-rest/
- RestLet Wiki: http://wiki.restlet.org/docs_1.1/2-restlet.html
- RestLet with GWT: http://blog.noelios.com/2008/07/25/restlet-ported-to-gwt/
- Google Web Toolkit: http://code.google.com/webtoolkit/
- Roy Fielding explains REST: http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm
- RestLet: http://www.restlet.org/
- My previous blog: http://gogocarl.blogspot.com/2008/04/internet-alternative-to-gwts-rpc.html