HttpService 与远程对象

发布于 2024-09-04 17:38:11 字数 170 浏览 4 评论 0原文

我有一个 Flex 应用程序,需要将实时数据显示到聊天室和数据网格中。

早期,我们使用 Httpservices 将实时数据和历史数据显示为图表和数据网格。但现在我们要将 Httpservice 替换为远程对象。

那么一般哪些地方需要改变。我对远程对象有一点了解。

谢谢, 拉维

I have a flex application and need to show the real time data into the chatrs and datagrids.

Eralier we are used Httpservices to showing the real time data and historical data into charts and datagrids. But now we are going to replace the Httpservices to remote objects.

So which places generally need to change. I have a little bit idea about remote objects.

Thanks,
Ravi

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

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

发布评论

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

评论(2

梦回梦里 2024-09-11 17:38:11

如果您需要显示实时数据(或“接近实时”),您应该使用某种推送机制 - 查看 BlazeDS 并阅读有关轮询和流的信息。

如果您只需要用远程对象替换 Web 服务,则需要将处理 xml 响应(提取数据等)的代码替换为处理远程调用返回的对象的代码。使用强类型对象不是强制性的,但它会有所帮助。

If you need to display real time data (or "near real time") you should use some kind of pushing mechanism - take a look on BlazeDS and read about polling and streaming.

If you just need to replace your webservices with remote objects you will need to replace the code dealing with the xml response (extracting data etc) with the code dealing with the objects returned by the remote calls. It is not mandatory to use strongly typed objects, but it will help.

z祗昰~ 2024-09-11 17:38:11

如果您打算用 RemoteObject 替换您的 HTTPService,有些问题您需要自己反驳。

  1. 您要实现什么框架(如果有),然后检查其 RemoteObject Invoker 标记(如果有)。

  2. 您的resultEvent 和FaultEvent 将根据您要应用的框架而有所不同。

如果您要使用 Flex 默认 RemoteObject

  1. 那么您需要将所有 HTTPService 替换为 RemoteObject 标记。

  2. 您的后端代码还需要对业务逻辑进行一些更改,这些更改应该进入方法中,并返回一个对象的functionmethod的结果。

最后一个建议。

为什么不使用远程对象,而使用 Web 服务呢?您也可以在其他地方重复使用这些组件。

更新了有关 Cairngorm 的链接

http://www.adobe.com/devnet/flex/articles/cairngorm_pt5_03.html

http://www.jeffryhouser.com/index.cfm/2007/2/19/Learning-Cairngorm-Part-3

http://www.asfusion.com/blog/entry/hello-world-cairngorm-example< /a>

http://justjoshn.com/entry/contact-manager -part-2-cairngorm-example

谢谢

If you are going to replace your HTTPService with RemoteObject, some questions you need riposte yourself.

  1. What framework are you going to implement, if any then check their RemoteObject Invoker Tag if any.

  2. Your resultEvent and FaultEvent will vary according to the framework you are going to apply.

If you are going with Flex default RemoteObject

  1. Then you need to replace all your HTTPService with RemoteObject tags.

  2. Your backend code also requires some changes with business logic should get into methods with the result of function or method returning an object.

Finally a suggestion.

Instead of going with Remote Objects, why not go with Webservice. You can re use the components somewhere else too.

Updated links about Cairngorm

http://www.adobe.com/devnet/flex/articles/cairngorm_pt5_03.html

http://www.jeffryhouser.com/index.cfm/2007/2/19/Learning-Cairngorm-Part-3

http://www.asfusion.com/blog/entry/hello-world-cairngorm-example

http://justjoshn.com/entry/contact-manager-part-2-cairngorm-example

Thanks

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