Experience with Helix Architecture in Sitecore Development

Slide Note
Embed
Share

Explore the journey of implementing Helix Architecture in Sitecore development, discussing challenges with tools like Unicorn and TDS, deployment strategies, and project dependencies, aiming to provide insights into building complex websites efficiently.


Uploaded on Sep 27, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. The story of my Helix implementations Build your own Habitat Presentation Discussion

  2. My experience with Helix Multisite with Helix architecture using Unicorn which didn t go well (standard n-tier application with habitat build process) Habitat module for Sitecore Hackathlon 2016 made for fun Multisite with Helix & TDS built according to best practices Sitecore marketplace module using Helix architecture

  3. What is Helix Architecture Number of dependencies vs Effort

  4. Helix Architecture Smart approach to create complex websites

  5. First decission: TDS or Unicorn? Usually: >> In Helix: > It s customer (budget) driven anyway

  6. Helix on Unicorn Hint which item belongs to which project is great Projects dependencies in configuration works (and can be checked globally on unicorn.aspx page)

  7. Helix on Unicorn Convenient deployment on local machine with Habitat gulp scripts (deploy selected layer, auto-deploy CSS, cshtml ) Can deploy selected configuration (like only features of particular website) using unicorn.aspx. Rainbow Code Generation is not as straightforward as TDS Memory issues in build script, if syncing whole solution with huge numer of items: Change scripts/unicorn.js: var syncScript =__dirname + "/Unicorn/./Sync.ps1 -secret " + secret + " -url " + url; var options = { cwd: __dirname + "/Unicorn/", maxBuffer: 1024 * 400 }; Orphant items in sync directory

  8. Helix on TDS Even more projects - XXX.Feature.YYY, XXX.Feature.YYY.Master, XXX.Feature.YYY.Core) Project dependencies can t be displayed in single location (you don t want to open every project ) Not easy to sync selected layers or projects (only one or all). TdsGlobal.config + Deploy Solution Sync all TDS Projects using History

  9. Helix on TDS Deployment is slow. Hedhehog has solution for this - use one TDS project with rules http://www.hhog.com/blog/sitecore-helix-fxcop-rules) Problems with namespaces in code generation Use your own .tt files. Header Transform File: using GlassMapper.Sc.Fields; using Sitecore.Data . using SmartSitecore.Foundation.PageBase.Models; //location of GlassBase class Github sample without code gen and it s not as supported as Unicorn code. No gulp tasks usage need to modify the one for Unicorn. Anyway works surprisingly good

  10. CI/CD deployment of Helix with Unicorn Code Standard way with Web Deploy or Octopus. If you keep the convention easy to deploy single site only in multisite solution (because of folders separation). Items via Unicorn Copy .yml from selected folders to synchronization directory on the server (possible via nuget package, or Octopus) Automatic sync of selected configuration (layer or project) with Octopus script: https://www.sitecorenutsbolts.net/2016/03/14/Octopus-Deploy-Step- for-Unicorn-Sync/

  11. CI/CD deployment of Helix with TDS Code Same as Unicorn Items via TDS Aggregation project to improve performance and remove not needed content items. It will create single .update package file. Deploy as usual with Sitecore Package Deployer or Sitecore.Ship Nuget package with items:

  12. Developer/Architects Helix Concerns

  13. Is it a Feature or Foundation? If you know all the details at startup, plan it. If not don t care too much, it can be refactored easily.

  14. Component = Feature? Feature may be something bigger than single component

  15. But if Feature depends on another feature Split it, instead of moving whole feature to foundation layer, just because other features have reference to it.

  16. More tips Avoid too atomic features you will end with hundreds of .csproj If you place too much code in Foundation, it become Feature (remember: Foundation = stable code) Document your projects (after 3 months you may not remember what is your 58th project about) All official samples are without Solr, Glass.Mapper and auto- generated model classes

  17. Other Benefits of Helix architecture Code merging (for fans of merging TDS .csproj with hundreds of items) Build your VS templates for your projects or use https://marketplace.visualstudio.com/items?itemName=AndersLaublaubp lusco.SitecoreHelixVisualStudioTemplates Architecture is well known, easier onboarding proces for new developers

  18. Implementing helixed sitecore module Architecture is great for this Single Feature or Foundation .csproj = Module Looks good on your github

  19. Thanks! Tomasz Juranek http://smartsitecore.com https://www.linkedin.com/in/tjuranek USA HQ Toll Free: 866-687-3588 Tel: +1-512-516-8880 Bulgaria Tel: +359-2-902-3760 Poland Tel: +48-71-382-2800 EMAIL info@softserveinc.com Germany Tel: +49-69-2602-5857 UK Tel: +44-207-544-8414 WEBSITE: www.softserveinc.com Ukraine HQ Tel: +380-32-240-9090 Netherlands Tel: +31-20-262-33-23

Related