是什么在GWT调用,使2的用户界面保持一致? [英] What does it call in GWT to make 2 UI consistent?

查看:120
本文介绍了是什么在GWT调用,使2的用户界面保持一致?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到了谷歌I / O的视频,发现GWT UI是客户端之间非常一致的一个例子。您可以保存,添加,拖动和客户端之间的下降几乎实时的。我现在不明白这个基本的(在GWT,​​我认为它实现彗星),所以有任何人都可以给我一个术语或定义呢?这样我就可以得到它在谷歌的更多信息?

I saw a video of Google I/O and found an example of GWT UI being very consistent between clients. Which you can save, add, drag and drop in almost real time between clients. I currently don't understand the basic of this (In GWT, i think it implement Comet), so is there anyone can give me a term or definition for this? so I can get it on Google for more information?

非常感谢你。

推荐答案

OK,我想你在找什么在名字的彗星,服务器推送,反向阿贾克斯(仅举几例 - 在这个问题上做研究时,他们都意味着同样的,可能会有所帮助)。总之,它描述了当的服务器的初始化连接到一个模型/情况的客户的(通常情况下,它是反过来)。当然,由于这是客户端,它实际上没有监听连接,它使用一些技巧,使其显得如此 - 像长轮询(试图保持与服务器的连接打开,只要有可能,等待服务器有新的数据要发送到客户端。最大连接时间后,客户端立即重新连接如此这般)。这是一个非常酷的功能,一个正确使用才能真正改善用户体验的时候。

OK, I think what you are looking for is known under the names Comet, Server Push, Reverse Ajax (to name a few - they all mean the same, might be helpful when doing research on this subject). In short, it describes a model/situation when the server initiates the connection to the client (normally, it's the other way round). Of course, since this is the client side, it's not actually listening for connections, it's using some tricks to make it appear so - like long polling (trying to keep the connection with the server open for as long as possible, waiting for the server to have new data to send to the client. After the maximum connection time, the client immediately reconnects and so it goes). It's a very cool feature, one that when used properly can really improve user experience.

至于这一概念的实现:

  • 火箭GWT 拥有的远程模块
  • cometd 是一种流行和​​老牌竞争对手;)
  • 阿贾克斯推进引擎是一个相对较新的 - 他们塑造自己的服务器(很好用C语言编写),这可能会或可能不会提供比其他解决方案更好的性能,不足之处是在服务器端可能会很难实现(通过SpiderMonkey的编写C或服务器端JavaScript模块)。 注意:的APE的服务器的只能在Linux,BSD或Mac OS X上运行
  • NGiNX_HTTP_Push_Module - 我最喜欢的,因为他们的协议是最简单的/清洁的,他们使用nginx的,这意味着没有额外的服务器上运行(和不需要的Java服务器 - 对于我这样的人并不在服务器端使用Java谁有用)。该协议是那么容易,一台纯GWT实现应该很容易写(事实上,这是我在做什么)。
  • rocket-gwt has the Remoting module for it
  • cometd is a popular and a veteran competitor ;)
  • Ajax Push Engine is a relatively new addition - they fashion their own server (nicely written in C), which may or may not offer better performance than other solutions, the downside is that the server side might be harder to implement (either write modules in C or server side JavaScript through SpiderMonkey). Note: the APE server can only be run on Linux, BSD or Mac OS X.
  • NGiNX_HTTP_Push_Module - my favorite, because their protocol is the easiest/cleanest, they use nginx which means no extra server running (and no Java server needed - useful for people like me who don't use Java on the server side). The protocol is so easy that a pure GWT implementation should be easy to write (in fact, that's what I'm doing).

根据您的服务器端,你有很多选择 - cometd是一个坚实的解决方案,但他们使用的贝叶协议是一个小的噩梦,TBH。我试过APE(阿贾克斯推进引擎)几个月前,但当时他们没有SpiderMonkey的/ JavaScript的支持却只有Mootools的在客户端,因此与GWT的经历不太好。纵观项目现在,它更成熟,有很多已经完成(对他们承诺的事情;))。我喜欢NGiNX_HTTP_Push_Module纯粹是最好的,因为它似乎是最轻的一群 - 两个协议,它使用(Nginx的是知名的快,能够处理许多连接在时间服务器 - 这是使用彗星时,这是非常重要的,因为你有许多客户端连接上挂的时候,从服务器等待数据)。

Depending on your server side you have many options - cometd is a solid solution, but the Bayeux protocol they use is a little nightmare, TBH. I've tried APE (Ajax Push Engine) some months ago, but at that time they didn't have SpiderMonkey/JavaScript support yet and only Mootools on the client side, so the experience with GWT wasn't so good. Looking at the project now, it's more mature and a lot of has been done (of the things that they promised ;)). I like NGiNX_HTTP_Push_Module the best purely because it seems the "lightest" of the bunch - both protocol and the server it uses (nginx is known for being fast and able to handle many connections at time - something which is very important when using Comet, since you'll have many clients "hanging" on connections all the time, waiting for data from the server).

呼,对不起文本墙,希望这将是有益的(希望这就是你要找的人:D)。

Phew, sorry for the wall of text, hopefully it will be helpful (and hopefully that's what you were looking for :D).

这篇关于是什么在GWT调用,使2的用户界面保持一致?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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