gwt-rpc vs rest...真的是其中之一吗? [英] gwt-rpc vs rest... is it really one or the other?

查看:28
本文介绍了gwt-rpc vs rest...真的是其中之一吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 GWT 客户端,使用 GWT-RPC 调用我的 REST 服务.为什么这些评论中的一些将 GWT-RPC 与 REST 对立起来,就好像您必须选择其中之一一样?我在客户端上使用 BOTH... GWT-RPC,它命中 REST 服务.我想使用替代方法并放弃 GWT-RPC.为什么?它很慢(与访问相同服务的 Flex 客户端相比).我查看了 RestyGWT,但它很棒的文档(讽刺)听起来好像我需要构建一个 RestyGWT 服务,我的 RestyGWT 客户端可以点击它.天哪,不,谢谢.我的服务完成了.我真的不想碰它.所以听起来一种可能的替代方法是从我的服务生成一个客户端库,并在我的 GWT 客户端中与 RequestBuilder 一起使用它来处理 JSON 到 Java 对象的编码/解码(并希望获得改进的性能).如果这不能解决问题,下一个选择是完全放弃 GWT.

I have a GWT client using GWT-RPC to make calls to my REST service. Why do some of these comments pit GWT-RPC against REST, as if you have to choose one or the other? I'm using BOTH... GWT-RPC on the client, which hits a REST service. I want to use an alternative and ditch GWT-RPC. Why? It's SLOW (compared to my Flex client that hits same service). I checked out RestyGWT but it's great documentations (sarcasm) makes it sound like I need to build a RestyGWT SERVICE that my RestyGWT client can hit. Geez, NO thanks. My service is done. I really don't want to touch it. So it sound like one possible alternative is to generate a client lib from my service and use it in my GWT client along with RequestBuilder to handle encoding/decoding of JSON to java objects (and hopefully get improved performance). If that doesn't cut it, the next alternative is to ditch GWT altogether.

推荐答案

看看 Errai JAX-RS 可以像使用 GWT-RPC 一样轻松地构建REST"客户端(几乎).

Have a look at Errai JAX-RS to build "REST" clients (almost) as easily as with GWT-RPC.

这篇关于gwt-rpc vs rest...真的是其中之一吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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