144
Chapter 8: Using Flash Remoting for Microsoft .NET
Flash Remoting contains four service adapters for .NET technologies:
•
ASP.NET adapter
•
ADO.NET data-binding adapter
•
Web services adapter
•
Assembly (with the .dll extension)
Flash Remoting for .NET requires the .NET Framework SDK to be installed. To check whether
you have the .NET Framework installed, open the Windows Control Panel and double-click the
Add/Remove Programs icon. In the Add/Remove Programs dialog box, look for Microsoft .NET
Framework SDK. If you do not see it, go to the Microsoft website to download the SDK:
http://
msdn.microsoft.com/library/default.asp?url=/downloads/list/netdevframework.asp
.
Where Flash Remoting fits into the Microsoft .NET framework
When embedded in ASPX pages with other server controls that render HTML, a Flash
application that uses Flash Remoting becomes part of the client tier of a .NET application. Flash
Remoting can be used as a custom server control in ASP.NET pages in .NET Web Form
applications, or as a namespace in .NET DLL files, code-behind class files, and web services. A
.NET assembly (flashgateway.dll), located within the local assembly cache of your ASP.NET
application, provides the Flash Remoting functionality.
To assist you in planning your Flash applications, a design pattern represents a solution to a
frequently experienced problem and provides a way to standardize coding practices across a
complex project.
Many design patterns are used in the context of a model-view-controller
architecture, in which you separate data-access functionality from the user interface and control
logic that uses that functionality.
Like an ASPX page, a Flash application represents the view portion. Flash Player 6, running in a
web browser or in stand-alone mode, is the client in which the view is rendered. The Flash
Remoting gateway is a front controller that translates interactions with the Flash-based view into
actions that server-side .NET technologies perform.
Two design patterns, the value object and
session facade patterns, can be particularly useful with
Flash Remoting. Both patterns can reduce the number of remote method calls required in a Flash
application.
You can use a value object to send a coarse-grained view of data to the server and get back
fine-grained data. For example, you can call a single method on a value object that aggregates
several method calls on several different web services. The method result is returned to the Flash
application as an ActionScript result object from which you can access data locally. This pattern
can help reduce network traffic and response time.