You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Sylvain Wallez <sy...@apache.org> on 2003/12/11 22:23:44 UTC
New cocoon.setupObject() and cocoon.disposeObject()
Hi team,
As per the discussion following the new cocoon.setupObject(obj) method,
I added to new methods to the FOM:
- cocoon.createObject(class) creates an object and goes through the
various Avalon lifecycle interfaces.
The "class" attribute can be either a Class (written
Packages.my.package.MyClass in JavaScript) or a String (the class name).
- cocoon.disposeObject(object) diposes an object if needed.
I think that createObject() is better than setupObject() and therefore
would like to remove this second method.
Thoughts?
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
Re: New cocoon.setupObject() and cocoon.disposeObject()
Posted by Vadim Gritsenko <va...@verizon.net>.
Sylvain Wallez wrote:
> Hi team,
>
> As per the discussion following the new cocoon.setupObject(obj)
> method, I added to new methods to the FOM:
>
> - cocoon.createObject(class) creates an object and goes through the
> various Avalon lifecycle interfaces.
> The "class" attribute can be either a Class (written
> Packages.my.package.MyClass in JavaScript) or a String (the class name).
> - cocoon.disposeObject(object) diposes an object if needed.
>
> I think that createObject() is better than setupObject() and therefore
> would like to remove this second method.
>
> Thoughts?
+1 to removal of setupObject.
Vadim
Re: New cocoon.setupObject() and cocoon.disposeObject()
Posted by Tony Collen <co...@umn.edu>.
Sylvain Wallez wrote:
> Hi team,
>
> As per the discussion following the new cocoon.setupObject(obj) method,
> I added to new methods to the FOM:
>
> - cocoon.createObject(class) creates an object and goes through the
> various Avalon lifecycle interfaces.
> The "class" attribute can be either a Class (written
> Packages.my.package.MyClass in JavaScript) or a String (the class name).
> - cocoon.disposeObject(object) diposes an object if needed.
>
> I think that createObject() is better than setupObject() and therefore
> would like to remove this second method.
Hrmm... I'm no Avalon expert, in fact, I don't even claim to feel
comfortable using it, but I'd like to see more "Avalon Lite" stuff in
the FOM, or at least the FOM stuff which corresponds to the Avalon API
should be similarly named.
IMO people will be wondering why they should use
createObject(Packages.foo) when they can just do "new Packages.foo()".
The name should somehow specify that the component goes through the
Avalon component lifecycle. I don't know if the name of the functions
can be "Avalonized" or not, but it's definitely something to think
about. cocoon.lifecycle.createObject(class) ?
cocoon.avalon.createObject() ? Just throwing ideas out.
Don't forget the docs! I think one thing that people are going to miss
when looking up components is remembering to release them.
>
> Thoughts?
>
> Sylvain
>
Regards,
Tony