"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
Developing actionscript native extensions
1. What is an ActionScript extension? Provide a transparent way to extend ActionScript (Flash, Flex, AIR) desktop applications capabilities using technologies with native capabilities (Java, C#, C++, Python, etc). On the other hand, provides a easy way to create rich GUIs for existing desktop applications, built with any of these technologies. An ActionScript extension is a combination of: •ActionScript classes. •Native code. Native code is defined here as code that executes outside the runtime. For example, code that you write in C is native code.
2. Reasons to write an ActionScript extension include the following: •A native code implementation provides access to device-specific features. These device-specific features are not available in the built-in ActionScript classes, and are not possible to implement in application-specific ActionScript classes. The native code implementation can provide such functionality because it has access to device-specific hardware and software. •A native code implementation can sometimes be faster than an implementation that uses only ActionScript. •A native code implementation allows you to reuse existing code.
3. Actionscript based applications usually have an attractive appearance and several graphic features. They also are relatively simple to construct. But they are limited by the flash player sandbox for security reasons. Therefore, several low level features (e.g. OS integration, shell commands and other) are not available on this kind of application. Technologies like Java and C++ have a lot of capabilities for data manipulation, peripherals handling, OS integration and more. But they don't offers an efficient and productive way to build rich GUIs.
4. Objectives Design a simple communication protocol (RPC-based) for allowing message exchanging between ActionScript and Native code. Develop a framework to implement the above protocol in the actionscript side. Develop Native side frameworks to implement the protocol. Develop tools for helping development and deployment processes. Design a basic architecture for this kind of application. Develop a base infra-structure layer for allowing the construction of native libraries (e.g. File System, Registry, USB, Bluetooth, etc) using this infra-structure.