From: <gre...@mi...> - 2007-05-24 15:06:23
|
>Hello, > >First, thank a lot for your work in spring python, I love it. I like to hear encouraging words. >Secondly, as my "From" mail header said, my name is Alexandre Fernandez, >I'm computing architect into a big socity and work on a personnal >project : snaapy. > >There is a little and basic explanation of my personnal project with >spring python and IoC: >http://snaapy.upasika.org/browser/snaaplet/trunk/doc/README.txt Excellent! >I'm asking to myself if I can use interceptors to negociate with a >caching engine component. I'm sure you could. >I tried to find a simple interceptor example in spring python, I saw >that the interceptor usage is different from pycontainer, is there a >motivation for that ? I started Spring Python using Pycontainer as my IoC container. My approach was to merge their code into my baseline and proceed to use it without the user having to know it was a separate module. I have contacted the original owner of Pycontainer to advise him of this, and invite him to participate to work on Spring Python, since his motivations were similar to my own. He indicated he was no longer interested, and was pursuing other goals. Pycontainer's interceptor mechanism was embedded in the IoC container. This meant you could not use it programmatically. Spring Framework keeps IoC and AOP components separated, and gives you the freedom to use them together or to only use one or the other. I believe that is a good concept, so I proceeded to write my own interceptor mechanisms, partially using code of Pycontainer, but driving myself based on Spring's interface signatures. After getting this working, and verifying unit tests were working, I then decided to not maintain two version of AOP, and thus removed AOP from the IoC container of my forked copy of Pycontainer. I think this is good to let the IoC code only deal with IoC, and thus reduce the code base. I have also wanted to rewrite the IoC container, so that it can be much closer to match the existing Java XML-format. I haven't done that yet, but I like to make the bridge between Java-based Spring apps and Python-based apps as easy to cross as possible. I saw some tool that can allegedly create a python translator based on XSD specs. This seemed like I could feed it Spring's new XSD specs, but so far it hasn't been useful at all. If that tool does actually work in the future, I could simply write an XSD spec that defines the Pycontainer-based schema to create a translator for backwards compatibility. Hopefully, this explains my intentions. In my opinion, the AOP solution now in Spring Python is closer to the one in Spring itself, and it works more smoothly both in and out of the IoC container. |