This book provides a quick introduction to developing applications for the public Alpha 1 build of Adobe Apollo, a new cross-platform desktop application runtime. While Apollo allows both Flash- and HTML-based application development, this book focuses on building Apollo applications using the Adobe Flex Framework.
The book gives an overview of Apollo, shows how to set up your development environment, and discusses new Apollo functionality and APIs. Once you finish reading, you should have a good understanding of what Apollo is and how to build Flex-based applications for it.
The Apollo runtime allows developers to leverage a number of web technologies to deploy web applications to the desktop. Indeed, there are so many technologies, that it can be difficult to keep track of them all. The table below lists the terms used in the book, and what is meant by each one:
The cross-platform desktop runtime that enables the running of Apollo Applications.
An application built with Flash, HTML and/or PDF that runs on top of Apollo.
Any content contained within a SWF 9 file format that runs in the Flash Player or Apollo.
The ECMAScript-based programming language used to program Flash content. Unless otherwise noted, all mentions in this book refer to ActionScript 3.
Standard web-based markup language used to create and layout web pages.
Web-based implementation of ECMA Script used to program content within HTML applications.
Portable Document Format that allows for seamless distribution and display of electronic documents.
An XML- and ActionScript-based Framework designed to make developing Flash-based Rich Internet applications easy. All discussions of the Flex Framework in the book refer to Flex 2.0 or greater.
An Eclipse-based IDE used to build Flash-based Rich Internet Applications using Flex and ActionScript.
This book gives a general overview of what Apollo is, shows how to set up your development environment to start building applications, focuses on a couple of the new Apollo APIs (HTML and File), and finally, shows how to do a number of common programming tasks within Apollo.
As a general rule, features and functionality already in the alpha build are relatively stable and should not change radically (although they may be tweaked based on developer feedback). Any details discussed around unimplemented features and functionality are much more tentative and more likely to change in future builds.
It is also important to note that the Alpha 1 build of Apollo is not feature complete, and a number of significant Apollo features have not been implemented and/or included in the build.
The list below contains a partial list of features and functionality included in the Apollo Alpha 1:
Mac support (OS X 10.4 (Intel and PPC)
Windows support (Windows XP and Windows Vista Home Premium Edition)
File I/O API
All functionality within Flash Player 9, including complete network stack
Windowing APIs (not complete)
Command-line tools (ADL and ADT)
HTML within Flash content
Top-level HTML applications
Flex Builder and Flex Framework support for authoring Apollo application
Application command-line arguments
The list below contains a partial list of features planned for Apollo 1.0. These were not included in Alpha 1.
Cross-platform menu API
Right-click and contextual menu control
Full HTML support
Offline data API
Rich clipboard access
File type association
We will highlight any features that we know may change in future builds.
As the previous section shows, the Apollo Alpha 1 build is far from feature complete, and some the the features are only partially implemented. Thus, the implementation of specific features or availablity of any particular feature is subject to change dramatically between the Alpha build and 1.0 release.
This also applies to the information within this book. The book was written before the Alpha 1 build was finalized and thus it is possible that some of the APIs or features may have changed between those times. This is particularly the case with API names. If something isn’t working as the book suggests it should, make sure to check the online documentation, which will always have the latest information on the Alpha 1 APIs.
You can find the latest information and documentation on Apollo at:
We hope that this book is for you, but just to be sure, let’s discuss some of the assumptions that we made, as well as what type of developers the book is targeted at.
The book assumes that the reader has at least a basic familiarity with creating Flash-based applications and content using the Flex Framework and ActionScript 3.0.
This book is for developers interested in leveraging the Flex Framework to build and deploy Flash-based applications to the desktop via Apollo. If you don’t have any experience with developing with the Flex Framework, then we suggest that you at least view some of the Flex introductory information and videos available at:
This book contains the following chapters and appendixes:
General overview of what Apollo is, and the types of applications it targets.
Tips on starting your Apollo development, and the steps toward creating your first Apollo application.
Provides an introduction to the File API within Apollo, and how to use both synchronous and asynchronous APIs.
Provides tips and tricks for accomplishing common tasks within Apollo applications, presented in the O’Reilly Cookbook format.
Provides a list of new or modified Apollo APIs added to ActionScript.
Provides a list of Apollo-specific command-line tools and their usage options.
This book can be used both as an introduction to and overview of Apollo, as well as a step-by-step guide to getting started with Apollo application development. While it may be tempting to jump ahead to specific sections, it is strongly suggested that you are least read the first two chapters, which provide an overview of Apollo, and discuss how to set up your development environment for building Apollo applications. This will make it much easier to then jump into the specific areas of Apollo functionality in which you are interested.
Once you have read through the book and understand the basics of how to build a Flex-based Apollo application, then you can use it as a reference, referring to specific sections when you need to know how to tackle a specific problem. In particular, the File, HTML, and Cookbook sections should prove useful as you develop Apollo applications.
Finally, this book is just an introduction to Apollo and does not cover all of the features and functionality included within it. It is meant to complement, but not replace, the extensive and in-depth documentation on Apollo provided by Adobe. Try to at least glance over the Apollo documentation to make sure that you are familiar with all of the APIs and functionality not covered in this book.
The following typographical conventions are used in this book:
Indicates menu titles, menu options, menu buttons, and keyboard accelerators (such as Alt and Ctrl).
Indicates new terms, URLs, email addresses, filenames, file extensions, pathnames, directories, and Unix utilities.
Indicates commands, options, switches, variables, attributes, keys, functions, types, classes, namespaces, methods, modules, properties, parameters, values, objects, events, event handlers, XML tags, HTML tags, macros, the contents of files, or the output from commands.
Constant width bold
Shows commands or other text that should be typed literally by the user.
Constant width italic
Shows text that should be replaced with user-supplied values.
This work, including all text and code samples, is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 2.5 License.
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/2.5/; or, (b) send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.
You can find more information on Creative Commons at http://www.creativecommons.org.
You can always find the latest information about this book, as well as download free electronic versions of it from the book’s web site at:
Although Apollo is a new technology, there are already a number of resources where you can find more information on Apollo and Rich Internet Application development.
Primary web site for information, downloads, and documentation of Apollo:
Official Apollo FAQ answering common questions about Apollo:
Developer Center with articles, information, and resources on developing Applications for Apollo:
Apollo ActionScript 3 API Reference:
Complete Apollo Documentation:
Official Adobe Forum for discussing Apollo:
Mailing list for discussing Apollo application development:
Mike Chambers’ weblog. This author and member of the Apollo team posts frequently on Apollo:
Apollo Smart Category that lists any discussions about Apollo within the Adobe online development community:
Developer Center with articles, information, and resources on working with the Flex Framework:
Weblog run by Ted Patrick, with frequent posts on Flex development issues:
Popular mailing list for discussing development using the Flex Framework:
Ryan Stewart’s weblog, which focuses on the latest developments in the world of Rich Internet Applications:
Please address comments and nontechnical questions concerning this book to the publisher:
|O’Reilly Media, Inc.|
|1005 Gravenstein Highway North|
|Sebastopol, CA 95472|
|800-998-9938 (in the United States or Canada)|
|707-829-0515 (international or local)|
We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at:
For more information about our books, conferences, Resource Centers, and the O’Reilly Network, see our web site at:
Mike Chambers has spent the last eight years building applications that target the Flash runtime. During that time, he has worked with numerous technologies including Flash, Generator, .NET, Central, Flex, and Ajax. He is currently the senior product manager for developer relations for Apollo. He has written and spoken extensively on Flash and Rich Internet Application development and is coauthor of Flash Enabled: Flash Design and Development for Devices as well as Generator and Flash Demystified.
Mike received his Masters in International Economics and European Studies from the John Hopkins School of Advanced International Studies (SAIS) in 1998.
When he is not programming, Mike can be found playing Halo 2, trying to recover from his World of Warcraft addiction, or playing with his two daughters, Isabel and Aubrey.
Rob Dixon began developing Flash applications in 1998, back when Rich Internet Applications weren’t nearly as well off. He is presently the Content Architect for the Platform Documentation group at Adobe. He developed sample applications and documentation for products including Apollo, ActionScript, Flash Player, and Central. He helped write Programming ActionScript 3.0 and the ActionScript Language Reference.
In previous lives he programmed video games, designed web sites, built enterprise software using Java and .NET, and spoke at many software development conferences. He wrote a book on CASE software back when CASE was all the rage.
On weekends you can usually find him hiking or biking just generally cruising around in Marin County, California, if you know just where to look. Or if you attach a homing device to his jacket or something.
Jeff Swartz first worked at Macromedia (now Adobe Systems) in 1992 and has participated in a number of multimedia and web software projects. He is currently the lead technical writer for the Apollo project. Jeff received a bachelor’s degree in Computer Science and Mathematics from the University of Illinois at Urbana-Champaign in and studied at the Edinburgh University Department of Artificial Intelligence.
Audiences around the San Francisco Bay Area have tolerated Jeff’s artistry on the trombone. He has served as Big Frank, a dancing hot dog, for Vienna Beef Ltd.
The authors would like to thank Mark Nichoson from Adobe and Steve Weiss, Phil Dangler, and Mary Brady from O’Reilly for helping make the book possible in an incredibly short amount of time.
Thank you to everyone on the Apollo team for all of the dedication and hard work in getting a 1.0 runtime out the door. Particular thanks to Chris Brichford, Ethan Malasky, Stan Switzer, and Oliver Goldman (all on the Apollo team) for reviewing and providing feedback on the book.