+1 for 1) +0.5 for 2). I would like to be able to create "subdirectories" inside the "Code" space, like java packages, so it means I need some non-terminal pages to create these subspaces. Otherwise, I agree. 2016-10-03 13:38 GMT+02:00 Alexandru Cotiuga <alexandru.cotiuga@xwiki.com>:
Hi Here's my +1 for these 2 rules. For the first one, it looks like is almost inevitable to not have an empty SomePage.Code.WebHome. For the second one, I would prefer to not pollute the wiki with useless WebHomes and I would also avoid adding children to class, template, sheet and translation documents(which I would definitely mark as terminal). Classes are used everywhere in queries and it would be nice to not use SomeClass.WebHome'.
Thanks, Alex
On Mon, Oct 3, 2016 at 2:21 PM, Vincent Massol <vincent@massol.net> wrote:
On 03 Oct 2016, at 13:03, Ecaterina Moraru (Valica) <valicac@gmail.com
wrote:
+1 for Rule 1) about the Code space
-0 for Rule 2) we shouldn't encourage terminal pages anymore. I know is simpler to write scripts without the need to write "WebHome" all over,
but
the problem is that, unless you plan all your application first in the head, you cannot know if you will need to break it under multiple children pages (macros, etc.) Starting first as terminal and then switching is
not
fun either, or trying to remember every time to check the terminal option because that's the rule, not fun either. Or at the end of the development process seeing some technical pages don't have children and make them terminal, just to apply with the rule, is kind of anti productive. If we switch the rule from "must be terminal pages" to "might be terminal pages" that maybe will suit me more, but then it will actually not be a rule.
Thanks Caty. Some ideas that come to mind on this:
* We have a history of having terminal pages for technical page so deciding to allow non terminal pages now is actually what would be a new rule and it means that you’d find apps with terminal pages (all existing apps) and others without terminal pages (for tech pages) so not that good for consistency. The most important point is that it wouldn’t bring much.
* There are cons for both approaches as you mention but in term of inconvenience it’s clearly less inconvenient on the code as terminal pages: ** You create a page once (and thus you have to be careful of creating it terminal) ** vs you use it several times (at least once) and you need to pay attention to add the artificial “WebHome” at the end of the reference everywhere you use it.
* Having “WebHome” as the xclass name (for example) is really not very nice. More generally, having WebHome everywhere in code pages is not very nice at all.
* You mention about having to rename a tech page if, by some chance, it requires a children in the future. This is the same kind of problem as having to rename a tech page because you initially chose a name that is not fitting, or having to split one, or… It happens all the time and we have a rename feature for this.
Anyway I see you’re -0 so you don’t like it but you’re still ok. In any case, as I mentioned above, this is about continuing what we’ve always done FTM so I don’t really see a problem with that. We can still decide to change and use nested pages for tech docs later on in the future.
What do others think?
Thanks -Vincent
Thanks, Caty
On Mon, Oct 3, 2016 at 1:09 PM, Vincent Massol <vincent@massol.net> wrote:
Hi,
This thread has been hijacked by several other proposals which were not part of my initial proposal which consisted of only 2 rules.
I’d like to progress and agree about those 2 rules **only** (for the moment). I’d like to officially put them on http://dev.xwiki.org/xwiki/ bin/view/Community/ApplicationDevelopmentBestPractices
I got the following answer related to my proposal: * Vincent: ok (obviously) * Thomas: ok * Gabriela: ok
Does anyone disagree with those 2 rules?
Barring any negative feedback, I’ll move them to http://dev.xwiki.org/xwiki/bin/view/Community/ ApplicationDevelopmentBestPractices this afternoon.
Then we can iterate on the rest of what was proposed in this thread: * Data dir * Locations for apps
Thanks -Vincent
On 27 Sep 2015, at 21:19, vincent@massol.net wrote:
Hi devs,
Following our implementation of NS/NP in 7.2 I’d like to propose 2 new best practices for app dev that we would list at http://dev.xwiki.org/xwiki/bin/view/Community/ ApplicationDevelopmentBestPractices
1) New rule 1: “Code” subspace
Current text: * 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.
New version: * 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. * Technical pages should be put in a subspace named “Code”
Note: this rule can only be applied for new applications for now since the EM doesn’t know how to follow renames currently so for example if I move pages from the FAQCode space to the FAQ.Code space, when EM upgrades the app, it’ll display all pages in FAQCode as deleted (basically it considers all pages in FAQ.Code as new pages and pages in FAQCode as deleted pages). Note: I’ve created http://jira.xwiki.org/browse/ XWIKI-12622 for this.
2) New rule 2:
* Technical pages without children must be terminal pages.
WDYT?
Thanks -Vincent
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Guillaume Delhumeau (guillaume.delhumeau@xwiki.com) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project