[Zope] Object Manager and Folder

Michel Pelletier michel@digicool.com
Wed, 08 Mar 2000 11:01:23 -0800


Mario Lang wrote:
> 
> Hi.
> 
> I am quite new to Zope and currently try to create a BookClass ZClass Product.
> I came across several issues where you probably can give me some useful tips:
> 
> 1. What is the difference between inheriting rom Object Manager and/or Folder.

Folder inherits from all kinds of other things, including
ObjectManager.  Basicly, if you want your object to be a container then
subclass ObjectManager.  If you want to look and walk and quack exactly
like a Folder, use Folder.
 
> 2. My product will include Cover Images of the books. (a small and a large one).
> Whats the best way to implement this? I thought about creating emtpy images (smallcover and largecover),
> but I dont know how to ask the Objects if they contain something.

They have a getSize() method that returns the length of the Image (Files
have this too).

> Or should I just add the Images in my BookClass Instance programmatically?

Sure.
 
> 3. Wasn't their any web-client product for Zope so that I could retrieve content from the web directory and import it in Objects (like a Image) without having
> to upload it manually?

Yes, any automatable HTTP client will do.  You might want to look into
ZClient, or xmlrpclib, or httplib.
 
> And the last one:
> Is their any special reason why FTP access doesnt work in the /Control_Panel/Products folder?

Yes, because we haven't implemented it.

> All methods are empty their. I work with Emacs and ange-ftp is quite
> a good method to access content of Zope Objects.

Yes it is, I'd like to see this too.  I don't think it would be too
complex for someone to do, certainly FTP support is fairly trivial.  For
this you would need to mine the source.
 
> Besides, if I change the content of a Object through the web interface,
> Zope seems to convert < > and " chars into &lt; &gt; &quot;

I don't understand.  Editing a DTML Method through the web should not
munge it in this way.

> I understand why, but is this really necessary. It seems as if nearly all
> textmode browsers (as lynx and emacs/w3) dont care about converting the entities back tto their corresponding characters.

-Michel