[Zope-CMF] (CMFUid) Folders should have Uids - was: Bug with CMFUid
content.
Tim Hoffman
timh at zute.net
Wed Aug 25 19:57:55 EDT 2004
HI Gregoire
I think all content objects amd folders created should have a Uid.
I'll answer your questions first then provide a couple of other reasons
Gregoire Weber wrote:
>
>There are two reasons
>
>- Can you answer me the question what the view of a folder is?
> An example:
>
> 1. t=0: just added a folder 'fol'. The view is 'folder_view'.
> Added uid 1 to 'fol'.
> --> searching the folder by uid 1 returns .../fol showing
> .../fol/folder_view
>
>
Yep no problem. Uid lets lou locate content entities idependant of path,
IMO it says nothing about how it will/should be viewed. Tying identity
of the a content object (uniqely within a site) to how it might be
viewed is, I think
not a good idea.
> 2. t=1: add a 'index_html' to 'fol'. The view is now the view
> of 'index_html'.
> Added uid 2 to 'index_html'.
> --> searching the folder by uid 1 returns .../fol showing
> .../fol/index_html/document_view (showing a permalink
> with uid 2)
>
>
>
IMO thats fine, and would be expected behaviour see my answer above.
> So probably the uid of 'fol' has to be deleted at the moment a
> 'index_html' gets added while the uid of 'index_html' has to be
> set to 1. Upon deleting of 'index_html' the folder has to be
> given back the uid of 1.
>
> arrghhh! See it?
>
>
>
Sorry I don't agree with this position at all. Folder will still retain
it's Uid of 1.
If someone does get confused about this behaviour then I feel they are
mis-using the whole
notion of Uid's. Folder should have its Uid of 1, and index_html should
have it's Uid of 2.
>- There was a problem because folders could not be called. This prevented
> adding uids the way it is done currently.
> (there isn't a problem adding uids to folders at all, but it was a problem
> doing this from the template, sorry I don't remember anymore exactly).
> With the reason above I decided that folders do not have permanent urls.
>
>
>
Again I feel strongly that folders should have permanent Uids. How they
manifest and are used is
a seperate issue in my opinion.
I will give you an example of how we use Uid's in an existing application.
We have the concept of an Artwork content object. It is a notional
representation of the concept of a piece of art.
However it is just a folder (actually skinned folder with custom view
methods). That will contain a collection of
images that represent the artwork. Each image might be a different view,
maybe a dfiferent angle. the artwork during construction etc.. (Also in
our case each image has multiple views of itself in different
resolutions scaling and cropping factors, but thats another story). We
use this model as it makes it much easier to author the artwork being
able to navigate into it
to manage content. (Also the artwork may contain audio - describing the
image for deaf, or the artwork consists of audio, text describing the
artwork - especially if the art consists of audio and we want a text
description for deaf people). These are
all just manifestations or different perspectives of the artwork.
Now we create exhibition objects which are either topic based or are an
object with a single property which is an order list
of Uid's, that way if any of the Artwork (folders) are moved around the
site, that behaviour will not break the exhibition.
Now the view of the folder you get when you retrieve the folder when
viewing the exhibition is based on your context or that of the
exhibition or both . Not the location of the folder (Atrtwork). In fact
you are normally viewing the Artwork (Folder)
in a completley different location
You can see this all in action at www.designingfutures.com.au (3rd gen
of the site went up a few weeks ago).
I hope this helps convince you that Folders should also have Uid's
Thanks for your time
Tim
More information about the Zope-CMF
mailing list