你用什么客户端到服务器的通信使用GWT?你用、端到、客户、通信

2023-09-11 00:53:46 作者:世上哪有真情

GWT RPC是专有的,但看起来固体,与谷歌模式的支持,并通过每一本书和教程中,我见过提及。难道真的对GWT客户机/服务器通信电子的选择呢?你使用它,如果不为什么,你选择什么?我认为我有通用的服务器应用程序code,可容纳的RPC,EJB,Web服务/ SOAP,REST等。

GWT RPC is proprietary but looks solid, supported with patterns by Google, and is mentioned by every book and tutorial I've seen. Is it really the choice for GWT client/server communcation? Do you use it and if not why and what you chose? I assume that I have generic server application code that can accommodate for RPC, EJBs, web services/SOAP, REST, etc.

奖金问题:GWT的RPC的任何安全问题,我需要知道的。

Bonus question: any security issues with GWT RPC I need to be aware of?

推荐答案

我们主要使用的通讯三种方法:

We primarily use three methods of communications:

GWT-RPC - 这是我们的首要和prefered机制,我们用尽可能什么。这是做事情的GWT方式,而且运作非常良好。 XMLHtt prequest使用RequestBuilder - 这通常是与非GWT后端互动,我们用这个主要是为了拉,我们在运行时需要(类似服务器的静态Web内容端包含)。尤其是当我们需要用一个CMS集成是非常有用的。我们包装在一个自定义面板我们RequestBuilder code(即需要一个内容URI作为其构造函数的参数,并与URI的内容填充自身)。 表单提交使用FormPanel - 这也需要与非GWT交互后端(定制servlet),而这也正是我们目前使用做跨站点通信。我们真的不沟通跨站本身,但我们有时需要通过SSL发送非SSL页面上的数据,这是我们能够做到这一点为止(有一些黑客的唯一途径)。 GWT-RPC - This is our primary and prefered mechanism, and what we use whenever possible. It is the "GWT way" of doing things, and works very well. XMLHttpRequest using RequestBuilder - This is typically for interaction with non-GWT back ends, and we use this mainly to pull in static web content that we need during runtime (something like server side includes). It is useful especially when we need to integrate with a CMS. We wrap our RequestBuilder code in a custom "Panel" (that takes a content URI as its constructor parameter, and populates itself with the contents of the URI). Form submission using FormPanel - This also requires interaction with a non-GWT back end (custom servlet), and is what we currently use to do cross site communications. We don't really communicate "cross site" per se, but we do sometimes need to send data over SSL on a non-SSL page, and this is the only way we've been able to do it so far (with some hacks).
 
精彩推荐
图片推荐