-2

We have three sites which were initially developed using sitecore (version 9.0.2) multisite with helix and sites are running live. We have these three sites and two domains so our final urls for three sites are something like as follows:

1)www.site1.com

2)www.site2.com

3)www.site2.com/site3

That means site3 is running on a sort of virtual directory on the same domain where site2 is running. My content structure shown in the following screenshot.

enter image description here

And my site's “SiteDefinition.config” looks like the following one.(In which site3 is mainly setup using 'virtualFolder,physicalFolder' can be seen in the following code)

    <?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <sites>
      <site name="site1" patch:before="site[@name='website']"
            enableTracking="true"
            hostName="site1.sc"
            virtualFolder="/"
            physicalFolder="/"
            rootPath="/sitecore/content/site1"
            startItem="/Home"
            notFoundItem="/404"
            database="web"
            domain="extranet"
            allowDebug="true"
            cacheHtml="true"
            htmlCacheSize="50MB"
            registryCacheSize="0"
            viewStateCacheSize="0"
            xslCacheSize="25MB"
            filteredItemsCacheSize="10MB"
            enablePreview="true"
            enableWebEdit="true"
            enableDebugger="true"
            disableClientData="false"
            cacheRenderingParameters="true"
            renderingParametersCacheSize="10MB"
            enableItemLanguageFallback="false"
            enableFieldLanguageFallback="false"
             />
      <site name="site2" patch:before="site[@name='website']"
                  enableTracking="true"
                  hostName="site2.sc"
                  virtualFolder="/"
                  physicalFolder="/"
                  rootPath="/sitecore/content/site2"
                  startItem="/Home"
                  notFoundItem="/404"
                  database="web"
                  domain="extranet"
                  allowDebug="true"
                  cacheHtml="true"
                  htmlCacheSize="50MB"
                  registryCacheSize="0"
                  viewStateCacheSize="0"
                  xslCacheSize="25MB"
                  filteredItemsCacheSize="10MB"
                  enablePreview="true"
                  enableWebEdit="true"
                  enableDebugger="true"
                  disableClientData="false"
                  cacheRenderingParameters="true"
                  renderingParametersCacheSize="10MB"
                  enableItemLanguageFallback="false"
                  enableFieldLanguageFallback="false"
                  />
      <site name="site3" patch:before="site[@name='site2']"
                  enableTracking="true"
                  hostName="site2.sc"
                  virtualFolder="/site3"
                  physicalFolder="/site3"
                  rootPath="/sitecore/content/site3"
                  startItem="/home"
                  notFoundItem="/404"
                  database="web"
                  domain="extranet"
                  allowDebug="true"
                  cacheHtml="true"
                  htmlCacheSize="50MB"
                  registryCacheSize="0"
                  viewStateCacheSize="0"
                  xslCacheSize="25MB"
                  filteredItemsCacheSize="10MB"
                  enablePreview="true"
                  enableWebEdit="true"
                  enableDebugger="true"
                  disableClientData="false"
                  cacheRenderingParameters="true"
                  renderingParametersCacheSize="10MB"
                  enableItemLanguageFallback="false"
                  enableFieldLanguageFallback="false"
                  />
    </sites>
  </sitecore>
</configuration>

Now we need to separate the sites code so that we can work on site3 independently while another team can take care of site1 and site2,is it possible to duplicate the code inside a folder named “site3” and only site3 will point to this code and other two sites will use the existing code?

After reading some comments I am adding this further explanation:

The problem is that currently the code is deployed on single location which is utilized by all three sites,now Let say if i create separate feature modules for all the new feature of site3 even then what about the existing features of site3 as the existing feature shared the same .dll with others two sites and if i create all new features module then it will be reinventing the wheel and still if we have to made any changes to foundation .dlls then we will still have dependency,

Note: The two teams that will be working on the sites are completely independent teams and will have no/ very less interaction in the future. we have already discussed a suggestion of sharing the same master repository of code between the teams that was not appreciated by both the teams because in that case who will take the merging the code responsibility and if any issues raise then there would be blame game.

  • rather than using code independently, you can create sperate feature modules for Site 3 and just deploy it to Site 3. You need to give more details on exactly what you need when you say different code for same Solution. – Nikhil Kulkarni Dec 29 '19 at 5:34
  • As code relates to rendering in the sitecore. In case, renderings are not shared across the sites, I believe we can make the renderings restricted to a particular site only by using datasource location and the problem will be solved. Kindly revert in case there is anything I have missed. – Hemant Kumar Dec 29 '19 at 10:20
  • @NikhilKulkarni the problem is that currently the code is deployed on single location which is utilized by all three sites,so for further explanation, Let say if i create separate feature modules for all the new feature of site3 but then what about the existing features of site3 as the existing feature shared the same .dll with others two sites and if i create all new features module then it will be reinventing the wheel and still if we have to made any changes to foundation .dlls then we will still have dependency, I am also adding further explanation in my question as well. – Tabish Usman Dec 30 '19 at 7:08
  • @HemantKumar I have added further explanation about the approaches we have already discuss the with the teams internally , hope it will help in understanding the problem – Tabish Usman Dec 30 '19 at 7:23
3
+50

If you don't want to work together, you should not share a Sitecore environment. Buy another license and create 2 environments. Might seem a bit drastic, but that is the only solution if you really don't want to share code.

A Sitecore environment (websites front-end) is actually an IIS website running in an App pool. And that IIS website has 1 code base. Not multiple.

You might consider creating multiple IIS sites to have multiple code bases pointing towards the same Sitecore instance. This can work the first few days.. but after a few deploys you will find yourself in trouble as the database will have references to code you don't have.

So in my humble opinion, what you are asking is actually not possible with a single Sitecore license. At least not in any good way.

As an extra license might a bit expensive - I would encourage you to find a way to have the teams work together. That should really be possible - I know of at least one customer that has many teams working together on a single Sitecore solution. You just need people who are willing to work together and good work flow.

And someone (can be multiple people) to keep an overview.. always remember Sitecore is more than a few renderings. Someone might put something in the pipelines that breaks other stuff.

In short: you need either

  • extra Sitecore environment(s) - licenses?
  • people who want to work together and someone to keep an overview
| improve this answer | |
  • thanks for the detailed answer it cleared ambiguities and I am summarizing it as 3 options suggested from your end which i will discuss with my team and decide accordingly 1)extra Sitecore environment(s) - licenses? 2)people who want to work together and someone to keep an overview 3)separate iis sites(for which I got further details from another answer devargument.com/PostDetails/22059/… ) – Tabish Usman Jan 1 at 6:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.