Wednesday, May 9, 2012

Sitecore Best Practices

Design Prospective:
1. Put components statically in html if it is being used multiple times and not much changes required. Use placeholders only to bind those components which are getting change frequently.
2. Always set presentation details on _standard values.
3. Do appropriate image resizing on server else it will slow down the performance when opening on browse.
4. Create template for providing data to presentation component.
5. Get the Data from DataSource from component Parameters to get variations.

Code Prospective:
1. Test your html/css/javascript code in such a way that Page Editor is enable for edit by non technical staff.
2. Given meaningful names to placeholder so that right component could add under right placeholder.
3. Write code using C# coz this is language generally use by Sitecore Support team.
Use GUID instead of path/name as content can be moved to some other location in content tree.
4. Create separate config file for your component instead of adding directly in web.config.
5. Use Lucene Search in case data is large
6. Do customization(if required) carefully and properly tested as it can impact the performance.