[Brainstorming] "Code" subspace for apps

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Brainstorming] "Code" subspace for apps

vmassol
Administrator
Hi devs,

I’ve just had a quick chat with Edy and I found that we had a difference of opinion on the Code subspace practice.

On https://dev.xwiki.org/xwiki/bin/view/Community/ApplicationDevelopmentBestPractices we say:
"Technical pages must be put in a subspace named Code”

Now Edy says that this should be done only for data-generating apps.

It’s not my recollection that this rule was only for this case and this is what I’d like to discuss here.

For example, I’ve noticed that ActiveInstalls has all technical pages under ActiveInstalls, see
https://github.com/xwiki/xwiki-platform/tree/053f0a2757cea18a5916632a58c6046ba61954cd/xwiki-platform-core/xwiki-platform-activeinstalls/xwiki-platform-activeinstalls-server/xwiki-platform-activeinstalls-server-ui/src/main/resources/ActiveInstalls

I would fix it to have only the WebHome remain under ActiveInstalls and move all the technical pages under ActiveInstalls.Code.

The only case where it could make sense to not have a Code subspace would be when the app has no UI at all. Even in this case, you might argue that we should always have a home to provide a description about the content of the space.

So right now I’m personally in favor of continuing the rule we defined in the best practices:
"Technical pages must be put in a subspace named Code”

WDYT?

Thanks
-Vincent

Reply | Threaded
Open this post in threaded view
|

Re: [Brainstorming] "Code" subspace for apps

Alex Cotiugă
On Thu, Sep 27, 2018 at 5:04 PM Vincent Massol <[hidden email]> wrote:

> Hi devs,
>
> I’ve just had a quick chat with Edy and I found that we had a difference
> of opinion on the Code subspace practice.
>
> On
> https://dev.xwiki.org/xwiki/bin/view/Community/ApplicationDevelopmentBestPractices
> we say:
> "Technical pages must be put in a subspace named Code”
>
> Now Edy says that this should be done only for data-generating apps.
>

This sounds to me like an exception from a rule. Time has taught us that
nothing is unchangeable and we can expect at some point to have some
content in a non-data-generating app.
I would prefer to keep the current rule.


> It’s not my recollection that this rule was only for this case and this is
> what I’d like to discuss here.
>
> For example, I’ve noticed that ActiveInstalls has all technical pages
> under ActiveInstalls, see
>
> https://github.com/xwiki/xwiki-platform/tree/053f0a2757cea18a5916632a58c6046ba61954cd/xwiki-platform-core/xwiki-platform-activeinstalls/xwiki-platform-activeinstalls-server/xwiki-platform-activeinstalls-server-ui/src/main/resources/ActiveInstalls
>
> I would fix it to have only the WebHome remain under ActiveInstalls and
> move all the technical pages under ActiveInstalls.Code.
>
> The only case where it could make sense to not have a Code subspace would
> be when the app has no UI at all. Even in this case, you might argue that
> we should always have a home to provide a description about the content of
> the space.
>
> So right now I’m personally in favor of continuing the rule we defined in
> the best practices:
> "Technical pages must be put in a subspace named Code”
>
> WDYT?
>
> Thanks
> -Vincent
>
> Thanks,
Alex
Reply | Threaded
Open this post in threaded view
|

Re: [Brainstorming] "Code" subspace for apps

Marius Dumitru Florea
In reply to this post by vmassol
+1 to not require the Code space if the application doesn't have pages that
are meant to be accessed directly. For instance, I don't see the need for
the Code space on an application that:

* has all its pages hidden (all are technical pages)
* the application defines a macro that is listed on the macro index and on
the WYSIWYG editor
* the application defines an administration section available in the wiki
administration
* the application extends the XWIki UI through an extension point
* etc.

I really don't see why I would need to put the CKEditor code in
CKEditor.Code when there's no page in the CKEditor Integration application
that is meant to be accessed by the users.

Thanks,
Marius

On Thu, Sep 27, 2018 at 5:04 PM Vincent Massol <[hidden email]> wrote:

> Hi devs,
>
> I’ve just had a quick chat with Edy and I found that we had a difference
> of opinion on the Code subspace practice.
>
> On
> https://dev.xwiki.org/xwiki/bin/view/Community/ApplicationDevelopmentBestPractices
> we say:
> "Technical pages must be put in a subspace named Code”
>
> Now Edy says that this should be done only for data-generating apps.
>
> It’s not my recollection that this rule was only for this case and this is
> what I’d like to discuss here.
>
> For example, I’ve noticed that ActiveInstalls has all technical pages
> under ActiveInstalls, see
>
> https://github.com/xwiki/xwiki-platform/tree/053f0a2757cea18a5916632a58c6046ba61954cd/xwiki-platform-core/xwiki-platform-activeinstalls/xwiki-platform-activeinstalls-server/xwiki-platform-activeinstalls-server-ui/src/main/resources/ActiveInstalls
>
> I would fix it to have only the WebHome remain under ActiveInstalls and
> move all the technical pages under ActiveInstalls.Code.
>
> The only case where it could make sense to not have a Code subspace would
> be when the app has no UI at all. Even in this case, you might argue that
> we should always have a home to provide a description about the content of
> the space.
>
> So right now I’m personally in favor of continuing the rule we defined in
> the best practices:
> "Technical pages must be put in a subspace named Code”
>
> WDYT?
>
> Thanks
> -Vincent
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [Brainstorming] "Code" subspace for apps

Guillaume Delhumeau
In reply to this post by Alex Cotiugă
Le jeu. 27 sept. 2018 à 16:16, Alex Cotiugă <[hidden email]> a
écrit :

> On Thu, Sep 27, 2018 at 5:04 PM Vincent Massol <[hidden email]> wrote:
>
> > Hi devs,
> >
> > I’ve just had a quick chat with Edy and I found that we had a difference
> > of opinion on the Code subspace practice.
> >
> > On
> >
> https://dev.xwiki.org/xwiki/bin/view/Community/ApplicationDevelopmentBestPractices
> > we say:
> > "Technical pages must be put in a subspace named Code”
> >
> > Now Edy says that this should be done only for data-generating apps.
> >
>
> This sounds to me like an exception from a rule. Time has taught us that
> nothing is unchangeable and we can expect at some point to have some
> content in a non-data-generating app.
> I would prefer to keep the current rule.
>

I agree.


>
>
> > It’s not my recollection that this rule was only for this case and this
> is
> > what I’d like to discuss here.
> >
> > For example, I’ve noticed that ActiveInstalls has all technical pages
> > under ActiveInstalls, see
> >
> >
> https://github.com/xwiki/xwiki-platform/tree/053f0a2757cea18a5916632a58c6046ba61954cd/xwiki-platform-core/xwiki-platform-activeinstalls/xwiki-platform-activeinstalls-server/xwiki-platform-activeinstalls-server-ui/src/main/resources/ActiveInstalls
> >
> > I would fix it to have only the WebHome remain under ActiveInstalls and
> > move all the technical pages under ActiveInstalls.Code.
> >
> > The only case where it could make sense to not have a Code subspace would
> > be when the app has no UI at all. Even in this case, you might argue that
> > we should always have a home to provide a description about the content
> of
> > the space.
> >
> > So right now I’m personally in favor of continuing the rule we defined in
> > the best practices:
> > "Technical pages must be put in a subspace named Code”
> >
> > WDYT?
> >
> > Thanks
> > -Vincent
> >
> > Thanks,
> Alex
>


--
Guillaume Delhumeau ([hidden email])
Research & Development Engineer at XWiki SAS
Committer on the XWiki.org project
Reply | Threaded
Open this post in threaded view
|

Re: [Brainstorming] "Code" subspace for apps

vmassol
Administrator
In reply to this post by Marius Dumitru Florea
Hi Marius,

> On 28 Sep 2018, at 10:13, Marius Dumitru Florea <[hidden email]> wrote:
>
> +1 to not require the Code space if the application doesn't have pages that
> are meant to be accessed directly. For instance, I don't see the need for
> the Code space on an application that:

The idea was consistency. It’s nicer from a best practice POV to know that all technical pages are located in the Code subspace.

This is very similar to the idea that in Maven you’ll find the Java sources in src/main/java, and not come up with some complex rules such as: if the module has only 1 java class then it could be put at the root, or…. You get the gist.

> * has all its pages hidden (all are technical pages)
> * the application defines a macro that is listed on the macro index and on
> the WYSIWYG editor

I think that falls in the first category you listed already since the macro would be a hidden page.

> * the application defines an administration section available in the wiki
> administration

I think that falls in the first category you listed already since the macro would be a hidden page.

> * the application extends the XWIki UI through an extension point

I think that falls in the first category you listed already since the macro would be a hidden page.

> * etc.
>
> I really don't see why I would need to put the CKEditor code in
> CKEditor.Code when there's no page in the CKEditor Integration application
> that is meant to be accessed by the users.

Consistency and simpler rule.

Thanks
-Vincent

> Thanks,
> Marius
>
> On Thu, Sep 27, 2018 at 5:04 PM Vincent Massol <[hidden email]> wrote:
>
>> Hi devs,
>>
>> I’ve just had a quick chat with Edy and I found that we had a difference
>> of opinion on the Code subspace practice.
>>
>> On
>> https://dev.xwiki.org/xwiki/bin/view/Community/ApplicationDevelopmentBestPractices
>> we say:
>> "Technical pages must be put in a subspace named Code”
>>
>> Now Edy says that this should be done only for data-generating apps.
>>
>> It’s not my recollection that this rule was only for this case and this is
>> what I’d like to discuss here.
>>
>> For example, I’ve noticed that ActiveInstalls has all technical pages
>> under ActiveInstalls, see
>>
>> https://github.com/xwiki/xwiki-platform/tree/053f0a2757cea18a5916632a58c6046ba61954cd/xwiki-platform-core/xwiki-platform-activeinstalls/xwiki-platform-activeinstalls-server/xwiki-platform-activeinstalls-server-ui/src/main/resources/ActiveInstalls
>>
>> I would fix it to have only the WebHome remain under ActiveInstalls and
>> move all the technical pages under ActiveInstalls.Code.
>>
>> The only case where it could make sense to not have a Code subspace would
>> be when the app has no UI at all. Even in this case, you might argue that
>> we should always have a home to provide a description about the content of
>> the space.
>>
>> So right now I’m personally in favor of continuing the rule we defined in
>> the best practices:
>> "Technical pages must be put in a subspace named Code”
>>
>> WDYT?
>>
>> Thanks
>> -Vincent
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: [Brainstorming] "Code" subspace for apps

Thomas Mortagne
Administrator
In reply to this post by vmassol
+1

Now we should be careful about existing pages which are not in a Code
space, moving them is often a breakage (and not just for xclass).
On Thu, Sep 27, 2018 at 4:04 PM Vincent Massol <[hidden email]> wrote:

>
> Hi devs,
>
> I’ve just had a quick chat with Edy and I found that we had a difference of opinion on the Code subspace practice.
>
> On https://dev.xwiki.org/xwiki/bin/view/Community/ApplicationDevelopmentBestPractices we say:
> "Technical pages must be put in a subspace named Code”
>
> Now Edy says that this should be done only for data-generating apps.
>
> It’s not my recollection that this rule was only for this case and this is what I’d like to discuss here.
>
> For example, I’ve noticed that ActiveInstalls has all technical pages under ActiveInstalls, see
> https://github.com/xwiki/xwiki-platform/tree/053f0a2757cea18a5916632a58c6046ba61954cd/xwiki-platform-core/xwiki-platform-activeinstalls/xwiki-platform-activeinstalls-server/xwiki-platform-activeinstalls-server-ui/src/main/resources/ActiveInstalls
>
> I would fix it to have only the WebHome remain under ActiveInstalls and move all the technical pages under ActiveInstalls.Code.
>
> The only case where it could make sense to not have a Code subspace would be when the app has no UI at all. Even in this case, you might argue that we should always have a home to provide a description about the content of the space.
>
> So right now I’m personally in favor of continuing the rule we defined in the best practices:
> "Technical pages must be put in a subspace named Code”
>
> WDYT?
>
> Thanks
> -Vincent
>


--
Thomas Mortagne
Reply | Threaded
Open this post in threaded view
|

Re: [Brainstorming] "Code" subspace for apps

vmassol
Administrator


> On 1 Oct 2018, at 10:18, Thomas Mortagne <[hidden email]> wrote:
>
> +1
>
> Now we should be careful about existing pages which are not in a Code
> space, moving them is often a breakage (and not just for xclass).

yes we should not move them. Not until we have a real solution such as aliases.

Thanks
-Vincent

> On Thu, Sep 27, 2018 at 4:04 PM Vincent Massol <[hidden email]> wrote:
>>
>> Hi devs,
>>
>> I’ve just had a quick chat with Edy and I found that we had a difference of opinion on the Code subspace practice.
>>
>> On https://dev.xwiki.org/xwiki/bin/view/Community/ApplicationDevelopmentBestPractices we say:
>> "Technical pages must be put in a subspace named Code”
>>
>> Now Edy says that this should be done only for data-generating apps.
>>
>> It’s not my recollection that this rule was only for this case and this is what I’d like to discuss here.
>>
>> For example, I’ve noticed that ActiveInstalls has all technical pages under ActiveInstalls, see
>> https://github.com/xwiki/xwiki-platform/tree/053f0a2757cea18a5916632a58c6046ba61954cd/xwiki-platform-core/xwiki-platform-activeinstalls/xwiki-platform-activeinstalls-server/xwiki-platform-activeinstalls-server-ui/src/main/resources/ActiveInstalls
>>
>> I would fix it to have only the WebHome remain under ActiveInstalls and move all the technical pages under ActiveInstalls.Code.
>>
>> The only case where it could make sense to not have a Code subspace would be when the app has no UI at all. Even in this case, you might argue that we should always have a home to provide a description about the content of the space.
>>
>> So right now I’m personally in favor of continuing the rule we defined in the best practices:
>> "Technical pages must be put in a subspace named Code”
>>
>> WDYT?
>>
>> Thanks
>> -Vincent
>>
>
>
> --
> Thomas Mortagne