RPC 1.0与deRPC GWT-RPC

时间:2012-04-11 10:46:10

标签: gwt gwt-rpc

我正在读一本关于GWT(Google Web Toolkit)的书,其中作者引用了RPC 1.O和deRPC之间的差异。

在我的专业项目中,对于我们正在使用的RPC调用:

com.google.gwt.user.client.rpc.RemoteService com.google.gwt.user.server.rpc.RemoteServiceServlet

在本书中,authour预先确认了以下用途:

com.google.gwt.user.client.rpc.RemoteService.RpcService(扩展RemoteService) com.google.gwt.rpc.server.RpcServlet(扩展了AbstractRemoteServiceServlet)

但是,RpcService和RpcServlet都标记为javadoc:

“实验并且可能会发生变化。请勿在生产代码中使用此内容。”

所以,基本上,有人使用RpcService和RpcServlet吗?它们之间有什么区别?

有关详细信息,请参阅StackOverflow上的此链接:When should I use RequestFactory vs GWT-RPC?

1 个答案:

答案 0 :(得分:4)

来自GWT official项目页面(位于底部):

This feature did not work out as planned, and the GWT team strongly discourages its use. Try the Request Factory feature when you have non-trivial server-domain objects.

所以最好不要使用deRPC。

相关问题