GAE上的REST,使用什么实现?(RESTlet,球衣,其他....) [英] REST on GAE, what implementation to use?(RESTlet, jersey, other....)

查看:92
本文介绍了GAE上的REST,使用什么实现?(RESTlet,球衣,其他....)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人有在GAE上使用REST的经验吗?也许你可以建议一些轻量级的REST实现。
我发现RESTlet说他们有GAE优化的实现。 RESTlet-GAE
有人试过这个吗?

解决方案

我目前使用GAE加 Restlet 2.0M6 为Goolge Apps域特定的业务项目,并发现它非常有用。
与Google帐户和数据API的集成很容易完成,原因很明显。
但是我无法获得与Restlet捆绑在一起的XStream库,因此我使用非常直观的简单框架而不是对象序列化。
Restlet的另一个缺点是缺乏JSP集成,如果您不想使用更多重量级模板方法,这是不幸的。
到目前为止,我已经使用XSLTransformations来呈现可浏览的HTML表示,但我还没有完全满意,并且一直在寻找建议。


$ b 更新



我现在使用撒克逊来在服务器上转换xml。 这是一个很好的教程,介绍如何在App Engine中使用它。它在Jython中,但不是很难转换。



Update2



xslt方法太重了,我对Lift框架中的helper包采取了一种不同的方法来启用丰富的 xhtml模板/绑定。不过,这种方法基于Scala。

Have somebody experience with using REST on GAE? Maybe you can advise some lightweight REST implementation for this. I found that RESTlet said that they have GAE optimised implementation. RESTlet-GAE Anybody try this?

解决方案

I am currently using GAE plus Restlet 2.0M6 for a Goolge Apps Domain specific business project and find it very useful. Integration with google Accounts and Data Api is easily done for obvious reasons. However I could not get the XStream lib that is bundled with Restlet to work properly, so I use the very intuitive Simple framework instead for object serialization. Another disadvantage of Restlet is its lack of JSP integration, which is unfortunate if you do not want to use more heavy-weight templating approaches. So far I have used XSLTransformations to render browsable html representations, but am not fully satisfied with it yet and always looking for suggestions.

Update

I am now using Saxon to transform xml on the server. This is a good tutorial on how to use it with App Engine. It is in Jython but not too hard to convert.

Update2

When the xslt approach is too heavy, I take a different approach with the helper package from the Lift framework to enable enriched xhtml templating/binding. This method is based on Scala however.

这篇关于GAE上的REST,使用什么实现?(RESTlet,球衣,其他....)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆