On Tue, Jun 28, 2011 at 6:43 PM, Marius Dumitru Florea
<mariusdumitru.florea(a)xwiki.com> wrote:
Hi devs,
A prerequisite for Application Within Minutes [1] is to be able to
specify the sheet that will be used to display a document without
touching the content of that document [2]. This can be done in multiple
ways, depending on how we define the notion of a sheet.
(1) Class sheets vs. document sheets
A class sheet displays an object of a particular type and is specified
in the definition of that type. This means that when you create or edit
a class, i.e. a type of object, you can specify which sheet should be
used to display the instances of that class.
Pro: Documents don't have to specify a sheet.
Con: We have to determine which sheet to use in case there are multiple
objects attached to a document.
What about displaying objects one after the other ?
I think sheets must be seen as a way to display an object and not the
whole page [1].
http://dev.xwiki.org/xwiki/bin/download/Design/OverhaulOfXWikiClassesAndObj…
A document sheet displays a document of a particular type and is
specified at document level because the document type, unlike the
xclass, does not exist actually. The document type is inferred from the
type of objects the document has, or from its content, or, why not, from
the type of attachments it has.
Pro: Doesn't have the class sheet con.
Con: Each document has to specify which sheet to use.
If the document type can be inferred from the objects it contains, can
we say that each document has to specify the sheet it uses ?
Class sheets are enough for Application Within Minutes because the
wizard will create a single class (with a sheet) and so the application
items will have only one object that specifies a sheet.
[snip]
(4) Sheet parameters?
If we're talking about class sheets then they only need to specify how
an object is displayed. Document sheets on the other hand may need to
control elements like:
* which tabs (comments, annotations, attachments, etc.), if any, are
displayed
* show title field in edit mode
* the side panels
* the form buttons
I'd add "show document content" to the list.
Thanks,
JV.