Ugo Cei wrote:

Guido Casper wrote:

Added:
cocoon/whiteboard/butterfly/lib/js-1.6R1pre.jar (contents, props changed)
Log:
Added Rhino jar



Ugo, what does Spring use that for? Do you have any pointers?


Spring 1.2 will have the possibility of managing not just regular Java beans, but also "beans" written in scripting languages. In the Spring sandbox there's already support for Groovy and Beanshell and a few days ago I sent Rod Johnson a couple of classes I wrote for doing the same with Javascript. He promised to review them and possibly commit them, so we could have them in Spring when 1.2 is released.

[Incidentally, my mods are just an extension to Spring and don't require any modification to any other Spring class, so even if they're not eventually included in the Spring distribution, they can be used anyway.]

With this we could have, for instance, container-managed flowscripts who get their dependencies injected to them instead of having to look them up. Real IoC in your flowscripts! We could also use Spring's AOP to apply aspects to them, so that you might, for instance, transparently apply declarative authorization checks to your flowscripts or wrap transactions around them.


Flowscripts aren't objects, but a set of functions. Would we have to design them as JS class to integrate them as Spring citizens?

Pretty cool, isnt't it?


Oh yes, definitely :-)

Sylvain

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



Reply via email to