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

No comments:

Post a Comment