[Zope] - Zope/filesystem issues

Andreas Kostyrka andreas@mtg.co.at
Wed, 30 Dec 1998 23:56:49 +0100 (CET)


On Wed, 30 Dec 1998, Amos Latteier wrote:

> With all this talk about wanting to use the filesystem to store Zope
> objects rather than the object database, I just wanted to underscore a
> point that has been mentioned, but mostly passed over.
> 
> Zope objects are much more than simply text files.
> 
> They are Python objects--so storing them in general requires something like
> a  pickle. Documents and Folders can be approximated with filesystem
> directories and text files, however, they don't capture a lot of
> information like Zope object properties, permissions information, etc. In
> addition many objects like Database Connections don't map very well to a
> filesystem object at all.
Exactly. Just my talking. To get that feature (file system storage) one
has to design it into the system from the beginning.
And if the objects know from the beginning that they must be able to
activate/deactivate themselves to something filesystem-like, then it
works quite well :)

> I've been thinking about these issues while working on FTP support, since
> FTP uses a filesystem metaphor for communication with Zope. For example,
> when you FTP an object in and out of Zope, you probably won't be putting
> and getting the complete object. You will be most likely putting and
> getting the textual or binary 'content' of the object.
And that's not the same. You need more than one file to represent an
object cleanly as text. For HTML-file objects for example I use at least
three files:
method.html
.users
.roles

For anything more complex, I use a complete directory. Actually, I'm
considering if I should allow a more flexible class assignment for
file'ish objects. Programming for directories as representation of an 
custom object makes it quite nice to program :)

> So while being able to import and export partial representations of Zope
> objects to and from the filesystem is an important convenience, I see big
> problems with it being a complete replacement for through the web editing.
Nothing that can be done to Zope at this point. You can try and succeed at
a partial mapping, but that doesn't solve the basic problem: Zope objects
do not have a ``defined'' external representation. Nice from some things,
but not really acceptable for software development management. :(

Andreas
-- 
Win95: n., A huge annoying boot virus that causes random spontaneous system
     crashes, usually just before saving a massive project.  Easily cured by
     UNIX.  See also MS-DOS, IBM-DOS, DR-DOS, Win 3.x, Win98.