开发者

Advice on writing a rich Web UI to front a RESTful HTTP API

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 w开发者_如何学Goas 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.


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!


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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜