Chapter 14. Distributing Class Libraries

 <  Day Day Up  >  

This chapter discusses various techniques for sharing a group of classes (i.e., a class library ) among multiple projects and possibly multiple developers. Before we start, a warning: Flash MX 2004's class distribution features are not particularly refined; by far the easiest way to share classes is to simply distribute the source code. We'll cover this easiest case first, before we learn how to share classes without distributing source code, as you may want to do when selling a professional class library.

The term class library is a generic programming term that simply means a group of classes. Don't confuse it with a .fla file's Library, the Flash Library panel, shared libraries (used to share Library assets at authoring time), or runtime shared libraries (used to share Library assets at runtime). Each of those terms is unique to the Flash environment and not part of the current discussion.

Nor do class libraries have anything to do with the packages discussed in Chapter 9, despite the fact that both terms happen to relate to the grouping of classes. The term "class library" is just programmer jargon for an arbitrary group of classes distributed to a team or to the world at large. A package, on the other hand, is a formal, syntactic namespace in which to define a class (in order to prevent naming conflicts with other classes).

In ActionScript a class library can be distributed to other developers simply as a bunch of source .as files, in a .swf file, or in a .swc file. We'll cover all three approaches in this chapter.

 <  Day Day Up  >  


Essential ActionScript 2.0
Essential ActionScript 2.0
ISBN: 0596006527
EAN: 2147483647
Year: 2004
Pages: 177
Authors: Colin Moock

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