Accessibility
 
Home / Developer Center / Flash Communication Server Developer Center /

Flash Communication Server Article

Icon or Spacer Icon or Spacer Icon or Spacer
Srinivas Manapragada
 
Srinivas Manapragada
Senior Engineer
Macromedia
 
Giacomo Guilizzoni

Giacomo Guilizzoni
QA Engineer
Macromedia

 

Macromedia Flash Communication Server MX: Understanding the component framework


This document describes the Macromedia Flash Communication Server MX component framework. The client-side programming environment consists of Macromedia Flash MX and ActionScript augmented with a Communications object model (such as NetConnection, NetStream, and so on). The server-side environment consists of ActionScript for Communications (ASC files) along with an appropriate object model. Though the above environments sufficiently create a wide spectrum of applications, it takes some effort to write well-structured reusable applications. Object-oriented design—along with a set of reusable components—helps you develop such applications.

Macromedia Flash Communication Server MX components provide common functionality that you can use to build a large number of applications on top of the Macromedia Flash Communication Server MX Component Framework. You can use this framework to build additional components or to extend the functionality of existing components.

The Macromedia Flash Communication Server MX team realized they needed a framework when they started to create real-world applications and realized it was important to split the server-side code into reusable modules, similar to the way that Macromedia Flash MX components do on the client side.

 
Below is an example of how developers wrote server-side scripts before the framework was developed:
 

application.onConnect = function(client)
{
// some code for component A
application.nextIDA++;
// ...

// some code for component B
application.nextIDB++;
// ...

application.acceptConnection(client);
//more code for A
//more code for B
}
Client.prototype.methodForA = function()
{
// some code for a client-to-server call related to component A
}

Client.prototype.methodForB = function()
{
// some code for a client-to-server call related to component B
}

 
It's immediately apparent that this code is not scalable, reusable, nor very readable.
 
The framework was created to overcome these issues. Doing so made it possible to create the Macromedia Flash Communication Server MX Components.
 
Sample files
Before you begin, download the source files for this tutorial by visiting the Macromedia Flash Communication Server MX Components page. Scroll to the bottom to begin downloading the components. Open up the files to follow along with the concepts presented in the pages below.
 
This tutorial covers the following topics:
·
Framework design goals
·
Framework implementation architecture
·
Reviewing the methods
·
Conclusion: A glimpse of the future
 
 
 

About the authors
Srinivas Manapragada is a member of the Macromedia Flash Communication Server MX team. He has been building large-scale enterprise systems, scientific visualization applications and 3D rendering toolkits for most of the last decade. Most recently he has been working on a distributed testing system for Macromedia Flash Communication Server MX capacity testing, components, and scalability. He has finally eschewed his C++/Java roots and embraced JavaScript wholeheartedly.

Giacomo 'Peldi' Guilizzoni (a.k.a. peldi.com), has been programming for more than half of his life (since age 12), and just can't get enough. He gets excited about every aspect of computer science, from assembly languages to graphic design, from the inner workings of compilers to new-media art. Raised in the fertile grounds of Bologna, Italy, he fell in love with Macromedia products while doing an exchange program at UC San Diego. A long-time ultimate player, he created and maintains Ultilinks to share his passion about the sport.