Hello XWiki committers.
Vincent have proposed the development of nested spaces for 7.2 and some of
us have already agreed. But the concept of nested spaces introduces a
problem that Denis have mentioned during some internal discussions at XWiki
SAS, and that I am going to report here.
From a UI perspective, differentiating pages
`A.B.C.WebHome` and `A.B.C`
could become very difficult.
Moreover, we know that a lot of users do not understand the notion of
spaces, and they are lost when you look at them during usability sessions.
The situation is even worse if you consider the notion of parent/child
documents, which is completely unrelated to the actual hierarchy. It
creates confusion!
To fix these problems, we propose to introduce the notion of "nested
documents", i.e. the ability to create documents inside documents.
Say differently, if a page `A.B.C` exists, nothing should stop the user to
create the document `A.B.C.D`.
In JCR[1], there is only one concept: the "node". A node can have a
content, and a list of child nodes. In XWiki, documents could become a kind
of nodes, and we do not need spaces anymore.
If we don't have space anymore, we could ask ourselves: "How the rights
will be propagated to the children documents? How do we distinguish rights
applied to the documents and the rights applied to the children?"
I think the easiest solution is to inherit the rights from the parent to
the children, unless an object prevent it. We already have this kind of
mechanism with XWikiRights and XWikiGlobalRights. XWikiRights would be
applied for the current document, and XWikiGlobalRights for the document and
its children.
But changing the XWiki model is a lot of work, that we don't have time to
achieve for 7.2. So we propose to make it step by step.
The first step is to change the UI to hide the notion of space to the
users. Concretely, each time a user wants to create a page called `A`, we
actually create the document `A.WebHome`. So any child of this page would
be created in the `A` space, like `A.Child`. But this child would be in a
space too, so it would be `A.Child.WebHome` actually.
Then, when we display the `A.WebHome` page, we remove all mentions to the
`WebHome` name. In the UI, it will just be presented as the document `A`.
This is a good point, knowing the fact that the term `WebHome` have no
sense for the user, neither in English or in other languages.
Again, these changes are only for the UI. For the applications, it is the
developer's job to decide if the app will create documents like
`Document.WebHome` or basic documents just as before.
The question of what to do with AWM comes up. When a user creates an entry,
should it be a new-kind-of-document (`AppSpace.Entry.WebHome`) or an
old-kind-of-document (`AppSpace.Entry`)? The first option is good for
consistency and for the new possibilities it offers, but the second is
better for retro-compatibility. And the question will be the same for all
existing applications that create pages. I believe we should answer these
questions on a case-by-case basis and deserve their own mail threads.
This proposal also implies to change some macros, like the {{space}} one,
and some panels. But I believe there is no blocking-point there.
Finally, after these steps are accomplished in 7.2 and polished until the
end of the 7.x cycle, we will refactor the XWiki model (something we dream
about for years).
To sum up, the idea we propose is:
On the short run:
- Hide the notion of space in the UI.
- Hide the `WebHome` name in the UI.
- When a user creates a page from the UI, it actually creates a space with
a WebHome.
- Remove the current parent/child mechanism which is outdated (and
confusing) compared to the new hierarchy.
On the long run:
- Remove the notion of space in the model, and replace it by "nested
documents".
- Tune the rights system to inherit rights from parents to children.
Of course, we can discuss the technical details and the implementation
strategies. But for now, we need to know if you accept the general idea
(nested documents).
So, I hope you will like this proposal, and here is my +1.
Thanks,
Guillaume D.
[1] JCR:
https://en.wikipedia.org/wiki/Content_repository_API_for_Java
--
Guillaume Delhumeau (gdelhumeau(a)xwiki.com)
Research & Development Engineer at XWiki SAS
Committer on the
XWiki.org project