cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: Introducing IOC for Java classes created in flowscript
Date Thu, 20 Nov 2003 17:12:19 GMT
Bertrand Delacretaz wrote:

> Le Jeudi, 20 nov 2003, à 17:49 Europe/Zurich, Sylvain Wallez a écrit :
>
>> ...I don't agree with this "unfortunately": writing and installing a 
>> component is not an easy task for a newbie, and if it's the only 
>> solution we provide for calling Java code from flowscript, many will 
>> turn around and go away...
>
>
> Just wildthinking here: I've been using BeanShell 
> (http://www.beanshell.org/) recently, and with it you can very easily 
> write scripts that implement java interfaces.
>
> This means that BeanShell (dunno if BSF does this too) scripts could 
> be called from flow *and* interpreted *and* implement Avalon or Cocoon 
> interfaces. I haven't thought about all implications but it might be a 
> nice intermediate solution between limited interpreted stuff and 
> full-blown java coding.


Rhino also provides some very easy solutions to this:
- http://www.mozilla.org/rhino/tutorial.html#ImplementingInterfaces
- paragraph "JavaAdapter constructor" at 
http://www.mozilla.org/rhino/scriptjava.html

>> ...Sure! That's why I wrote that it "gently educates people" to 
>> Avalon. Once people will have implemented lifecycle interfaces, the 
>> next step is to declare the component in cocoon.xconf and move to the 
>> regular component lookup mechanism...
>
>
> So maybe scripting Avalon interfaces could be a first step in this 
> education?


Mmmh... Not sure it would be a good education ;-)

But it can certainly be useful for quick hack prototypes!

Sylvain

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



Mime
View raw message