SUGCON 2017 & Specflow Demo

Well – another SUGCON EU has been and gone and I was very proud not only to present, but to be a part of such an awesome community 😀

I particularly enjoyed:

Brian Beckham’s – “SITECORE USING PLATFORMS AT ENTERPRISE SCALE”: A great and positive insight to some of the challenges faced when really trying to push the boundaries of multi-tenant builds in the enterprise space.

Nick Hills’ – “DEVOPS WITH SITECORE IN THE CLOUD”: Thought Nick did a great job of giving real world insight into the world of cloud based devops using cases from a large scale client running on AWS.

Specflow Demo

For those who were gracious enough to watch my demo, I truly thank you. As promised, you can find the code from my demo from my Github page here:

https://github.com/cardinal252/SpecflowDemo/tree/master

 

Advertisements

Sitecore.Boost Update Released

Following on from my first introduction to Sitecore.Boost post, I have made some further improvements.

Before delving into the results of the announcement, Sitecore.Boost patches will also work for Sitecore pre 8.1 😉

You can find the project here: https://github.com/cardinal252/Sitecore.Boost

The results

A small update has been released for Sitecore.Boost. This update results in the following:

  • An approximate 61% improvement in rendering performance over Sitecore 8.1 OOTB
  • An approximate 84% improvement in rendering performance over Sitecore 8.2 OOTB

Using all boost patches on both 8.1 and 8.2, this results in Sitecore 8.1 being 67% faster than Sitecore 8.2. Sitecore 8.1 is still slower than its predecessors, so the trend continues – at least this takes it some of the way back 😀

Happy boosting 😉 😀

Introducing Sitecore.Boost

For a while now, I have been (not so) quietly working away on performance testing on various codebases as well as Sitecore itself for varying clients and my own satisfaction.

You can find it here: https://github.com/cardinal252/Sitecore.Boost

What is it?

With the concepts behind some of this work, I decided to create an open source project to allow others to see what has been done and contribute their production tested performance patches for the Sitecore platform.

This project contains a test harness setup complete with jMeter tests & serialized content.

The test content when deployed renders ‘Hello World’ renderings varying by the following:

  • Number of renderings – 10 to 25
  • Output Caching – Cached on Item, Cached on Standard Values, Cached on Rendering Definition, Uncached
  • Rendering type – Controller / View Renderings
  • Model – With / without

By putting the Sitecore rendering engine under load and performing profiles (using your tool of choice), many areas of Sitecore have shown consistent traits that can benefit from optimisation to their code.

Continue reading

CI / CD Build Tooling for Sitecore

Being a sell sword, I can comment on a lot of different stacks (along with providing my preferred). Following on from a discussion Sitecore Community – CI / CD I thought I would share my thoughts a little on this subject:

Fundamentally most Continuous Integration / Delivery environments involve the following elements (in a very rough ordering): Source Control > Build Tool > Automated Testing Tools > Code Metrics Tool(s) > Deployment Tool(s) > Sitecore Content Deployment Tools > Environment Scaffolding > Monitoring

Before I go any further, I think I should state what I believe to be the MOST important goals of your CI build environment.

  • The simplest to manage / manipulate. The tooling should get out of you way and soak close to zero time.
  • Should be maintainable by the majority of the development team, not ‘key holders’.
  • Deployments should be done by non-developers.
  • It just works – once set up, you shouldn’t have to tinker with it.

My biggest bug bear of any system is where only the Solution Architects / Team Leads can manage the build process. QA’s testers / product owners should be responsible for sending stuff to QA / Production (if there is to be ANY human involvement at all).

So hear it is split down by element:

Continue reading

Glass Mapper 4.2: The most flexible Sitecore ORM just got more flexible

Over the last couple of months, within the Glass Mapper team we have been busy considering a few things regarding the framework and decided this upcoming release of Glass Mapper should aim to improve on the flexibility of certain areas of the product as well as the ability for developers to get involved with our source more easily. Here is a run down of the key features of this new release and what it means.

Continue reading

Advanced Content Security Module (ACS) Released

A while ago I started the process to soft release a little module I have been working on. It is called the ‘Advanced Content Security’ module (ACS). It’s primary purposes are the following:

  • To provide alternative layouts to pages that are ‘restricted’ but not unreadable by users – think the average newspaper site that allows you 10 views before you have to sign up.
  • To provide rules based read and restriction security
  • To provide a rules engine based solution to the initialisation of users

Today, the latest version was approved and added to the market place.

For a more detailed overview, you can find more information about it here:

https://cardinalcore.co.uk/advanced-content-security-module/

The source code resides here:
https://github.com/cardinal252/Sitecore.AdvancedContentSecurity/

The module itself can be downloaded here
https://marketplace.sitecore.net/Modules/A/Advanced_Content_Security.aspx?sc_lang=en

Quick creation of a Sitecore Item to pass in unit tests

This is a super quick post.

In quite a number of test scenarios I would choose to abstract the ‘doing’ something with a Sitecore item to a repository class that could only be integration tested. This would mean that for that test scenario, generally the only necessity is to ensure that the item is not null, then rely on the repository to do the real work for me.

I recently came up with this method of creating a dummy item to enable unit testing of a method that takes an item as a parameter. Note – this is no substitute for FakeDb – but in the majority of scenarios – for real unit testing, I would be using Glass Mapper anyway.

Here is a simple method to create a test item without any app.config or anything.

Continue reading

Using RequireJs to manage script dependencies based on attributes in your Sitecore Solution

A common architectural issue I hear amongst developers is how to prevent Sitecore loading all and sundry when it comes to javascript dependencies. Indeed it is often the case that front end developers don’t inform us or assume that we will use a single page type model and therefore don’t really need to worry about the number of script dependencies. The reality is that in actual fact if we included every script that a front end developer used throughout all of the scripts within the site – we would have 20 odd script tags in our markup, something you may well be keen to avoid.

As a solution to this, myself and many other developers including former colleague and Sitecore Solution Architect Richard Seal in his post Using Require to Organize your Sitecore Javascript opt to use an advanced module loader such as RequireJs. If you haven’t used it before, I recommend first reading their documentation as there are definite ways to write your javascript (and in particular jQuery) code to maximise your success with it.

Continue reading

Developer Isolation – the mushroom cupboard should see the greenhouse

A slightly strange title, but let me explain. First of all – it’s possibly self evident, but for those who don’t see it – developers in so many industries are treated similar to mushrooms – keep them sustained in a dark room and they will produce useful material. On the other hand – we have marketers / designers / project managers. The former two of which are (and rightly so in many instances) considered to be the driving forces in their field and thus are exposed to the sun (the clients / world) by virtue of glass walls & ceilings.

I have for many many years been both a developer and a social person. I enjoy interacting with clients / fellow developers & others – be them from media agencies or ‘end’ clients (ie: Sitecore Customers) and I have found distinct differences between the way different organisations interact with their own developers and (from a personal point of view) what I consider to be a disparity in how productive the developers can be directly linked to how close they are to the problem.

In this post I will explore why developers (mushrooms) should be allowed out to see the wider picture (greenhouse) more regularly.

Continue reading