Aspect Oriented Programming ActionScript 3

Can anyone recommend AOP infrastructure for AS3?

+4
source share
2 answers

AOP and AS3 are quite complex because AS3 is very static at runtime. at least the sealed classes that make up the vast majority ... you can use ECMA compatibility mode or go through proxies, all for a price and with some restrictions (proxies cannot mock AS3, so you really need to write your code against these proxies) ...

[Bindable] metatag supported by mxmlc will help you add AOP to access properties ... at least, sort of. It will generate the code to send the PropertyChangeEvent , which can be undone if necessary ...

I think that AOP in AS3 is only possible in compiletime (well, you could postprocess the ABC after the build, but I'm not sure if this is the easiest way) ... so you need a preprocessor to create pretty code for you, change external swcs etc .... not too trivial ...

I know this sounds a little strange, but AS2 is much better for this, because all this can be easily done at runtime ... here is a good example ...

Greetz

back2dos

+4
source

This is an older question, but here you can find a new way to develop Aspect using Flex / AS3. Thanks Jeff!

0
source

All Articles