Chapter 7. Exchanging Data with Outside Services

[ LiB ]  

graphics/187fig01.gif

This chapter covers advanced ways to exchange data with application servers and web services. In Chapter 6, "Basic Data Exchange," you actually saw two ways to import and export data (using the LoadVars object and standard XML). The primary limit with both of those approaches is that data must always travel as strings. That is, when you import a number, it arrives in Macromedia Flash MX 2004 as a string. If you send a number out to an application server, it turns to a string. This is a real pain when you consider the work involved in parsing arrays and generic objects that you pass back and forth. This chapter shows two ways to exchange data that requires no parsing. Namely, Flash Remoting's protocol (Action Messaging Format or AMF) and web services (Simple Object Access Protocol or SOAP). Additional benefits include AMF's efficiency and performance features and SOAP's common data format.

In addition to a better way to exchange data, this chapter covers the new data management components that ship with Flash MX Professional 2004. These offer direct access to web services without the need for Flash Remoting. In addition, the data management components include powerful yet simple ways of binding imported data to visual displays (such as onscreen text) and even tracking changes so that you can send updates back to a database efficiently .

This chapter covers the following topics:

  • How to pass data between application servers and Flash using Flash Remoting

  • How to use the data components found in Flash MX Professional 2004

  • How to use the Component Inspector to define schemas and set up bindings

  • How Flash Remoting compares to Flash's native SOAP support

Note

What Do You Need?

This chapter covers tools that you may need to install or purchase separately. Specifically, Flash Remoting can be installed on several different application serversalthough it comes free with ColdFusion MX. The 30-day trial of ColdFusion is perfectly suitable because after the trial period you can continue to use it in a limited manner as the "production version."

Flash MX Professional 2004 is required to use the data management components. This gives you direct access to web services as well as data binding. Actually, any time you see the Component Inspector's Bindings or Schema tab, you'll know you're looking at the pro version.

Realize that even if you only have the standard edition of Flash, this chapter can give you a clear idea of what the pro version offers. If your app needs to perform the sorts of tasks demonstrated here, you owe it to yourself to get the pro version. That said, you can still do lots of things with just the standard version, too.


[ LiB ]  


Macromedia Flash MX 2004 for Rich Internet Applications
Macromedia Flash MX 2004 for Rich Internet Applications
ISBN: 0735713669
EAN: 2147483647
Year: 2002
Pages: 120

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net