Helix.Docs icon indicating copy to clipboard operation
Helix.Docs copied to clipboard

RFC: Multi-site and Project-layer HTML

Open nickwesselman opened this issue 7 years ago • 4 comments

Helix feedback has included a desire for more guidance on multi-site implementation, specifically the ability to implement site-specific designs. This is a complex topic as multi-site implementation approaches can vary significantly.

  • Can the sites share semantic markup, and thus share Features, and then use CSS to vary design? Feedback is that this often sounds better in concept than it works in practice.
  • Can the sites share Feature back-end code (Controllers, Models, Services, etc), then vary markup by Site/Project via MVC Areas or other techniques? This sort of reuse can lead to exception logic, testing difficultly, and other increased maintenance cost as a change to a Feature now impacts multiple sites.
  • Should the sites be implemented independently (even copying logic) with only essential shared infrastructure placed in the Foundation layer? Site-specific Feature modules can be placed in Module Groups.

There will obviously be multiple approaches to document as no single one will fit all requirements. What are the most effective strategies? And are there other multi-site concerns not currently covered by Helix?

nickwesselman avatar Nov 08 '18 19:11 nickwesselman

It would be great to see some approaches to help people find a good fit; sharing all back-end code across Feature and Foundation and only varying styles in the Project layer, copying/duplicating code to service multiple projects, using some sort of middle-ground solution such as Feature groups or Project HTML.

dthunziker avatar Nov 11 '18 05:11 dthunziker

From my experience its very had to keep it all clean and easy to maintain. One of the advantages of a feature is that it provides good encapsulation of the functionality in once place which aids to maintainability.

Personally the choice will come down to the exact requirments, however the feature level semantic markup and modify design in CSS is a great idea but often fails in the real world.

Copying/duplicating code in my opinion is just a NO. We need to think about real world testing/maintenance requirements as well as the helix standards here.

So for me splitting the views makes the most sense, but I think we need to come up with a good standard approach to doing this.

lakesol avatar Nov 12 '18 10:11 lakesol

Relevant StackExchange answer from @jammykam: https://sitecore.stackexchange.com/questions/3889/how-to-handle-alternative-presentation-for-a-helix-feature-module/3896#3896

nickwesselman avatar Mar 08 '19 20:03 nickwesselman

Use of areas and project layer markup could be considered a violation of Common Closure, but I think it's a practical approach and should be discussed in Helix Docs and examples.

nickwesselman avatar Mar 26 '19 18:03 nickwesselman