Dr. Dobb's Journal - November 2007 - (Page 37) d11gold_p6db 9/10/07 11:16 AM Page 37 AJAX, Flash, and PDF. Like the C, Java, and .NET runtimes, Adobe AIR is a set of libraries and services that enable the execution of applications. The runtime mediates between the application and the underlying operating system. It handles initialization and finalization tasks as the application starts up and shuts down, and provides the application with an API to call underlying operating system services. Adobe AIR is designed to provide a cross-platform abstraction wherever possible. For example, it provides a filesystem API that already runs on multiple platforms. Applications can be written to this API such that their code is entirely portable. At the same time, an API that only contains cross-platform abstractions can be unreasonably limiting. Thus, Adobe AIR APIs contain platform-specific capabilities where warranted, which are simply stubbed-out on platforms that don’t support them. For example, applications have an API for accessing the Mac OS Dock, but calling it won’t have any effect when running on Windows. (Applications can also query to determine which platform they are running on.) The runtime contains an embedded instance of the Flash player. This instance supports all of the capabilities of the browser plug-in version of Flash. It has been extended with new APIs for the additional functionality offered by Adobe AIR, such as filesystem access. The runtime also contains an embedded HTML rendering engine based on the open-source WebKit project (www.webkit.org), which also serves as the HTML engine for Apple’s Safari browser. Adobe AIR strives to keep the greatest possible compatibility between the embedded instance of WebKit and the version available in Safari. Adobe AIR is not attempting to introduce yet another browser to test against, but rather to leverage the existing browser behavior of WebKit. The Flash and HTML environments are bridged so that code in either environment can call into the other. For example, ActionScript code in Flash content can traverse the DOM of an HTML document it has loaded. Similarly, HTML content can invoke Flash APIs. HTML content can be displayed in the Flash display tree using a new HTML object, and Flash can be embedded in the HTML as well. Applications can consist solely of HTML, solely of SWF, or a mix of both types of content. The runtime does not include embedded PDF rendering support, but instead bridges to an installed copy of Reader (or Acrobat). Thus, PDF rendering in Adobe AIR operates much the same way that PDF rendering does in a browser today. PDF can be embedded in either SWF or HTML content, but an Adobe AIR application cannot consist solely of PDF content. Script bridging to PDF is also implemented: In Adobe AIR, a single line of code can involve execution across all three (Flash, HTML, and PDF) scripting engines. The runtime is available as a free download from Adobe and is redistributable. The target download size for the runtime is 5–9 MB. Figure 1: TimeTracker application created by gskinner.com simply by taking existing web content—both HTML and SWF—and running it directly in Adobe AIR. This approach, of course, is only a starting point. Adobe AIR provides new APIs for windowing, filesystem access, network detection, and more. Porting existing content to Adobe AIR is a starting point, but it’s taking advantage of new features that will distinguish Adobe AIR applications from existing web applications. Scripting. HTML, Flash, and PDF are all scriptable via ECMAScript. Of course, they don’t call it by this name: HTML and PDF refer to it as “JavaScript,” and Flash as “ActionScript.” They are all, however, based on the same Standard. Adobe AIR application developers do not need to pick just one of these technologies, but can combine them in a single application. Adobe AIR bridges scripting environments so that a script in HTML can use objects and APIs defined in Flash, and vice versa. HTML and AJAX. Adobe AIR provides HTML and AJAX support via the open-source WebKit HTML engine. Although WebKit has obviously been modified to work within Adobe AIR, Adobe’s goal is to make sure that HTML content rendered in Adobe AIR renders the same as it does in Safari (and other browsers) based on WebKit. The display of HTML in Adobe AIR is integrated into the Flash display pipeline. This means that HTML content can be embedded in Flash content. Operations such as rotations, blurs, and so on can be applied to the rendered HTML content. Flash content can also be embedded in HTML inside Adobe AIR. Flash and Flex. Adobe AIR contains a complete implementation of the Flash player—including the new open-source Tamarin scripting engine (www.mozilla.org/projects/tamarin)—extended with Adobe AIR’s new APIs. Significant portions of these new APIs and new functionality are themselves implemented in ActionScript. Flex provides a framework with additional APIs and support for creating UI in MXML markup. Originally designed for the creation of RIAs running in the browser, Flex produces applications by compiling them to Flash (SWF) content. This content can run in Adobe AIR. November 2007 l www.ddj.com l Dr. Dobb’s Journal Web Technologies Adobe AIR incorporates web technologies “as is.” Many developers using early releases of Adobe AIR have created their first applications 37 http://gskinner.com http://www.webkit.org http://www.mozilla.org/projects/tamarin http://www.ddj.com
Table of Contents Feed for the Digital Edition of Dr. Dobb's Journal - November 2007 Contents Hmmmm Alia Vox Developer Diaries Developer’s Notebook Smart Compilers - But Smart Enough? Conversations Grid-Enabling Resource-Intensive Applications Distributed Computing: Windows and Linux Adobe AIR: Desktop/Web Convergence Transparency on Demand Reusable Associations Effective Concurrency The Agile Edge Swaine’s Flames Dr. Dobb's Journal - November 2007 Dr. Dobb's Journal - November 2007 - (Page Cover1) Dr. Dobb's Journal - November 2007 - (Page Cover2) Dr. Dobb's Journal - November 2007 - (Page 1) Dr. Dobb's Journal - November 2007 - (Page 2) Dr. Dobb's Journal - November 2007 - (Page 3) Dr. Dobb's Journal - November 2007 - Contents (Page 4) Dr. Dobb's Journal - November 2007 - Contents (Page 5) Dr. Dobb's Journal - November 2007 - Hmmmm (Page 6) Dr. Dobb's Journal - November 2007 - Hmmmm (Page 7) Dr. Dobb's Journal - November 2007 - Hmmmm (Page 8) Dr. Dobb's Journal - November 2007 - Hmmmm (Page 9) Dr. Dobb's Journal - November 2007 - Alia Vox (Page 10) Dr. Dobb's Journal - November 2007 - Alia Vox (Page 11) Dr. Dobb's Journal - November 2007 - Developer Diaries (Page 12) Dr. Dobb's Journal - November 2007 - Developer Diaries (Page 13) Dr. Dobb's Journal - November 2007 - Developer’s Notebook (Page 14) Dr. Dobb's Journal - November 2007 - Developer’s Notebook (Page 15) Dr. Dobb's Journal - November 2007 - Smart Compilers - But Smart Enough? (Page 16) Dr. Dobb's Journal - November 2007 - Smart Compilers - But Smart Enough? (Page 17) Dr. Dobb's Journal - November 2007 - Smart Compilers - But Smart Enough? (Page 18) Dr. Dobb's Journal - November 2007 - Smart Compilers - But Smart Enough? (Page 19) Dr. Dobb's Journal - November 2007 - Conversations (Page 20) Dr. Dobb's Journal - November 2007 - Conversations (Page 21) Dr. Dobb's Journal - November 2007 - Grid-Enabling Resource-Intensive Applications (Page 22) Dr. Dobb's Journal - November 2007 - Grid-Enabling Resource-Intensive Applications (Page 23) Dr. Dobb's Journal - November 2007 - Grid-Enabling Resource-Intensive Applications (Page 24) Dr. Dobb's Journal - November 2007 - Grid-Enabling Resource-Intensive Applications (Page 25) Dr. Dobb's Journal - November 2007 - Grid-Enabling Resource-Intensive Applications (Page 26) Dr. Dobb's Journal - November 2007 - Grid-Enabling Resource-Intensive Applications (Page 27) Dr. Dobb's Journal - November 2007 - Grid-Enabling Resource-Intensive Applications (Page 28) Dr. Dobb's Journal - November 2007 - Grid-Enabling Resource-Intensive Applications (Page 29) Dr. Dobb's Journal - November 2007 - Distributed Computing: Windows and Linux (Page 30) Dr. Dobb's Journal - November 2007 - Distributed Computing: Windows and Linux (Page 31) Dr. Dobb's Journal - November 2007 - Distributed Computing: Windows and Linux (Page 32) Dr. Dobb's Journal - November 2007 - Distributed Computing: Windows and Linux (Page 33) Dr. Dobb's Journal - November 2007 - Distributed Computing: Windows and Linux (Page 34) Dr. Dobb's Journal - November 2007 - Distributed Computing: Windows and Linux (Page 35) Dr. Dobb's Journal - November 2007 - Adobe AIR: Desktop/Web Convergence (Page 36) Dr. Dobb's Journal - November 2007 - Adobe AIR: Desktop/Web Convergence (Page 37) Dr. Dobb's Journal - November 2007 - Adobe AIR: Desktop/Web Convergence (Page 38) Dr. Dobb's Journal - November 2007 - Adobe AIR: Desktop/Web Convergence (Page 39) Dr. Dobb's Journal - November 2007 - Adobe AIR: Desktop/Web Convergence (Page 40) Dr. Dobb's Journal - November 2007 - Adobe AIR: Desktop/Web Convergence (Page 41) Dr. Dobb's Journal - November 2007 - Transparency on Demand (Page 42) Dr. Dobb's Journal - November 2007 - Transparency on Demand (Page 43) Dr. Dobb's Journal - November 2007 - Transparency on Demand (Page 44) Dr. Dobb's Journal - November 2007 - Transparency on Demand (Page 45) Dr. Dobb's Journal - November 2007 - Transparency on Demand (Page 46) Dr. Dobb's Journal - November 2007 - Transparency on Demand (Page 47) Dr. Dobb's Journal - November 2007 - Transparency on Demand (Page 48) Dr. Dobb's Journal - November 2007 - Transparency on Demand (Page 49) Dr. Dobb's Journal - November 2007 - Transparency on Demand (Page 50) Dr. Dobb's Journal - November 2007 - Reusable Associations (Page 51) Dr. Dobb's Journal - November 2007 - Reusable Associations (Page 52) Dr. Dobb's Journal - November 2007 - Reusable Associations (Page 53) Dr. Dobb's Journal - November 2007 - Reusable Associations (Page 54) Dr. Dobb's Journal - November 2007 - Reusable Associations (Page 55) Dr. Dobb's Journal - November 2007 - Reusable Associations (Page 56) Dr. Dobb's Journal - November 2007 - Effective Concurrency (Page 57) Dr. Dobb's Journal - November 2007 - Effective Concurrency (Page 58) Dr. Dobb's Journal - November 2007 - Effective Concurrency (Page 59) Dr. Dobb's Journal - November 2007 - The Agile Edge (Page 60) Dr. Dobb's Journal - November 2007 - The Agile Edge (Page 61) Dr. Dobb's Journal - November 2007 - The Agile Edge (Page 62) Dr. Dobb's Journal - November 2007 - The Agile Edge (Page 63) Dr. Dobb's Journal - November 2007 - Swaine’s Flames (Page 64) Dr. Dobb's Journal - November 2007 - Swaine’s Flames (Page Cover3) Dr. Dobb's Journal - November 2007 - Swaine’s Flames (Page Cover4)
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.