.NET and AMF

感情迁移 提交于 2019-11-30 15:38:20

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:

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.

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

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!