在 Flex 应用程序中更改值时实时传播 DataGrid / ArrayCollection

发布于 2024-09-02 20:59:23 字数 324 浏览 10 评论 0原文

我看过很多演示 blazeds 和 flex 之间集成的截屏视频,还有一些 lcd 教程,无论是否是模型驱动的。

我发现其中一些演示者会打开 2 个浏览器,一旦您更改网格中的一个值,它就会传播到呈现数据的所有其他网格。

我想知道这是如何完成的,以及如何重现。

此功能是否取决于 Edge / LCDS 解决方案?我不这么认为,但我从未见过一些解释它的代码。

我觉得它可能依赖也可能不依赖 JMS / MQ / 消息传递协议,或者这是否是同一服务结果的实例之间的某种双向同步和集合传播。

感谢您的任何意见。

干杯,

埃尔纳尼

I've seen a bunch of screencasts demonstrating the integration between blazeds and flex, also some lcds tutorials, model driven or not.

I've seen that some of them the presenter opens 2 browsers and once you change one value in a grid, it propagates to all other grids that presents the data.

I am wondering how the heck this is done, and how to reproduce.

Does this feature depends of the Edge / LCDS solution? I don't think so, but I've never seen some code explaining about it.

I feel it may or may not rely on JMS / MQ / messaging protocols or if this is some sort of 2 way sync and propagation of collection between instances of the same service result.

Thanks for any inputs.

Cheers,

Ernani

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

喵星人汪星人 2024-09-09 20:59:23

您可以使用 BlazeDS 和 LiveCycle Data Services 来实现此功能。 BlazeDS 提供远程和消息传递功能(消息传递功能允许您在客户端之间同步数据),LCDS 扩展了 BlazeDS,添加了新功能,如数据管理(生产力改进)、PDF 生成、用于处理 DMZ 区域的 EDGE 服务器)、 MDA 开发、门户集成等。它还添加了一些高级消息传递功能,如消息合并、限制、可靠性。

BlazeDS 是免费且开源的,在我看来是一个强大的解决方案,如果您想在客户端之间同步数据,您可以使用它。 LCDS增加了很多东西,但是LCDS客户应该有很大的预算。

它是如何运作的?此功能背后没有 JMS(但是 BlazeDS 可以与 JMS 提供程序集成,因此您可以在浏览器中拥有一个客户端,而第二个客户端运行 SWING 应用程序)。相反,服务器上有一些消息队列和发布者-订阅者图。为了将数据从客户端推送到服务器,有多种选择,更高级的选项仅在 LCDS 上可用:HTTP 轮询、HTTP 长轮询、HTTP 流、RTMP 套接字(仅限 LCDS)。所有这些都在

如果您想查看一些代码,请下载 BlazeDS 并查看示例中,有几个显示消息传递功能的示例。下载中还捆绑了一个 tomcat 服务器,并且示例已部署在其中。

You can implement this feature both with BlazeDS and LiveCycle Data Services. BlazeDS provides remote and messaging features (the messaging features is the one allowing you to synchronize the data between the clients), LCDS extends BlazeDS adding new features like data management (productivity improvements), PDF generation, EDGE server for dealing with DMZ zones), MDA development, portal integration etc. It also adds some advanced messaging features like message conflation, throttling, reliability.

BlazeDS is free and open source and in my opinion a robust solution, you can use it if you want to synchronize the data between clients. LCDS adds a lot of things, but the LCDS customers should have a large budget.

How does it work? There is no JMS behind for this feature (however BlazeDS can integrate with a JMS provider so you can have one client in broswser and the second one running a SWING application). Instead there are some message queues on the server and a publisher - subscriber graph. In order to push the data from the clients to the server there are several choices, the more advanced are available only on LCDS: HTTP polling, HTTP long polling, HTTP streaming, RTMP sockets (LCDS only). All of them are described in details on Damon blog.

If you want to see some code go and download BlazeDS and take a look on the samples, there are several ones showing the messaging features. Also there a tomcat server is bundled in the download, and the samples are already deployed in it.

心清如水 2024-09-09 20:59:23

为此,您需要在客户端和服务器之间保持开放的套接字连接,以便服务器可以将数据推送回客户端。

我相信 RTMP 协议用于这种双向通信。

据我了解,这是通过 BlazeDS 使用 LiveCycle Data Services 的主要原因。与 GraniteDS 一样,WebORB 也具有推送功能。我还看过使用 ColdFusion 完成此操作的演示。

如果您无法使用这些选项,那么您将不得不对远程服务器进行某种轮询。

不幸的是,我没有具体的代码示例可以分享。

To do this you need to keep an open socket connection between the client and the server so that the server can push data back to the client.

I believe that the RTMP protocol was used for this two-way communication.

I understand that this is the primary reason to use LiveCycle Data Services over BlazeDS. WebORB also has push functionality, as does GraniteDS. I've also seen demos where this is done with ColdFusion.

If none of those options are available to you, you're stuck doing some kind of polling to the remote server.

Unfortunately, I do not have specific code samples to share.

尾戒 2024-09-09 20:59:23

可以在此处找到展示如何使用 WebORB 执行此操作的简单示例:
http://www.kensodev.com/ 2009/11/01/synchronize-client-application-using-flexweborb-net/

该示例基于 WebORB 3 for .NET; WebORB 4 现已推出,适用于 .NET 和 Java。

要点是:使用 WebORB 非常简单,它是免费的(尽管也提供付费企业版)。但愿任何人都不会为了获得此功能而花 3 万美元购买 LCDS。

--- Jim Plamondon,Midnight Coders(WebORB 的创建者)

A simple sample showing how to do this using WebORB can be found here:
http://www.kensodev.com/2009/11/01/synchronize-client-application-using-flexweborb-net/

That sample is based on WebORB 3 for .NET; WebORB 4 is now available, for both .NET and Java.

Point being: This is brain-dead simple using WebORB, which is FREE (although a paid Enterprise version is also available). God forbid that anyone should shell out $30K for LCDS just to get this feature.

--- Jim Plamondon, Midnight Coders (makers of WebORB)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文