Wednesday, December 29, 2010

AS3Commons-Bytecode v0.9.2 released

The last two days two updates to AS3Commons-Bytecode were released, v0.9.1 and today v0.9.2 to be precise.

The most important additions in these two releases have been the support for proxying protected and custom namespace members. I ran into a bunch of issues during development but wanted to get the API out so that people could play around with it and perhaps come up with some constructive criticism. Therefore the first v0.9 release only supported public members, enough for some basic testing and trying out.
Luckily in the past few evenings I've been able to track down the issues I had surrounding generation of protected and custom namespace scoped members.

It came down to a few bugs in the Bytecode reflection and emit.* API, that'll teach me to unit test better I suppose. :)

Another handy addition are a bunch of build cycle events that allow a developer to customize the generation of the method bodies. All of them are explained in this doc section:
Generating the proxy classes

Furthermore, the library now offers an entry point for using an IFactory implementation to take care off the creation of IMethodInvocationInterceptors. How this is hooked up is described in this section:
Instantiating a proxy class

For the next release I'll be focusing on what they call in AOP terms 'introductions', which means that the library will enable you to let proxy classes implement new interfaces at runtime. Handy for when an object needs an 'isDirty' property, for instance.

When that's finished I suppose a version 1.0 should be ready.
Beyond v1.0 will be bytecode weaving based AOP, this is going to introduce its own set of difficulties to overcome which is why I've decided to push it back after the v1.0 release.

Cheers and a happy new year!

Roland

Sunday, December 26, 2010

AS3Commons-Bytecode v0.9 released

Today saw the release of v0.9 of AS3Commons-Bytecode, an ABC bytecode parsing/publishing and bytecode based reflection API for ActionScript 3.0, formerly known as Loom. (http://code.google.com/p/loom-as3/).

It offers bytecode based reflection, giving a developer access to a much richer set of reflection information than that retrieved from the native describeType() method.
Check this link for more information about this feature: Bytecode reflection.

Secondly it offers the emit API, enabling a developer to define, generate and load Actionscript classes at runtime.
Check this link for more information about this feature: Runtime class generation.

And lastly, the library has just added support for runtime dynamic proxy generation in this v0.9 release. Dynamic proxies will bring the first, albeit limited, AOP possibilities to Actionscript.
Check this link for more information about this feature: Dynamic proxy generation.

For the upcoming release support for proxying protected and custom namespace scoped members for dynamic proxies is planned. Along with bytecode weaving AOP support.

Until then, try out the library and report any bugs or ideas here: Issues.

Cheers,

Roland

About Me

My photo

Co-Owner at Stack & Heap (http://www.stackandheap.com)
Lead developer for the Spring Actionscript (http://www.springactionscript.org) and AS3Commons (http://www.as3commons.org) projects.
I like noise.