Life Through a Lens – ORM Mythology & Glass Mapper Relative Performance

Recently I read this set of posts:

A post from Konstantin Cherkasov claiming Glass to be 2000 times slower than the Sitecore API

A post from Kam showing Synthesis to be 3x slower than the Sitecore API

and finally a post from Richard Seal showing Fortis performance:

In this post I look more into what makes this a fairly useless test in the real world and debunk the idea that Glass Mapper is actually 2000x slower than the Sitecore API.

Continue reading

Life Through a Lens – Mappers and Wrappers

Mike Edwards (at SUGCON 2015) did an awesome presentation on data modelling (I would highly recommend you check it out if he re-runs it) on the pros and cons of how to model data. Glass Mapper (unlike wrapping frameworks – Synthesis / Fortis) is uses the Data Mapper pattern to represent data. He also wrote a great post here –

This gives distinct advantages in the functionality it can provide in terms of its exposure of native .net types, its ability to be able to read / write between databases, control of serialization, non-reliance on code generation, mocking, testing, caching etc.

It does also have the downside of being heavier on instantiation in comparison to simply wrapping the item and performing casts on demand. It is also further away from the originating record. This also means that unlike wrapping frameworks, the number of mapped properties will actually also impact the overall performance.

Continue reading

Sitecore 8 dialogs not working?

Recently I’ve seen Sitecore fail to load the JavaScript files for Speak and so break using the Sitecore desktop by failing to load dialogs in the content editor and in the control panel. This can happen in a couple of ways and the reasons behind it are pretty subtle. The issue I found for this post was that the SPEAK javascript files were not loading.

The SPEAK system relies on a set of config files in the App_Config/Include folder and client libraries inside the sitecore/shell folder. To ensure that the configuration is loaded correctly and the JavaScript files are returned, you need to check:

  1. ‘/App_Config/Include/.Sitecore.Speak.Important.Config’ – make sure this doesn’t have the hidden attribute set. If you need to, remove the ‘.’ prefix to force a refresh
  2. Double check that all the client assets also don’t have the hidden attribute set.

To test that everything is ok, visit the following URL: <Your_Host>/-/speak/v1/assets/main-1.2.js

You should see the require.js calls setup and loading the libraries necessary for the Sitecore desktop. In another post I’ll cover how you can turn on minification and etags!

Hope this saves you some time!