Sitecore Swamp

Dive in the Sitecore Swamp

NAVIGATION - SEARCH

Sitecore Best Practice - MVC

General

  • Use space in item name to provide better experience for content author, consider using Display Name for long item names
  • Do not use hyphen in any item name, and avoid using other special characters
  • Always create your own username in Sitecore and login with it
  • Do not use item name for display (rendering)

Template and Field

  • ​​All template should created under /content/templates/[Client Name]:
    • Page Template
      • ​​Represents a type of page​
      • Has layout and renderings preset in standard value​
      • Inherited from Page Base​
    • Component Template
      • Represents a view model of a rendering
      • Grouped in folder which reflects the co​ntroller na​​me
      • Inherited from Component Base​
    • Data Template
      • ​Any other template which is neither component nor page
      • Grouped in folder which reflects the purpose of usage​
      • Use meaningful name for Template and Field name, and avoid using  to provide better experience for content author
  • D​o not use hyphen in name 
  • Try to provide the source for a template field to reduce the effort for content author to lookup the entire content tree
  • Use item GUID as Sitecore field source to reduce the Sitecore refactoring effort​​​​
  • Assign the sortorder for template field section. Please see below the suggested sortorder:
    • Content/Data: 0 - 990 (not need to change)
    • Configuration: 1000 - 9900
    • Setting: 10000 -
  • Configure a meaningful icon for template
  • Configure the insert options in template standard value to reduce the effort for the content author to lookup the entire template tree ​
  • Use title and short description of field item to provide content author intructional text for that field.  

​​Layout and Rendering

  • Use View Rendering when the view model is Sitecore the template from context data source item with simple logic
  • Use Controller Rendering when the view model is built with  complex logic
  • Sitecore rendering should be grouped as epic under \content\layouts\rendering\[Client Name]\[Function Area]\[view]

TDS

  • [Client Name].TDS.Core 
    • core database items 
  • [Client Name].TDS.Master 
    • Layout items - /sitecore/Layout/Layouts/[Client Name] 
    • Rendering items- /sitecore/layout/Renderings/[Client Name] 
    • Templates items - /sitecore/templates/[Client Name] 
    • System items - /sitecore/System exclude the dictionary items 
  • [Client Name].TDS.Master.Content 
    • Content Items /sitecore/Content 
    • Dictionary items - /sitecore/System/Dictionary/[Client Name] ​
    • Media Items /sitecore/Media Library
  • ​Only add items into TDS if it's necessary

Configuration

  • ​Always patch the custom configuration in \App_Config\Include\custom\z.[configuration section].config​​.
  • To get the overview of Sitecore configuration, go to http://[sitename]/sitecore/admin/showconfig.aspx​​.
  • To get the overview of Sitecore cache, go to http://[sitename]/sitecore/admin/cache.aspx.

Source Code Version Control - Branching Strategies

Branch strategies:
Main only


This is the most simple and easy maintain branching strategy, which can later evolve to other branching strategies.

Considerations
  • Without branching, labels need to mark development and release milestones.

Development Isolation


Release Isolation
Development and Release Isolation
Servicing and Release Isolation
Servicing, Hotfix and Release Isolation
Code Promotion
Feature Isolation