开发者

GWT contacting RESTful API

I am in the middle of developing my first GWT application which will consume data from a RESTful API.

What I am trying to figure out is the best way to structure my entire application. Should the GWT client side make contact with Java server-side which then contacts the API or should GWT itself just contact the API directly?

I have been watching Ray Ryan at Google I/O 2009 and his stuff makes a lot of sense开发者_开发百科 but I am not sure if I am adding in a whole unnecessary layer by having Java server-side code when it could just contact the API directly.

Thanks in advance.


Take a look at Restlet, which has a hybrid approach: it supports both REST(JSON, XML) and GWT serialization in the same package. So you don't have to write two different backend RPC layers.

http://wiki.restlet.org/docs_2.0/13-restlet/21-restlet/318-restlet/303-restlet.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜