Preface
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.
Apollo Runtime Naming Conventions
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:
Name |
Meaning |
Apollo |
The cross-platform desktop runtime that enables the running of Apollo Applications. |
Apollo Application |
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. |
Flex Framework |
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. |
What This Book Covers
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)
Application installation
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
ActionScript/JavaScript Script bridging
Flex Builder and Flex Framework support for authoring Apollo application
Application command-line arguments
Application icons
The list below contains a partial list of features planned for Apollo 1.0. These were not included in Alpha 1.
PDF support
Cross-platform menu API
Right-click and contextual menu control
Full HTML support
System notifications
Offline data API
Drag-and-drop
Rich clipboard access
File type association
We will highlight any features that we know may change in future builds.
What Alpha Means
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:
http://www.adobe.com/go/apollo |
Audience for This Book
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.
What Does This Book Assume?
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.
You should be familiar with web technologies such as Flash, Flex, HTML and JavaScript, as well as general web development concepts.
Who This Book Is For
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:
http://www.adobe.com/go/flex |
Who This Book Is Not For
While it is possible to create HTML- and JavaScript-based applications with Alpha 1 of Apollo, this book does not go into any detail on HTML- and JavaScript-focused Apollo application development. If you are an HTML and JavaScript developer interested in building Apollo applications, then this book can provide a good introduction and overview of Apollo and its functionality, but you should view the Apollo documentation and articles available from the Apollo web site for a more HTML/JavaScript-focused discussion.
How This Book Is Organized
This book contains the following chapters and appendixes:
- Chapter 1, Introduction to Apollo
General overview of what Apollo is, and the types of applications it targets.
- Chapter 2, Getting Started with Apollo Development
Tips on starting your Apollo development, and the steps toward creating your first Apollo application.
- Chapter 3, Using HTML Within Flex-Based Apollo Applications
Discusses how HTML can be leveraged within Flash-based applications, and covers JavaScript/ActionScript communication via script bridging.
- Chapter 4, Using the File System API
Provides an introduction to the File API within Apollo, and how to use both synchronous and asynchronous APIs.
- Chapter 5, Apollo Mini-Cookbook
Provides tips and tricks for accomplishing common tasks within Apollo applications, presented in the O’Reilly Cookbook format.
- Appendix A, Apollo Packages and Classes
Provides a list of new or modified Apollo APIs added to ActionScript.
- Appendix B, Apollo Command-Line Tools
Provides a list of Apollo-specific command-line tools and their usage options.
How to Use This Book
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.
Conventions Used in This Book
The following typographical conventions are used in this book:
- Plain text
Indicates menu titles, menu options, menu buttons, and keyboard accelerators (such as Alt and Ctrl).
- Italic
Indicates new terms, URLs, email addresses, filenames, file extensions, pathnames, directories, and Unix utilities.
-
Constant width
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.
License and Code Examples
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.
Support and More Information
Accessing the Book Online
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:
http://www.adobe.com/go/apolloflexpocketguide |
Online Apollo Resources
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.
Apollo site
Primary web site for information, downloads, and documentation of Apollo:
http://www.adobe.com/go/apollo |
Apollo Developer FAQ
Official Apollo FAQ answering common questions about Apollo:
http://www.adobe.com/go/apollofaq |
Apollo Developer Center
Developer Center with articles, information, and resources on developing Applications for Apollo:
http://www.adobe.com/go/apollodevcenter |
Apollo coders mailing list
Mailing list for discussing Apollo application development:
http://www.adobe.com/go/apollolist |
Mike Chambers weblog
Mike Chambers’ weblog. This author and member of the Apollo team posts frequently on Apollo:
http://www.adobe.com/go/mikechambers |
MXNA Apollo Smart Category
Apollo Smart Category that lists any discussions about Apollo within the Adobe online development community:
http://www.adobe.com/go/apollomxna |
Flex Developer Center
Developer Center with articles, information, and resources on working with the Flex Framework:
http://www.adobe.com/go/flex2_devcenter |
OnFlex.org
Weblog run by Ted Patrick, with frequent posts on Flex development issues:
http://www.onflex.org |
Flex coders mailing list
Popular mailing list for discussing development using the Flex Framework:
http://tech.groups.yahoo.com/group/flexcoders/ |
Universal Desktop Weblog
Ryan Stewart’s weblog, which focuses on the latest developments in the world of Rich Internet Applications:
http://blogs.zdnet.com/Stewart/ |
How to Contact Us
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) |
707-829-0104 (fax) |
We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at:
http://www.oreilly.com/catalog/9780596513917 |
For more information about our books, conferences, Resource Centers, and the O’Reilly Network, see our web site at:
http://www.oreilly.com |
About the Authors
Mike Chambers
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.
Robert L. Dixon
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
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.
Acknowledgments
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.
Get Apollo for Adobe Flex Developers Pocket Guide 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.