Introducing the AS3Commons project

ActionScript, Air, AS3Commons, Flash, Flex Add comments

While working on the Spring ActionScript framework, we wrote a lot of code that could perfectly be used outside of the framework. That's why we decided to start the AS3Commons project, based on idea of the Apache Commons project, and provide a set of core libraries useful to every ActionScript 3.0 developer.

This announcement is also the immediate release of 2 of the libraries included:

  • AS3Commons-Reflect: a reflection library
  • AS3Commons-Logging: an abstraction layer over logging frameworks

Note: we realize there is another as3commons library out there. However this library is no longer being maintained and developed as confirmed by the author. We apologize in advance for the confusion this might cause. We are currently looking into the code and will try to include/replace the functionality in the new project.


This is a reflection library, or a clear API written around describeType(). It allows you to get runtime information about classes and objects running in your application, like the properties and methods available in a class, the metadata associated with a certain property, ... and it also allows you to dynamically instantiate objects and invoke their methods.

We had previously moved this from the Spring ActionScript sources to the AS3Reflect project. However, since we had plans of extracting other part of the framework as well, we decided to bundle everything under the AS3Commons project. The AS3Reflect library is hence no longer available and we advice all users to update to the new release.

For more info, please see


This is a logging abstraction layer over existing logging frameworks. It is a lightweight library that offers a logger interface and a set of adapters and decorators for existing logging frameworks, like the logging API in the Flex framework.

It is perfectly fit for library and framework developers that want to enable logging information in their distributed libraries without tying their code to a specific logging framework. Logging happens via the logger interfaces provided by AS3Commons-Logging and users are then able to configure the logger with the implementation they prefer.

Here's a small example:

  1. // configure the LoggerFactory with the Flex logging framework
  2. private static var loggerSetup:* = (LoggerFactory.loggerFactory = new FlexLoggerFactory());
  4. // get a logger from the factory, in which all log statements will be handled by the Flex logger
  5. private static var logger:ILogger = LoggerFactory.getLogger("com.domain.MyClass");

We will update the project with new adapters for existing logging frameworks. Let us know if you have any framework that you would like to see supported.

For more info, please see:

Get Involved

We welcome participation from all that are interested, at all skill levels. Coding, documentation and testing are all critical parts of the software development process. If you are interested in participating in any of these aspects, please join us! You can leave a comment or mail me at christophe.herreman [at] gmail [dot] com.

Add to Bloglines - Digg This! - - Stumble It! - Twit This! - Technorati links - Share on Facebook - Feedburner

5 Responses to “Introducing the AS3Commons project”

  1. shaun Says:

    Great stuff! Thus begins a new era of Flash Framework interoperability :)

    Now, if the DI frameworks could just settle on some standard injection annotations (without the controversy of the Spring/Guice proposal!)…

  2. magomarcelo Says:

    but why is the existing Flex Logging Framework not enough? what are the advantages of using as3commons-logging?
    is there any support for external configuration using spring as?

  3. Peter Says:

    Having a common AS3 library is a great idea. This will help with development and to reduce SWF file size.
    Since there are numerous libraries that overlap each other (i.e. logging, reflection, collections); perhaps a collaboration with the owners of the following libraries to bring/port to the common namespaces would be a good start.

    Lite Collections:
    dpdk (collections, utils):
    Spicefactory (logging, utils):

    OSMF (logging, utils):



    The Flex Logging Framework is good when the SDK is available, but it has the downside of bloating the final SWF.

  4. Ron Wheeler Says:

    Great idea.
    Small correction
    advice(noun) advise (verb)
    The AS3Reflect library is hence no longer available and we advice all users to update to the new release.
    The AS3Reflect library is hence no longer available and we advise all users to update to the new release.

  5. Scottae Says:

    This is an awesome project! Thank you for sharing.

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in