As a follow up on my last post about IoC / DI containers and how to use the Sitecore API to perform inversion of control using ReflectionUtil, I’ve made a quick speed comparison of some common DI frameworks, Sitecores ReflectionUtil and the new keyword as the best case for how quick it is to instantiate […]
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 […]
Developing Sitecore sites using DMS Personalization rules
As a developer it can be a rough road to start developing with DMS. Where do I start? How do I build a site that is accommodating to DMS? These are tough questions. In this post I will give some simple pointers that should get you started quick and easy on the right path. DMS […]
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 […]