You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Carsten Steckel <cs...@googlemail.com> on 2016/10/20 12:28:31 UTC

OO style inheritance of master website to child websites

Hi all,

I am a NOOB to sling and content repositories, so be gentle.

I have 2000 very similar websites that share >95% of the structure, config,
assets, data, ... but every website has a different author user base which
need to change/adopt the remainging content (where permitted). The websites
all need to be linked to a "master" site. If something is changed in the
master, all childs "inherit" the change. (e.g. master publishes a new
product launch page and all childs inherit it)

Inheritance comes to mind where a Master website is defined and every child
inherits its masters config, content, assets, ... but overwrites if
necessary.

Overlaying comes to mind where the content, config, assets of a child
overlays the master web-site.

A fancy "copy new content from master to childs event handling" is not an
option.

I found Jira Issue #5750 <https://issues.apache.org/jira/browse/SLING-5750> and
#4386 <https://issues.apache.org/jira/browse/SLING-4386> and read "Ideas
for a multi-tenant and multi-module content model
<https://cwiki.apache.org/confluence/display/SLING/Ideas+for+a+multi-tenant+and+multi-module+content+model>",
"Multitanent"
<https://cwiki.apache.org/confluence/display/SLING/Multitenancy+scenarios+and+use+cases>
,

I found Context Aware Configuration
<"https://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration.html">

After reading all this, I could still not answer if I can define a master
website (structure, content, config, data, assets, ...) and inherit a child
website, that "overwrites" only a few bits.

Is this something I could do with AEM or sling?

Easy or hard?

Please point me in the right direction.

Cheers
Carsten

Re: OO style inheritance of master website to child websites

Posted by Julian Sedding <js...@gmail.com>.
The "Superimposing Resource Provider"[0] was created for this (or a
similar) use-case. YMMV.

Regards
Julian

[0] https://github.com/apache/sling/tree/trunk/contrib/extensions/superimposing

On Thu, Oct 20, 2016 at 2:59 PM, Bertrand Delacretaz
<bd...@apache.org> wrote:
> Hi,
>
> On Thu, Oct 20, 2016 at 2:28 PM, Carsten Steckel
> <cs...@googlemail.com> wrote:
>> ...Inheritance comes to mind where a Master website is defined and every child
>> inherits its masters config, content, assets, ... but overwrites if
>> necessary...
>
> The Sling Resource Merger [1] goes in that direction but I haven't
> heard so far from people using it in the way that you mention, what
> I've seen is simpler use cases where configuration-like resources are
> being merged.
>
> But if you stick to the Sling Resource API (as opposed to JCR) and
> manage access rights carefully it might work for your use case.
>
> -Bertrand
>
> [1] https://sling.apache.org/documentation/bundles/resource-merger.html

Re: OO style inheritance of master website to child websites

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,

On Thu, Oct 20, 2016 at 2:28 PM, Carsten Steckel
<cs...@googlemail.com> wrote:
> ...Inheritance comes to mind where a Master website is defined and every child
> inherits its masters config, content, assets, ... but overwrites if
> necessary...

The Sling Resource Merger [1] goes in that direction but I haven't
heard so far from people using it in the way that you mention, what
I've seen is simpler use cases where configuration-like resources are
being merged.

But if you stick to the Sling Resource API (as opposed to JCR) and
manage access rights carefully it might work for your use case.

-Bertrand

[1] https://sling.apache.org/documentation/bundles/resource-merger.html

Re: OO style inheritance of master website to child websites

Posted by Thomas Hartmann <th...@netcentric.biz>.
Hi Carsten, 

that is imho more an AEM then sling use case. The functionality you are describing is covered my AEMs MSM Live Copies(Multi Site Manager).
It basically allows you create a copy of an existing website and to automatically distribute changes to the live copies. The relationship is configured through a rollout config that determines how content is automatically updated.

It is also possible to exclude parts of the website or even single component  or properties from being synced.

Regards

Thomas


Am 20. Oktober 2016 um 14:28:38, Carsten Steckel (csteckel@googlemail.com) schrieb:

Hi all,  

I am a NOOB to sling and content repositories, so be gentle.  

I have 2000 very similar websites that share >95% of the structure, config,  
assets, data, ... but every website has a different author user base which  
need to change/adopt the remainging content (where permitted). The websites  
all need to be linked to a "master" site. If something is changed in the  
master, all childs "inherit" the change. (e.g. master publishes a new  
product launch page and all childs inherit it)  

Inheritance comes to mind where a Master website is defined and every child  
inherits its masters config, content, assets, ... but overwrites if  
necessary.  

Overlaying comes to mind where the content, config, assets of a child  
overlays the master web-site.  

A fancy "copy new content from master to childs event handling" is not an  
option.  

I found Jira Issue #5750 <https://issues.apache.org/jira/browse/SLING-5750> and  
#4386 <https://issues.apache.org/jira/browse/SLING-4386> and read "Ideas  
for a multi-tenant and multi-module content model  
<https://cwiki.apache.org/confluence/display/SLING/Ideas+for+a+multi-tenant+and+multi-module+content+model>",  
"Multitanent"  
<https://cwiki.apache.org/confluence/display/SLING/Multitenancy+scenarios+and+use+cases>  
,  

I found Context Aware Configuration  
<"https://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration.html">  

After reading all this, I could still not answer if I can define a master  
website (structure, content, config, data, assets, ...) and inherit a child  
website, that "overwrites" only a few bits.  

Is this something I could do with AEM or sling?  

Easy or hard?  

Please point me in the right direction.  

Cheers  
Carsten