On 22 Oct 2015 at 18:25:48, Marius Dumitru Florea
(mariusdumitru.florea@xwiki.com(mailto:mariusdumitru.florea@xwiki.com)) wrote:
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?
Good question. Not sure about the answer :)
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
Note that there can be more than 1 sheet to display data from a class but we could imagine
having more than 1 sheet nested too or we could say that the nested one is the default
sheet.
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.
Indeed.
(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
And we would the ClassSheet sheet to display that page.
Path.To.DiagramClass.Sheet
Path.To.DiagramClass.Template
I think that would be my preference.
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.
This seems overkill and would cause duplications. The diagram app would use the Diagram
space name. I think it’s better to have Class in the name of the space.
Thanks
-Vincent
WDYT?
Thanks,
Marius