WWW.GOPIGUJJULA.COM 1 COPYRIGHT 2016
SITECORE – BASIC CODE REVIEW CHECK-LIST
GOPIKRISHNA GUJJULA
WWW.GOPIGUJJULA.COM
AGENDA
• To have a better understanding on, what will be reviewed in the code-review process.
• Using this checklist, Individual engineer can self review, before submitting for code review.
• Will look into basic points to check on both Sitecore as well as code.
COPYRIGHT 20162
WWW.GOPIGUJJULA.COM
SITECORE
COPYRIGHT 20163
WWW.GOPIGUJJULA.COM
TEMPLATE
• Template Icons help to visually separate semantically related content items.
• Importance of Source for list fields (ex: Multi list, or Tree list etc.)
ex: DataSource=/sitecore/content/testsite/Global/Components/Data/Categories
StartSearchLocation={88BF8A46-93AC-4604-BC50-DF03FC451504}&Filter=_templatename:Tag
DF03FC451504}&Filter=_templatename:Tag
COPYRIGHT 20164
WWW.GOPIGUJJULA.COM
TEMPLATE (CONTD…)
• Multi list or Multi list with search.
• Field-level help message
COPYRIGHT 20165
WWW.GOPIGUJJULA.COM
TEMPLATE (CONTD…)
• Field sorting – Place most frequently modified fields on top.
• Folder Templates – Insert Options
COPYRIGHT 20166
WWW.GOPIGUJJULA.COM
RENDERINGS
• Data source location, & Data source Template.
• Thumbnail Image
COPYRIGHT 20167
WWW.GOPIGUJJULA.COM
PLACEHOLDER SETTINGS
Empowering the Experience Editor using placeholder settings (Allowed Controls).
COPYRIGHT 20168
WWW.GOPIGUJJULA.COM
CONTENT
• Content Item – name should be appropriate and try to match the content with designs (very
important while giving demo).
• Item presentation (Data sources on Shared layout or Final layout).
COPYRIGHT 20169
WWW.GOPIGUJJULA.COM
EXPERIENCE EDITOR
• Sitecore does not support in-line editing for Checkbox, Multilist, TreeList, and other fields, to
enable this
• Utilize Edit Frame/Field editor buttons for editing item fields not rendered by the
FieldRenderer.
• We can find all this buttons in core database, under the
/sitecore/Content/Applications/WebEdit item.
COPYRIGHT 201610
WWW.GOPIGUJJULA.COM
BACKEND
COPYRIGHT 201611
WWW.GOPIGUJJULA.COM
CODE
• Aggressive Null checks at all the levels.
• In partial classes, always prepend the custom property names with ‘Custom_’. This will group together all the
custom properties in the intellisense and make things easier for the developer.
• Always use glass mapper HTML helpers to render the field values. Field renderer provides ability of editing the
field value using Experience Editor.
• Do not put any static text in views, always get it from dictionary.
• Be careful on GUID comparisons.
• Avoid hard coding GUID, read from either TDS generated classes, or app settings.
• All rich text fields rendered must be wrapped within a @Html.Raw.
• If there is no data source or values, do not render any HMTL.
COPYRIGHT 201612
WWW.GOPIGUJJULA.COM
OTHERS
• In local environment, create your own Sitecore credentials to use, and avoid using default
Admin/b account.
• In Package designer, whenever packaging any Sitecore items, try to mention the Author
name.
• Aggressive website testing on mobile break point, & Sitecore in Experience editor.
• Field level validations – ex: Max chars, or single item selection.
COPYRIGHT 201613
WWW.GOPIGUJJULA.COM
REFERENCES
• https://www.cmsbestpractices.com/sitecore-best-practices/
• https://www.paragon-inc.com/resources/blogs-
posts/guid_tostring_vs_toguidstring_and_id_tostring
• https://www.geekhive.com/buzz/post/2015/05/how-to-manually-sort-items-in-sitecore-cms/
• https://www.cmsbestpractices.com/friday-sitecore-best-practice-adding-field-help-
messages/
• http://zacharykniebel.com/blog/sitecore/2014/june/26/constraining-the-sitecore-7-multilist-
and-treelist-fields-with-and-without-search
COPYRIGHT 201614
WWW.GOPIGUJJULA.COM
INTERESTING SITECORE OPEN SOURCE PROJECTS
• Sitecore Instance Manager (WPF) - https://github.com/Sitecore/Sitecore-Instance-Manager
• Sitecore PowerShell Extensions - https://github.com/SitecorePowerShell/Console
• Unicorn - https://github.com/kamsar/Unicorn
• Synthesis - https://github.com/kamsar/Synthesis
• Sitecore Sidekick (Angular JS + micro services) -
https://github.com/JeffDarchuk/SitecoreSidekick
• Sitecore Rocks (VS extension) - https://github.com/JakobChristensen/Sitecore.Rocks
COPYRIGHT 201515
WWW.GOPIGUJJULA.COM
IMPORTANT SITECORE RESOURCES
• http://www.akshaysura.com/2016/02/03/unofficial-sitecore-8-training-webinar-series-full-
curriculum/
• https://www.akshaysura.com/sitecore-community-update-mailing-list/
• https://sitecore.stackexchange.com/
• Friday Sitecore Best Practices:
https://www.youtube.com/playlist?list=PL4hLSkVJBw0dVMuow4p7TralR9aCcOWRo
• Podcast : https://coresampler.fireside.fm/
• Catching Exceptions: https://www.youtube.com/channel/UCfwf3o7zI2B-
Ei9OMmHEleA/featured
COPYRIGHT 201516
WWW.GOPIGUJJULA.COM 17
THANKYOU!
Q&A
COPYRIGHT 2016

Sitecore code review checklist

  • 1.
    WWW.GOPIGUJJULA.COM 1 COPYRIGHT2016 SITECORE – BASIC CODE REVIEW CHECK-LIST GOPIKRISHNA GUJJULA
  • 2.
    WWW.GOPIGUJJULA.COM AGENDA • To havea better understanding on, what will be reviewed in the code-review process. • Using this checklist, Individual engineer can self review, before submitting for code review. • Will look into basic points to check on both Sitecore as well as code. COPYRIGHT 20162
  • 3.
  • 4.
    WWW.GOPIGUJJULA.COM TEMPLATE • Template Iconshelp to visually separate semantically related content items. • Importance of Source for list fields (ex: Multi list, or Tree list etc.) ex: DataSource=/sitecore/content/testsite/Global/Components/Data/Categories StartSearchLocation={88BF8A46-93AC-4604-BC50-DF03FC451504}&Filter=_templatename:Tag DF03FC451504}&Filter=_templatename:Tag COPYRIGHT 20164
  • 5.
    WWW.GOPIGUJJULA.COM TEMPLATE (CONTD…) • Multilist or Multi list with search. • Field-level help message COPYRIGHT 20165
  • 6.
    WWW.GOPIGUJJULA.COM TEMPLATE (CONTD…) • Fieldsorting – Place most frequently modified fields on top. • Folder Templates – Insert Options COPYRIGHT 20166
  • 7.
    WWW.GOPIGUJJULA.COM RENDERINGS • Data sourcelocation, & Data source Template. • Thumbnail Image COPYRIGHT 20167
  • 8.
    WWW.GOPIGUJJULA.COM PLACEHOLDER SETTINGS Empowering theExperience Editor using placeholder settings (Allowed Controls). COPYRIGHT 20168
  • 9.
    WWW.GOPIGUJJULA.COM CONTENT • Content Item– name should be appropriate and try to match the content with designs (very important while giving demo). • Item presentation (Data sources on Shared layout or Final layout). COPYRIGHT 20169
  • 10.
    WWW.GOPIGUJJULA.COM EXPERIENCE EDITOR • Sitecoredoes not support in-line editing for Checkbox, Multilist, TreeList, and other fields, to enable this • Utilize Edit Frame/Field editor buttons for editing item fields not rendered by the FieldRenderer. • We can find all this buttons in core database, under the /sitecore/Content/Applications/WebEdit item. COPYRIGHT 201610
  • 11.
  • 12.
    WWW.GOPIGUJJULA.COM CODE • Aggressive Nullchecks at all the levels. • In partial classes, always prepend the custom property names with ‘Custom_’. This will group together all the custom properties in the intellisense and make things easier for the developer. • Always use glass mapper HTML helpers to render the field values. Field renderer provides ability of editing the field value using Experience Editor. • Do not put any static text in views, always get it from dictionary. • Be careful on GUID comparisons. • Avoid hard coding GUID, read from either TDS generated classes, or app settings. • All rich text fields rendered must be wrapped within a @Html.Raw. • If there is no data source or values, do not render any HMTL. COPYRIGHT 201612
  • 13.
    WWW.GOPIGUJJULA.COM OTHERS • In localenvironment, create your own Sitecore credentials to use, and avoid using default Admin/b account. • In Package designer, whenever packaging any Sitecore items, try to mention the Author name. • Aggressive website testing on mobile break point, & Sitecore in Experience editor. • Field level validations – ex: Max chars, or single item selection. COPYRIGHT 201613
  • 14.
    WWW.GOPIGUJJULA.COM REFERENCES • https://www.cmsbestpractices.com/sitecore-best-practices/ • https://www.paragon-inc.com/resources/blogs- posts/guid_tostring_vs_toguidstring_and_id_tostring •https://www.geekhive.com/buzz/post/2015/05/how-to-manually-sort-items-in-sitecore-cms/ • https://www.cmsbestpractices.com/friday-sitecore-best-practice-adding-field-help- messages/ • http://zacharykniebel.com/blog/sitecore/2014/june/26/constraining-the-sitecore-7-multilist- and-treelist-fields-with-and-without-search COPYRIGHT 201614
  • 15.
    WWW.GOPIGUJJULA.COM INTERESTING SITECORE OPENSOURCE PROJECTS • Sitecore Instance Manager (WPF) - https://github.com/Sitecore/Sitecore-Instance-Manager • Sitecore PowerShell Extensions - https://github.com/SitecorePowerShell/Console • Unicorn - https://github.com/kamsar/Unicorn • Synthesis - https://github.com/kamsar/Synthesis • Sitecore Sidekick (Angular JS + micro services) - https://github.com/JeffDarchuk/SitecoreSidekick • Sitecore Rocks (VS extension) - https://github.com/JakobChristensen/Sitecore.Rocks COPYRIGHT 201515
  • 16.
    WWW.GOPIGUJJULA.COM IMPORTANT SITECORE RESOURCES •http://www.akshaysura.com/2016/02/03/unofficial-sitecore-8-training-webinar-series-full- curriculum/ • https://www.akshaysura.com/sitecore-community-update-mailing-list/ • https://sitecore.stackexchange.com/ • Friday Sitecore Best Practices: https://www.youtube.com/playlist?list=PL4hLSkVJBw0dVMuow4p7TralR9aCcOWRo • Podcast : https://coresampler.fireside.fm/ • Catching Exceptions: https://www.youtube.com/channel/UCfwf3o7zI2B- Ei9OMmHEleA/featured COPYRIGHT 201516
  • 17.