views:

107

answers:

2

Hi all,

I've been working on a set of RESTful HTTP services implemented using Restlet in Java. Those services are currently used by a proprietary desktop application running on Windows, and by other back-end services.

My goal now is to design an Ajaxy user interface to these services that will run within the Web browser. I am aware of the plethora of existing solutions. I am pretty familiar with Scala, Java, GWT and I have some exposure to JavaScript.

The following solutions sprung to my mind and I was wondering what people in the community had experience with.

Pure client solution using GWT. Seesmic took this approach to implement the web version of their social network client (with I believe backend REST services implemented with RESTlet). I am familiar with GWT, but I find it quite verbose sometimes. I've not tried the UI binder.

Server based solution with Vaadin. I am not familiar with Vaadin, but it looks quite complete, and I could use it with Scala which is and added bonus with me.

Pure browser bases solution using JavaScript frameworks, such as jQuery, Dojo, etc.. JavaScript based solution could be quite quick to prototype, but I am a bit worried about handling the complexity as the codebase grows.

I am looking forward to hearing your opinions and real world experience.

+3  A: 

The web has its own unique requirements if you want to take full advantage of it as a platform.

Translating solutions like GWT and vaadin (built on GWT) are impressive and very powerful, but if you want a full bells & whistles interface then you should go with pure JavaScript - preferably using one of the frameworks you mentioned to help manage the complexity and browser differences.

GWT also has the disadvantage here that it supplies its own client-server communications, so you'll have a harder time of fitting it around your existing REST interfaces.

disclaimer: even GMail has to use some hand-crafted javascript!

Kevin Wright
Regarding GWT RPC which is I think what you refer to, I am not a big fan of it either. The RESTlet module for GWT looks like a better way of invoking RESTful services.
Guillaume
+2  A: 

I am currently working on a commercial app for banking that accesses Web Services through a GWT front end. The Architecture of our app is as follows. GWT with EXT-GWT on the front end, talks to Servlet Engine using GWT RPC. The Web Tier then acts as a proxy doing the Web Service Calls.
The benefit of this approach is that you can isolate the UI from the Web Services and can incorporate other features such as security, You can also call multiple web services (Also in conjunction with some DB calls) on the back end to then aggregate functionality into views.
Performance is very good except for the 15 second or so startup time at the very beginning.
The reason we went with this is that EXT-GWT provides a lot of nice widgets on top of GWT and also all our code is written in Java, which gives us type safety as well as the ability to run a debugger.

There are two downsides to EXT-GWT.
1) Initial load time.
2) Documentation could be better. (It does come with a lot of sample code)

Romain Hippeau
Thanks for the info. I would need to take EXT-GWT licensing model into account.
Guillaume
The OP did ask for RESTful solution though. An RPC library is definitely not that.
Darrel Miller
@Darrel Miller - It depends on the tier, and yes you can do restful communications with GWT if you so desire
Romain Hippeau