Accessibility

Flex Article

 

Data Push Techniques using Flex and Flash Communication Server


Michael Labriola

Michael Labriola

www.digitalprimates.net

Table of Contents

Comments
Created:
27 June 2005
User Level:
Advanced

Macromedia Flex and Flash Communication Server (FCS) continue to provide the foundation for a new level of Rich Internet Applications. Rapid development, improved user experience, real-time collaboration, streaming audio and video, and data push technologies are a few of the features catching attention within the development and enterprise communities.

In this article, I use data push technology to synchronize the position of graphical elements and send messages to users from Flash Communications Server. Ultimately, the techniques presented within demonstrate three ways to keep any type of data synchronized on client applications without the need for a user to refresh or manually retrieve new data. Whether applied to a real-time scheduling system, transaction monitoring, or ensuring that the latest sports scores arrive on your desktop real-time, this technology is useful in any application where you need to keep data constantly up to date and synchronized across many users. Specifically, you will learn about:

Shared Objects

  • Pushing data changes to the client
  • Structuring Data for performance considerations

Remote Methods

  • Shared Object Send
  • Client Call

Macromedia Flex and Flash Communication Server are very powerful tools for developers; however, it requires time and effort to use either to their fullest potential. Therefore, many of the suggestions and explanations I provide are simplified to give you access to concepts for integrating push technology into your application.

In this article, you will build a virtual horse race sample application. The application contains a Macromedia Flex client and a server application that runs on Macromedia Flash Communication Server. FCS hosts the race and tracks each horse’s position on the race track. The client application, written in Flex, displays the horses and indicates their progress. Multiple users can watch the race in real-time. I encourage you to run the examples from multiple computers when possible. This example provides basic knowledge for you to understand and start developing data push applications.

Requirements

To complete this tutorial you will need to install the following software and files:

Macromedia Flex

Macromedia Flash Communication Server MX

Tutorials and sample files:

Prerequisite knowledge:

  • Familiarity with the basics of assembling a Flex Application. If you have none, read "Developing Rich Clients with Macromedia Flex" by Alistair McLeod and Steven Webster.
  • You will use two classes I referred to in a previous article, "Integrating Remote Shared Objects with Flex and Flash Communication Server." You should be comfortable using these classes before continuing.

About the author

Michael Labriola is a Founding Partner and Senior Consultant at Digital Primates, Inc. He has been developing Internet applications since 1995 and has been working with Flex since the 1.0 beta program. Michael worked as an author and technical editor on the Flex 2:Training from the Source book.