Chapter 16. Client Data Communication

Flex applications are capable of many types of data communication, from the simple to the complex. Often when we think of data communication in Flex applications we think of client/server communications such as remote procedure calls (RPCs). However, some types of data communication occur entirely on the client side, and these types are the subject of this chapter.

At a minimum, all Flex applications require a client-side element in the form of a .swf file running in Flash Player. Some Flex applications even use several .swf files running in one or more instances of Flash Player on the client machine. The client-side portion of a Flex application is capable of several types of client data communication intended for a variety of purposes.

There are three main ways in which a Flex application can run data communications on the client:

Local connections

A local connection allows two .swf files to communicate as long as they are running on the same client machine at the same time. The .swf files can be running in two different instances of Flash Player. They can even be running in different host environments. For example, one .swf can be running in a web browser while another is running embedded within an executable running on the desktop. The .swf files can even communicate while served from different domains if configured correctly.

Shared objects

Local shared objects allow the application to store and retrieve persistent data on the client machine. ...

Get Programming Flex 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.