获取通过 AMF 与 Flex UI 通信的 ASP.NET(包括 MVC)应用程序
如何让 ASP.NET(包括 MVC)应用程序通过 AMF 与 Flex UI 进行通信。 我想一次推送大约 100 多条记录,AMF 似乎是前进的方向,但似乎没有任何明显的东西。
How can I get a ASP.NET (inc MVC) application talking to a Flex UI over AMF. I am wanting to push approx 100+ records around at a time and AMF would appear to be the way forward, but there doesn't appear to be anything obvious.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果你时间紧迫,你可以使用 RemoteObject 来访问已编译的 DLL(如 WebORB - 它对于 .NET 是免费的,但你需要 Express 之上的 VS 副本来编译你想要公开给 Flex 的类)
并且以这种方式检索对象...
显然,您的对象应该有一个 DAL 就位或生成,以便您可以与数据库通信。
但我建议将 Cairngorm 用于任何数据密集型 Flex 应用程序。 它并不简单,开发也不会感觉那么快,但是一旦你理解了它,事情就会变得更加顺利,而且感觉很不错。 我可以详细说明,但有些人比我聪明得多,他们已经对此进行了深入的解释。 像您这样的人应该能够很快掌握这些概念。
以下是学习 WebORB 和 Cairngorm 的链接:
If you're pressed for time, you can just use the RemoteObject to hit a compiled DLL (like WebORB - its free for .NET, but you need a VS copy above Express to compile your classes that you want to expose to Flex)
and Retrieve the object that way...
Obviously your objects should have a DAL in place or be generated so you can communicate with your database.
But i suggest using Cairngorm for any data intensive Flex application. It isn't simple and development won't feel as fast, but once you understand it, things go alot smoother and it just feels right. I could go into the details, but there are people that are much smarter than I am that have already explained it, in depth. Someone like yourself should be able to grasp the concepts pretty quickly.
here are the links to learning WebORB and Cairngorm:
用于 .Net AMF 远程处理的 WebORB 的替代方案是 FlourineFx。 我没用过,但看起来很有趣。 我使用过WebORB,它非常强大。 它有一些很棒的代码生成工具,可以加快构建数据库驱动应用程序的过程。
An alternative to WebORB for .Net AMF remoting is FlourineFx. I haven't used it, but it looks interesting. I have used WebORB which is quite powerful. It has some great code generation tools which speed up the process of building a database driven application.
对上面答案的一个小修正:您实际上可以使用 Express 版本来编译您的程序集。 使用 WebORB,您可以简单地将 DLL 部署到虚拟目录的 /bin 文件夹中,它将负责将您的类启用为 Flex Remoting 服务。 您不需要实现任何特殊接口或使用任何特殊属性。 只需创建一个类来返回要传递给客户端的数据,将该类部署到 weborb 中并在客户端使用 RemoteObject API。 以下是入门文章的链接:
http://www.themidnightcoders.com/articles/flextodotnet .htm
One minor correction to the answer above: you can actually use the Express edition to compile your assembly. With WebORB you can simply deploy your DLLs into the /bin folder of the virtual directory and it will take care of enabling your classes as Flex Remoting services. You do not need to implement any special interfaces or use any special attributes. Just create a class that returns the data you want to deliver to the client, deploy that class into weborb and use the RemoteObject API on the client side. Here's a link to the getting started article:
http://www.themidnightcoders.com/articles/flextodotnet.htm
我肯定会检查 WebORB 和 MSMQ 支持(FluorineFX 具有相同的功能。两者都是免费的)。 您可以让WebORB监听MSMQ中的某个队列。 在 Flex 方面,您需要创建一个 Consumer 并将其订阅到该队列。 然后,WebORB 会将队列中的每条消息推送到 swf 中创建的所有消费者。 其他应用程序(例如 ASP.NET 应用程序)可以将消息放入该队列(例如序列化对象或 xml),并将其传递到您的 Flex GUI。
我在 http://blog.johlero.eu 上写了一些关于该主题的帖子。
另一个很好的例子是 http://www.themidnightcoders.com/articles/msmqtoflexdatapush.shtm< /a> 他们使用 Windows 窗体应用程序将消息发送到 Flex Gui。
列文·卡登(Lieven Cardoen)又名乔莱罗(Johlero)
I would definetely check WebORB and the MSMQ support (FluorineFX has the same functionality. Both are free). You could let WebORB listen to a certain queue in MSMQ. On the flex side you would need to create a Consumer and suscribe it to that queue. WebORB will then push every message in the queue to all the Consumers created in the swf. Other applications like your ASP.NET application could put messages in that queue (serialized objects or xml for instance) and will be delivered to your Flex GUI.
I wrote some posts on the subect on http://blog.johlero.eu.
Another very good example is at http://www.themidnightcoders.com/articles/msmqtoflexdatapush.shtm where they use a Windows Form Application to send messages to a flex Gui.
Lieven Cardoen aka Johlero