Configure the relative serialization path correctly. In Microsoft NTFS the maximum length is 240. In SCS the content serialization path size limit is defined in the settings, by default, the value is 100.
3. Sequence is most important while defining the module.json – As a rule of thumb with Sitecore, all the dependencies should be defined first, for example before defining the content we have to define the templates, layout and rendering etc.
Unicorn was the most popular plugin for content serialization. It was very straightforward and well managed; all the documents were very descriptive and easy to understand. Now we have Sitecore Content Serialization (SCS), I think we must understand what has changed. Are we losing or gaining any functionality? what changes are required to our existing setup? Re there any changes in terminology etc?
This blog has been split into three parts, and this is part two.
Below is the high-level comparison between Unicorn and SCS.
SCS has an additional Visual Studio plugin to manage Content.
SCS configuration is based on JSON files and Unicorn configuration is based on XML.
The configuration file naming convention is different. The SCS configuration file names contain modules for identification and Unicorn configuration contains serialization – Although this is configurable.
The initial setup is different. For SCS we have to setup the package and to enable the CLI it’s required to install the packages.
Difference in global/shared configuration
Difference in project level configuration.
SCS provides more flexibility for rule based configuration, for each feature we can define a rule and each rule has the option to define the path, scope and allowed PushOperations etc.
There are changes in the configuration.
When using Unicorn we used to define the dependencies and extends options
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.
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
Note – Paid license is required for TDS and the cost was around USD 400
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.
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.
Sitecore has recently introduced a development SDK with ASP.NET Core. In this blog, I will explain why it’s super important for the Business to start thinking about it and how it will change the way of Sitecore development.
In my view, technology is an essential part of running a successful business, and it keeps changing for a better purpose. It’s tough for the Business to make the right decision to choose the right technology and plan for the investment as there are a lot of factors involved like cost, technology choice, stability, future, support, extension, security, machine learning, AI, robotics etc.
Off Couse, every Business would prefer to make a one-time investment and to reuse that investment to cater to any new technology.
Is it possible today to make a one-time investment? I think it’s not, but a company like Microsoft and Sitecore they have been putting all efforts to make it happen and the release of Sitecore with ASP.NET core SDK is a big step towards that dream. In my opinion, The secret of success is to make the right choice at the right time, and don’t devote all energy in fixing the old guys.
Before getting into more details, Let’s understand the key part of the puzzle..
Why Sitecore with ASP.NET Core is so important?
Microsoft has started moving all the focus from the previous development framework (.NET Framework) to .NET Core, Why?, Okay, because .NET Framework 4.8, which was announced on 18th April 2019 will be the last major version of .NET Framework. The visual studio which is the primary IDE for the most of the development is itself is built-in .NET Framework, Although Microsoft will continue to provide the support, as I said in my first few lines, It’s a matter of making the right decision at the right time. below are some key features and needs for the changes.
Cross-platform & container support
Asynchronous via async/await
Unified MVC & Web API frameworks
Multiple environments and development mode
WebSockets & SignalR and Cross-Site Request Forgery (CSRF) Protection
“Self hosted” Web Applications
Globalization and Localization
Swagger OpenAPI built in
Microsoft has already planned roadmap until 2023 releases, so this shows how important it’s that Sitecore goes with the .Net Core platform.
The most important part is, there are a lot of front end technology like Angular, React, Vue.jS, Flutter, Microsoft has launched the new platform called Blazor which will allow C# developer (Sitecore technology) stack to write the web interactive UI through the same language, WOW that’s really amazing, Microsoft has already unified the infrastructure with Azure Cloud provider, development technology with .Net Standard and front end technology through Blazor, so now to develop any complex code that includes Azure, backed like Machine learning , AU and front end all can be done through the same technology and Sitecore has release official SDK for that, so that’s the reason is very important for the business as well as for the development.
Let’s talk about the development and architecture
There are two main parts, One is rendering host front end and second is Sitecore instance backend.
Rendering Host – The rendering host front end is a web app made up of the Sitecore ASP.NET Rendering SDK code and static resources. The job of the rendering host is to respond to visitor requests.
The Sitecore instance– exposes a set of endpoints like web based native rendering hosts or third party integration
Follow these steps in case of any error, Please see the reference in Troubleshooting section in the below page.
Below are simple command to setup the local environment.
dotnet new -i Sitecore.DevEx.Templates --nuget-source https://sitecore.myget.org/F/sc-packages/api/v3/index.json (Install template)
dotnet new sitecore.aspnet.gettingstarted -n MyProject (Create a new project)
.\init.ps1 -InitEnv -LicenseXmlPath "<path to your license.xml file>" -AdminPassword "<your Sitecore administrator password>“ (Prepare the container)
.\up.ps1 – (Download the Sitecore Docker images and install the containers)
Docker-compose up –d and Docker ps -a
Once you follow above steps, You should be able to see the working Sitecore instance running inside docker with ASP.NET core.
2. Below are the steps to setup the JSON rendering.
C:\Program Files\dotnet\sdk\5.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(241,5): error NETSDK1005: Assets file ‘C:\build\src\rendering\obj\project.assets.json’ doesn’t have a target for ‘netcoreapp3.1’. Ensure that restore has run and that you have included ‘netcoreapp3.1’ in the TargetFrameworks for your project. [C:\build\src\rendering\renderinghost.csproj]
Initially, I thought it’s related to version, As I had installed both dotnetcore SDK 3.1 and 5.0, but finally had to update above command.
Extension – In case if need any extension like xConnect events and to trigger a goals, there are always a way, We can Instantiate client in a non-Sitecore context, Reference Link and can add interaction like to trigger a goal
Finally, A few development tips.
How to check the files running inside the containers through the VIsual Studio.
Dotnet Sitecore Help command
dotnet sitecore --help
Sitecore login command
dotnet sitecore login
Push the serialized items command – SCS (Sitecore content serialization)
This blog post is intended for those of you who would like a high level overview of Sitecore 7.5, need a reminder or have not had the time to investigate this release. At the bottom of this post is a list of useful resources related to Sitecore 7.5.
Sitecore 7.5 = Sitecore 7.2 + xDB.
xDB (Experience Database) is the new name for the Analytics database.
New Contact entity allows tracking an individual across devices, visits and cookies.
Requires some sort of mechanism of identifying the user( login, form submission, checkout etc)
New scalable analytics data architecture
Session DB (private and shared) (inProc, Sql or Mongo)
Collection DB i.e. xDB (Mongo)
Reporting DB (SQL)
Experience profile (xFile) i.e the contact
Sitecores cloud hosting offering for xDB
Pricing based on numbers of stored contacts.
Data stored in documents not tables
Collections of documents rather than tables with rows.
Scales horizontally not vertically
Data stored in BSON binary Json
Upgrade key points
Analytics API has many small changes
Migration of data from Analytics DB to xDB i.e. SQL to Mongo