Flash Remoting 与 ASP.Net 通信的最佳客户端架构是什么?
我们发现 ASP.Net 作为服务器后端和 Adobe Flash 作为用户界面的组合是完美的结合。
到目前为止,我们一直使用 Javascript 作为两种技术之间的通信渠道。 这很有效,但是我们希望能够来回传递对象而不仅仅是字符串变量,并且我们还希望获得更好的性能。
您可以使用多种方法进行通信:
- Javascript
- Web 服务(在 MX 中得到正确支持,在 CS3 中不受支持,不确定 CS4 是否如此)
- Flash Remoting
- 其他?
我的研究表明 Flash Remoting 是性能最好的。
在服务器上,您需要提供远程网关(Flash Remoting(999 美元)、FluorineFx、WebORB、AMF.Net)。
从客户端使用远程处理的最佳方法是什么?
问题在于 Flash 远程处理库似乎不是很好或没有得到很好的支持。 他们在 MX 中,而不是在 CS3 中,还不确定 CS4 中。
Flex 显然具有出色的远程支持,但是我们喜欢在 Flash 中制作自由格式 UI 的能力,而不受 Flex 控件的限制。 我已经看到了在 Flex 中嵌入 flash swf 的建议 - 但我不愿意引入另一层。 我没有广泛使用 Flex,所以我可能在这里遗漏了一些东西。
有人有这方面的经验吗? 我应该尝试将我的 swf 嵌入到 Flex 中吗? 或者 CS4 是否提供了足够好的远程处理支持?
谢谢。
鲍比——这是个好主意。 JSON 或许可以解决这个问题。
悬崖.meyers - 我们已经在服务器上使用氟。 问题在于在客户端上使用Flash(而不是Flex)(见上文),并且Flash缺乏对远程处理的良好支持。
We have found the combination of ASP.Net as a server backend and Adobe Flash for the User Interface to be an excellent marriage.
Up until now we have used Javascript as the communication conduit between the two technologies. This has worked well, however we want to be able to pass objects back and forth rather than just string variables and we also want better performance.
There are a number of methods you can use to communicate:
- Javascript
- Web Services (supported properly in MX, not in CS3, not sure about CS4)
- Flash Remoting
- others?
My research has indicated that Flash Remoting is the best performer.
On the server you need to provide a remoting gateway (Flash Remoting ($999 USD), FluorineFx, WebORB, AMF.Net).
What is the best way to use remoting from the client?
The problem lies in that the Flash remoting libraries don't seem to be very good or well supported. They were in MX, not in CS3, not sure about CS4 yet.
Flex apparently has excellent remoting support, however we love the ability to make a freeform UI in flash and not be restricted to Flex Controls. I have seen suggestions of embedding flash swf's in flex - but am reluctant to introduce another layer. I have not used Flex extensively so I may be missing something here.
Has anyone had any experience in this area? Should I try and embed my swf in flex? Or does CS4 provide good enough remoting support?
Thanks.
Bobby - That's a good idea. JSON might do the trick.
cliff.meyers - We are already using fluorine on the server. The problem lies in using Flash (NOT Flex) on the client (see above), and Flash's lack of good support for remoting.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您是否尝试过构建一个提供 JSON 服务的 Web 服务? 在采用 Flash Remoting 路线之前,我会尝试一下,看看它如何满足您的需求。
Have you tried building a Web Service serving up JSON? I would try that and see how it suits your needs before going the Flash Remoting route.
不确定您所说的良好支持是什么意思。 我们也面临这个问题并正在使用氟。 我围绕 NetConnection 对象构建了一组类。 一切运行良好,VO/DTO 对象可以正确翻译并在 Flash 中正确输入。 我遇到的唯一问题是错误对象被键入为 Object 并且显然没有有用的文档。 我们遇到的另一件事是,现在我们必须手动转码 VO/DTO 对象,而不是从相同的定义文件自动生成 C# 和 AS3 代码。
我们现在已经在两个项目中使用了它,并且没有出现任何问题。
Not sure what you mean about good support. We also faced this problem and are using Fluorine. I built a set of classes based around the NetConnection object. Everything works well and we have the VO/DTO objects translating correctly and being correctly typed in Flash. The only problem i've encountered is the fault object being typed as Object and apparently having no useful documentation. Another thing we have an issue with is right now we have to manually transcode the VO/DTO objects, rather than auto generating the C# and AS3 code from the same definition files.
We've used this on two projects now and it has worked with no hiccups.
我们已经使用 Fluorine 或 WebORB 远程网关在 Flash 中完成了多个项目。 我们遇到了一些问题(例如,我认为使用 ObjectEncoding.AMF3 存在问题),但对我来说这是最好的解决方案。 我们还使用了 JSON,这也是一个不错的选择,但不如 WebORB 或 FluorineFX(对我来说)。
也许看一下 WebORB 示例。 我认为有一些例子是用Flash而不是Flex编写的。
这基本上就是您需要做的所有事情(除了使用 registerClassAlias 注册您的类之外)。
当然,Flex 更好地支持远程处理。
查看我博客上的链接以获取另一个示例。
We have done several projects in Flash with either Fluorine or WebORB remote gateway. We had some problems (I think for instance there were problems using ObjectEncoding.AMF3) but to me it's the best solution. We also used JSON which is also a good choice, but not as good as WebORB or FluorineFX (to me).
Maybe have a look at WebORB examples. I think there are some examples written in Flash instead of Flex.
That's basically all you need to do (beside registering your classes with registerClassAlias).
Off course, Flex is better supported for remoting.
Check this link on my blog for another example.