Best practices

Simple IoC container using only the Sitecore API

Lately there has been a lot of discussions on twitter about using different third party frameworks for Inversion of Control using Dependency Injection in Sitecore solutions. The arguments in these discussions can be almost religious, either for or against using a specific third party IoC framework. There are two extremes, on one side the developers who […]

Global.asax events and Sitecore pipelines

At Pentia we always try not to change any files that ships in an out-of-the-box Sitecore installation. This makes upgrading easier and the solution code more transparent for developers. Sitecore ships with a standard Global.asax file and a lot of Sitecore developers choose to make changes directly in this to hook into application and session level events. For […]

Nesting if statements

This post is not only about Sitecore development it is valid for any code written in almost any language. It is about making code easier to read. The post is somewhat subjective but I hope that all developers with an IQ higher than 80 will agree. Back in the days when I learned to write […]

Using threshold warning limits in Sitecore

When working on an old Sitecore solution the log files are almost always completely spammed with different threshold warnings. 744 10:28:14 WARN Item threshold exceeded for web page. Items accessed: 2578. Threshold: 2000. Page URL: /xxxx.aspx 7672 10:28:15 WARN Item threshold exceeded for web page. Items accessed: 29145. Threshold: 2000. Page URL:xxxx.aspx 7672 10:28:15 WARN […]

Should be Sitecore best practices

During my work at Pentia I often perform health checks of existing Sitecore solutions built by other Sitecore partners. The solutions vary a lot in both quality and age but there are a few things which I need to point out as missing in each and every report. It is like it is secret Sitecore […]

Disable the Sitecore admin user

A basic Sitecore 1-0-1 security check is to see if the admin account still uses the standard password. It is commonly seen that sites go into production with the admin / b still working. A way to ensure this does not occur is simply to disable the admin account when building to release or other […]

A note about Sitecore pipelines

My two previous posts both contained implementations  of custom processors for the httpRequestBegin pipeline. Just a quick explanation about their structure and some absolute best practices when implementing your own Sitecore pipeline processors. Check and exit fast Since the httpRequestBegin pipeline handles all requests it is extremely important to check the context for validity before continuing […]