Sitecore has introduced Sitecore Content Serialization (SCS) as part of version 10. In this blog, I will explain the basic concept of serialization and compare all Unicorn features, followed by steps for the basic setup and best practices.
This blog has split into three parts, and this is part 1.
- Part 1- Sitecore 10 SCS- Basic View
- Part 2- Compare SCS with Unicorn
- Part 3- SCS Best practices and Q&A
Part 1 – Sitecore 10 SCS- Basic concept
Let’s first try to understand the definition, Serialization is the process of translating a data structure or object state into a format that can be stored (for example, in a file or memory data buffer) or transmitted (for example, across a computer network) and reconstructed later (possibly in a different computer environment) – Wikipedia
Sitecore Content Serialization (SCS) is a system for serializing, sharing, and deploying content items, as well as keeping them in version control – Sitecore
Now, we know the definition of serialization. I remember with the Sitecore 6.X Serialization guide we had an option to serialize the item tree and restore it, there were additional options to configure the serialization based on the events like item saved, created, deleted etc. and we were using SVN to store those serialized files.
TDS was beneficial to manage the project and item files. I used TDS a lot with Sitecore 6.X versions. We were also using this as part of the deployment process as the underlying TDS was using the MSBuild project file to group the Sitecore items into a deployable project. Additionally to that, it has the below features which are not part of SCS.
- File deployment into a local Sitecore instance
- Web Deployment Package (WDP) generation
- Code generation
- Environment Validation
Note – Paid license is required for TDS and the cost was around USD 400
In my opinion it’s the end of the TDS era.
Unicorn is a Sitecore utility and it is open source. It solves the issue of moving templates, renderings, and other database items between Sitecore instances. TDS is a monolithic product with commercial support, and marketing does a lot more than just serialization. Unicorn is relatively simple, free and open-source, and does one thing well.
I prefer using Unicorn instead of TDS. Generating the TDS code was not that easy and always needed to take care of the partial class, unnecessary field generation, etc. We can set up the template class following the helix principals.
For more details about the setup, Here is my blog post – Sitecore – Unicorn setup, patterns and tips.
In my opinion Sitecore content serialization would be a replacement of Unicorn.
Sitecore Content Serialization – Future with Sitecore 10 and current focus
SCS will do the out-of-the-box item serialization that lets you automate the synchronization of item changes. It has two options one is using the command-line interface (CLI) and the second Sitecore for Visual Studio (SVS)
Note – for using SVS it’s required to get the license and TDS and SVS are both offered under the same license.
Out of the box there are three options to serialize content, The default serialization format (.Item)
- Manually serialize, update, and revert items in the Content Editor.
- Use Sitecore event handlers to automatically serialize items.
- Use the Sitecore service page to serialize, update, and revert a whole database.
YAML format – using Unicorn and Sitecore content serialization.
This article is the first part to explain the basics of serialization, in the next Part 2- Compare SCS with Unicorn, I will explain the difference between Unicorn vs SCS setup.
I hope this article will help you to understand the basic concept of serialization.