Page 3 of 3
Re: event plugin system
Posted: Mon Mar 09, 2009 9:26 pm
by Chris Corbyn
josh wrote:Its actually different then AOP from my understanding, doesn't AOP "mix" code statically? Whereas events are dynamic, meaning that they can change during runtime without having to generate / weave code?
Yeah AOP allows you to define cutpoints that effectively allow injection of code statically. It requires significant modification to the runtime environment which is why I think it's a bit of a hack. AOP is very much an experimental concept at the moment and while it may find it footing over time, it has a lot of potential problems right now... moreso in threaded environments.
AspectJ is probably the most well documented AOP language, adding Aspect features to Java.
Re: event plugin system
Posted: Mon Mar 09, 2009 10:20 pm
by josh
Yeah, based off the little I know it sounds like there's nothing it can do you can't do with a little template method calling at runtime
Re: event plugin system
Posted: Tue Mar 10, 2009 1:19 am
by Chris Corbyn
josh wrote:Yeah, based off the little I know it sounds like there's nothing it can do you can't do with a little template method calling at runtime
Actually, AOP adds features to languages that solve some problems with other programming paradigms. It tries to deal with the issue of large amounts of code that have to do things in common and get easily tangled/coupled, even with OOP. It's more than just a bit of syntactic sugar but in my opinion it's experimental and hasn't got particularly widespread adoption. It allows you do more cleanly solve problems surrounding crosscutting concerns, such as things like the events system being discussed here (where various parts of the system are integrated with it) or something like logging.
It's a new paradigm, though not quite as hard to grasp as the difference between procedural/OOP.
If you know Java, this will probably make a lot of sense:
http://en.wikipedia.org/wiki/Aspect-ori ... rogramming
http://www.eclipse.org/aspectj/
Re: event plugin system
Posted: Tue Mar 10, 2009 1:38 am
by Christopher
Chris Corbyn wrote:It allows you do more cleanly solve problems surrounding crosscutting concerns, such as things like the events system being discussed here (where various parts of the system are integrated with it) or something like logging.
I think it hasn't caught on because the problems it solved have since been solved in ways that don't need language add-ons -- such as Inversion of Control / Dependency Injection. There is even this new move toward Annotations which are simplified Aspects. But that has not really taken off either.
I think it ends up that the best thing to do with cross-cutting concerns is not to modularize them, but to simplify them out of existence by implementing them using the tools at hand, such as framework features.