Hi devs,
While fixing XWiki.ClassSheet to work with classes defined in nested
spaces, I realized that if the class is defined in a non-terminal (WebHome)
document then XWiki.ClassSheet creates WebHomeSheet and WebHomeTemplate,
which made me wonder:
(1) Does it make sense to have a class defined in a non-terminal (WebHome)
document?
One good thing about it, I guess, is that we could group the sheet,
template and any class related pages (e.g. translation page for class
properties) under the class document itself.
Path.To.DiagramClass
|- Sheet
|- Template
This would be consistent with the old parent-child relationship were we use
to set the class as the parent of the sheet and template.
(2) What naming convention should we use for classes defined in
non-terminal documents?
If we keep the sheet and the template as (terminal?) siblings of the class
then we should use the current naming convention:
Path.To.DiagramClass.WebHome
Path.To.DiagramSheet
Path.To.DiagramTemplate
If we nest the sheet and the template inside the class then we could have:
Path.To.DiagramClass.WebHome <-- this is the class
Path.To.DiagramClass.Sheet
Path.To.DiagramClass.Template
We could also group the class, sheet and template like this:
Path.To.Diagram.Class
Path.To.Diagram.Sheet
Path.To.Diagram.Template
i.e. when you create a class you create a space with 3 terminal documents.
WDYT?
Thanks,
Marius