Tags

,

Sitecore best practices are designed for the ease of editor, site performance (Sitecore client and website) and site maintainability. This will help Sitecore developers and administrators create optimized websites.

Below are the areas where we need to validate the best practices but this is not complete one, will be evolving in nature.

  1. Templates and _Standard Values
  2. Information / Content Architecture (IA)
  3. Security
  4. Workflow
  5. Media
  6. Caching
  7. Presentation
  8. Page Editor
  9. Solution Code
  10. System Architecture

1.    Templates and _Standard Values

  • Naming Conventions: Name of templates, its section and field should be simple, relevant and easy to understand. This should be business name which content editor can easily understand. Use the Title field of the definition item to present a different name for the field to the user
  • Folder Structure for Templates: The folder structure should be such a way that it would easy to navigate. For this create the templates folder like “Base Templates”, “Content Templates”, “Page Templates” etc.
  • Inheritance: Analyze the site fields and put the common fields and section in “Base Templates” and inherit these to wherever required rather than creating new fields. For example- Create a base template “Navigation” with fields “BrowserTitle”,”BrowserTitle”, “HideInSearch” etc. As these field are required on each and every pages so rather than creating field on each page template just inherit “Navigation” Template on page Template.
  • Avoid duplicate field name: Don’t create two fields with same name on template and also avoid the duplicity of field name in inheritance chain.
  • Template Icons: Assign icons on templates which will provide visual clue for content editor on type of item type will get created.
  • Help Option: Use the Help option in the individual field definition items to provide extra information to users about field.
  • Standard Values: Assign layout details, insert option, initial workflow on standard value. Use tokens, such as $name, $date to reduce the amount of text that a content author is required to enter when creating a new item.
  • Image field: While defining a field of type image provide source field, which will take editor to the defined source path in media library on during content editing, not the entire media library.

2.    Information/ Content Architecture (IA)

  1. Number of child items of given node should not be more than 100. This will improve the performance.
  2. Number of versions of an item should not be more than 10. You can manage version number by shared source module- http://trac.sitecore.net/VersionManager
  3. For content editor, hide standard fields to improve the performance.
  4. Don’t put JS or define structure in RTE, this should be part of business logic not of RTE field
  5. For showing big tree use TreelistEx instead of Treelist becuase TreelistEx only computes the tree when you click Edit whereas a Treelist will compute it every time it is rendered.
  6. Structure of item in tree define the URL by default, so keep in mind while creating folders in content tree because that will be part of URL.
  7. Put all the items inside home which have public URL / landing page.

3.    Security

  1. Apply security to roles rather than users, if a new user will get added then only need assign the role, the same permission will get applicable for new user.
  2. Limit access to the parts of the content tree that are relevant to the user that is logged into the system. For example, a person who is responsible for news items may not require access to the Event page.
  3. Sitecore client password should not be empty or obvious.
  4. Use admin account for administration purpose only not for content editing etc.

4.    Workflow

  1. Sitecore recommend to enable workflow, this will ensure the content will go on live website through a pre-defined approval states. This is useful for auto versioning of item on edit.
  2. Apply appropriate workflow security.
  3. Avoid email notification on every workflow state.

5.    Media

  1. The recommended practice says put the media in database, this simplifies publishing and deployment of media assets.
  2. The folder structure of the media library should be organized so that it is easy to navigate for non- technical users.
  3. Media item name should be easy to recognize and understand for business users.
  4. Media items should be optimized, using a graphics program such as Photoshop to decrease the size of a rendered page thereby increasing performance. Use sprite images where ever possible.
  5. Include the path to static media items (header images, CSS files, JavaScript files, and so on.) in the IgnoreUrlPrefixes setting located in the web.config file. This will prevent those media items from being processed through the Sitecore pipelines, improving performance.

6.    Caching

  1. Sitecore recommends to configure and tune the Sitecore database caches — prefetch, data, and item. Use the below link for the same. http://sdn.sitecore.net/upload/sitecore6/sc62keywords/cache_configuration_reference_us.pdf
  2. Cache the expensive logic and components that are retrieved frequently http://sdn.sitecore.net/upload/sitecore6/64/presentation_component_reference-usletter.pdf

7.    Presentation

  1. Limit the number of layouts in favor of sublayouts. The aim should be to have one layout per site per device
  2. Assign presentation details on the _standard values whenever possible
  3. To enable experience editor use FieldRenderer or the other Sitecore presentation controls.
  4. Use image scaling and resizing for smaller or thumbnail from large image.
  5. Make sure to use the DataSource .This facilitates creating multi-variant tests (A/B) and personalization rules.
  6. Use presentation components parameters to change the behavior of components in term of look and feels etc.
  7. Make sure to create a template for any parameters in the presentation component, and set the Parameters Template Property.

8.    Page Editor

  1. Sitecore recommend to enable and configure page editor for non-technical content editor.
  2. Configure the placeholder settings so that users are able to add the right components to the page.
  3. Consider using the Page Editor buttons, and the Datasource Location, and Datasource Template fields

9.    Solution Code

  1. Sitecore highly recommend do coding in C#.
  2. Use GUIDs where possible instead of path / name. This will improve performance, as well as prevent any breakage if you move content to a new location in the content tree.
  3. Use patch file in App_Config/Include rather than directly modifying web.config file.

10.   System Architecture

  1. The Web server(s) should run IIS 7.x with the latest security updates
  2. You use IIS 7.x in integrated mode.
  3. The Web and Database servers should be on separate computers.
  4. Implement maintenance plans to defragment indexes on the core, master, and web databases on a scheduled basis on SQL Server
  5. Enable static content compression in IIS
  6. Make sure that the content expires header is set in the common headers, particularly for the /sitecore folder in IIS
  7. Refer the links https://kb.sitecore.net/articles/087164 for sitecore compatibility of OS, database and .Net framework with Sitecore versions.
Advertisements