Adobe Flex is the leading technology in the industry for developing Rich Internet Applications. Adobe Flex applications run on the Flash Player which is a browser plug-in. Flash player has a penetration of 98% on the modern day browsers. Normally building a web application with Adobe Flex on the client side and .NET on the server side using webservice as a medium for the communication is very much possible.
Rather than accessing SOAP services, accessing remote objects from the server is even more powerful, fast and robust way of communicating the client to the server. Binary communication between the Flex client and .NET happens using AMF (Action message format) which is a binary protocol published by Adobe. AMF is a binary format used to serialize ActionScript objects. It is used primarily to exchange data between an Adobe Flash application and a remote service, usually over the Internet. Some of the notable advantages of AMF are:
- AMF Objects are very small using zlib.
- Fast serialization/de-serialization of objects.
- Native Types and Custom classes supported.
(Source:Ted On Flash)
Now to make the AMF communication complete with the Flex client and any sever side technology there is the need for a runtime environment which facilitates the transfer of objects from client to server and vice versa. This is where WebORB for .NET comes into play. WebORB is the presentation server from MidnightCoders which effortlessly connects client side technologies like Flex/Flash/Ajax/Silverlight with .NET Objects, XML webservices and rich media streams. WebORB can plug in to any ASP.NET application and can expose its object to client side technologies.
Configuring WebORB for .NET
The developer edition of this product is available for free which gives connection limit for 5 IPs. The setup can be downloaded from the WebORB website. WebORB for .NET version 22.214.171.124 is the stable version available for download.
IIS and .NET framework are the prerequisites before we start installation of WebORB developer edition. In the download select and run the exe to install webORB
Creating a basic Flex and .NET Remoting Application
Developing a .NET Class
Deploying a .NET DLL
Once the development of the .NET project is completed and published. Place the DLL file of the project into Inetpub\wwwroot\weborb30\bin directory. In this example the EmployeeWebOrb.dll should be put into the bin directory.
After deploying the DLL, by accessing the management tab inside the webORB console (http://localhost/weborb30/weborbconsole.html) it is possible to check if the server side code is working properly.
Go to Management -> Services tab where the list of deployed DLLs will be available:
Now click on the invoke button on the right hand side. All the values that are returned by getEmployeList() is displayed along with invocation duration which in this case is 33 millisecond. The Services inside the management console is an effective tool for the developers to check the values returned from the server side code and eventually enables fewer chances of server integration problems.
Developing a Flex application
Client side application’s logic for this example is very straight-forward. First create a flex project WebORBFlex. The mx:RemoteObject is the server-side component in the flex code that connects with the webORB to get data from the server side. The GenericDestination value provided for the property, destination is the destination of the service. This value should match to the destination entry in remoting-config.xml inside Inetpub\wwwroot\weborb30\WEB-INF\flex. The source property accepts the .Net class name that is being accessed and endpoint points the application to look for the RemoteObject destination.
Other key features of WebORB
- MultiClient support: WebORB can be used with other client side technology like Silverlight, Ajax, Flash etc.
- Real time messaging: data push, producer-consumer model, MSMQ integration, remote shared objects, message broadcast.
- Video Streaming: Streaming flash video, video broadcast, server initiated video, video recording, video chat.
- Data Management: Code generators, full CRUD operations, client synchronization, intuitive API, extensible programming model, sample test drive.
- Performance Monitoring:Server-side performance instrumentation.
(Source: Midnight Coders)
EXPENSIVE BUSINESS DECISIONS 'PROFITABLE'.
Latest posts by Gateway Technolabs (see all)
- Why Kanban Model is Best for Support and Maintenance Projects - November 14, 2017
- How Power BI is Advantageous for Deriving Business Insights? - November 10, 2017
- Gateway TechnoLabs announces its participation in MESSE NAGOYA 2017 in JAPAN - November 4, 2017