[Zope3-dev] Content space persistent modules

Paul Winkler pw_lists at slinkp.com
Tue Dec 9 10:59:27 EST 2003


On Tue, Dec 09, 2003 at 01:23:37AM -0200, Leonardo Rochael Almeida wrote:
> The way I see them, these scripts would be proper python files. We
> might decide to limit what they can contain (for instance, no classes,

boo

> or no persistent-inheriting classes).

yay :-)

> Another possibility is to have some way of declaring a function (or
> other callable) within this module so that it might be called without
> parameters by a ZPT (e.g. in a path expression) but would
> automatically receive the ZPT's parameters (options).

we could just have a "request" namespace, and zpt options would
be available through that.

> I think this would be a nice option for scripters because they'd be
> fully formed python files, directly editable with regular editors,
> and the callables therein would be easily callable from ZPTs which,
> would help keep programming logic out of the templates.

hmm... so you could do <span tal:replace="context/mymodule/mycallable" />?
Sounds good to me.

> Last, but not least, this would provide an easy migration path from
> scripters to developers as the content space modules could be easily
> transplanted to software space.

yay!
with that in mind, these modules should have as few "magic" features
as possible (e.g. no "print / return printed").

> So what do you think? Am I totally off base here?

As someone who spends much of his time fiddling with scripts
in Zope 2 / CMF, the main question I have about all this is
whether it's really much easier / more convenient than a 
persistent module in software space. But to answer that,
I need to block out some time to play with making zope 3
apps, and I haven't been able to do that :-(

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's SWIRLY MARKSMAN ROCKET!
(random hero from isometric.spaceninja.com)



More information about the Zope3-dev mailing list