Hi Jeremie,
On 28 May 2014 at 15:48:46, Jeremie BOUSQUET
(jeremie.bousquet@gmail.com(mailto:jeremie.bousquet@gmail.com)) wrote:
Hi,
Le 28 mai 2014 15:19, "vincent(a)massol.net" a écrit :
Hi devs,
Right now our practice in XWiki Platform for the apps we develop is to
move to
storing all the pages of an app in a single space.
See
http://dev.xwiki.org/xwiki/bin/view/Community/ApplicationDevelopmentBestPra…,
specifically:
“
Generally, put all your pages in a single space dedicated for the
application
you're developing (e.g. Faq, Scheduler, IRC, AppWithinMinutes,
etc). The name must be as short as possible while still being
understandable of course and without overusing abbreviations.
"
Now there are potentially some use cases that may warrant to have 2
spaces: one
for the content documents and one for the technical documents:
- ability to easily set permissions on all
technical pages so that only a
group of person can modify them but allow another
group of persons to edit
the content pages (e.g. for the Blog application)
- easier to remove all the content pages of an
app but still keep the app
working
So one idea would be systematically have 2 spaces for apps:
- one XXX space (e.g. Blog space) for holding content pages
- one XXXCode space (e.g. BlogCode space) for holding technical pages
In my app I even use a third one : XXXPrefs. I store app config in this one
( different than app data).
It allows me to easily reset app code and content, while keeping the
configuration (which consists of many pages in my case). It also allows to
easily set specific rights to persons who can alter this configuration
(even if they can't touch the code or content).
I understand. However it seems a bit overkill to define this as a general rule IMO.
Regarding your points:
- If the need is to remove an app’s generated content and keep only config + code then
it’s easy, all you need to do is to remove/empty the XXX space
- Concerning the rights, yes I guess having a space can make it easier. However in general
an app has 1 config page (maybe 2) and it’s easy to define a right at the page level if a
user wants to decide who has the right to edit configuration IMO.
Thanks
-Vincent
Of course all
technical pages are hidden and thus the XXXCode space will
not appear in the list
of spaces or searches by default.
WDYT? Would you be ok to modify all our existing apps to go in that
direction?
Note: A future solution is to use nested spaces but even with nested
spaces the
need for 2 spaces would be the same. We would just need to make
the XXXCode space a subspace of the XXX space (assuming we can set
permissions on subspaces ;)).
>
> Thanks
> -Vincent
>