Sitecore provides Multisite Architecture in which single installation of Sitecore can create multiple websites and publish them in the same Sitecore instance. This way it becomes accessible to hosts all an organizations website in a Single Sitecore Instance.
Question:What could be the best way to make one site’s code independent of other while using sitecore multisite with helix code architecture?
Description: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. [Image] 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? Further explanation about the approaches we have already discuss the with the teams internally, added 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.
Posted by: Tabish Usman | Posted on: Dec 17, 2019