Saturday, October 15, 2011

Moving from GWT-RPC to REST, but Taking a Pause

Today I set to create a bunch of RESTful APIs. I have been using GWT RPC earlier for my AJAX applications, but decided to switch to REST. The reasons are pretty simple:
  1. when I publish my APIs to third parties, I am going to publish RESTful APIs,
  2. for non-GWT UIs I need RESTful APIs anyway, and I don't want to maintain two sets of APIs
I really like the strict type checking I get with GWT RPC, but going forward even for GWT UIs, I will use REST.

Speaking of GWT, here is a great blog from Mr. Ganesh analyzing its pros and cons:

http://www.gmarwaha.com/blog/2011/05/09/gwt-pros-and-cons/

Highlights are: support from a great IDE, which helps with refactoring, great debugging and the advantages of Java (tools, libraries and the eco-system). One can also add: automatic image sprite, browser history management, custom UI events (I love this one - it helps with decoupling and removing dependencies), composites, one-click deployment on GAE.

Lowlights are: it is Java and it is not HTML. It has a proprietary feel.

True, GWT is not appropriate for all kinds of apps, but it is ideal for enterprise apps and large backend projects involving many developers. Also, if you are generating UIs from meta-data. You feel safe with GWT.

Coming back to REST, the HTTP response codes are really messy, but they come handy and I don't need to invent new ones.

No comments:

Post a Comment