Josias Thoeny wrote:
Hi,

There have been discussions before about how to represent the
hierarchical structure of a set of documents in Lenya. I don't know if there has been a decision, I didn't find anything in the
mail archive. So I would like to raise this issue again.

As I understood it, we decided to implement a flat content structure
combined with separate hierarchical site structure(s) (option 1 below).

[...]

With JCR, either option 1 or 2 are possible. The advantage of the flat structure is that multiple views are possible.
As Felix said in an earlier email, it corresponds better to the MVC
pattern.
However, I think that in the case of Lenya the site structure is more
than "just" a view because it adds dependencies between documents. For
example, it is not allowed to delete a document which has children, or
it is not allowed to publish a document whose parent is not published
yet.

This reference integrity can be ensured by the JCR repository using
reference properties. If a content document is referenced by the site
structure, it cannot be deleted. The ancestor of a site structure node
cannot be deleted, therefore it's not allowed to delete a document
which has children in a site structure.

I would suggest to require a "default site structure" which represents
the URL space, and to allow additional site structures (views) like
you mention below.

Actually I'm not really sure what this means w.r.t to the MVC pattern.

IMHO the main difference between JCR and a relational DB is that JCR
allows hierarchical access. To me it seems a little strange to use JCR,
but store all documents on the same level.

IMO the flat content structure feels cleaner because the separation of
actual content and site structure. I like the resulting API (maybe you'd
like to take a look at the o.a.l.cms.repo package). Site structure
operations can be executed without affecting the content documents,
content documents can be queried without using the site structure.

But, it's certainly a question of personal taste.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to