Can anyone recommend an AOP framework for AS3?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
AOP and AS3 is rather hard, because AS3 is very static at runtime. at least the sealed classes, which are the vast majority … you could use ECMA-compatibility mode or go through proxies, all at cost of speed and with some restrictions (proxies can’t mock in AS3, so you will actually need to write your code against those proxies) …
[Bindable] metatag supported by mxmlc will help you add AOP for property access … at least sort of. It will generate code to dispatch a PropertyChangeEvent, that you can cancel, if needed …
i think AOP in AS3 is only possible at compiletime (ok, you could postprocess ABC after build, but i’m not sure that’s the easiest way to go) … thus you’d need a preprocessor to generate quite some code for you, modify external swcs etc. … not too trivial …
i know, this sounds a little weird, but AS2 is much much better for that, because all this can be easily done at runtime … here is a good example …
greetz
back2dos