This isn’t really new, but i need to look at closer the aspect programming. Logilab aspects module seems to provide a great way to solve this kind of trouble.
This kind of programming need a total ‘twist’ of mind to do a total switch. Despite this seems to be used in many Java project, i haven’t see a really app that use this in Python. Do i miss something ?
I have at various times tried to figure out what Aspect programming is. I found this post very helpful:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=8ef9bea6.0311052119.4f5ab5d6%40posting.google.com
After reading it I felt I understood what aspect oriented programming was, though I also was unimpressed with it as a programming technique. But at least I know why now ;) The fact that it typically works on the program text is especially bad in my mind. That’s a sign that either the language is not powerful enough, or the programmers don’t know how to use the language well enough.
Aspect define several behaviours, and the link you’ve post only seems to talk about ‘using AOP to build a Constraint API’.
Having part of the buzz logic of an object outside it, is really a bad habit. And this really show that : it should be object oriented langage, and the programmers need to do the right job.
But i think AOP can be a good approach to plug compoments, without having a verbose API between them. But perhaps i only need to look at the observer design pattern.