Skip to main content

Demystifying Optimizely Synchronization

 


If you have ever wondered how basic information (like GUID) from the ContentType created using Optimizely Admin view and the properties from the code come together seamlessly to provide the content type. Let us unbox and find out the process of prefect harmony  

What is Synchronization?

As soon as the Optimizely website starts, it scans all the assemblies and looks for classes decorated with [ContentType] and properties [Display] or [Property]. Once the scan is complete, it compares these with the content types defined in the database and synchronizes based on one of the seven use cases as mentioned below.

Key 7 Use cases : 

#

Use Case

Pre-Condition

Sync Process

1

New Content Type

A new Class with [ContentType] is added to the code

·       Creates content type in DB

·       Properties are added to DB

2

Update Content Type

A new property is added existing ContentType class

Properties are added to DB

3

Identical Content Type

No changes in code

·       Skips DB update

·       Merge setting for runtime cache

4

Rename Property

A property in existing class is renamed

Treated as new property, Old values are not migrated.

If old values are required then Migration step has to be used

5

Deleted Content Type

Remove a Content Type class

If no instances exist then DB entry is also deleted.

However, if there is any instance then the DB entry stays.

6

Commit Disabled

ContentModelOptions.EnableModelSyncCommit is set to false

·       No automatic database writes during start up.

·       Synchronize button in CMS to be used to sync / commit manually.

7

Merge Setting

Admin changes display name in CMS

·       Admin changes take precedence; hence database values override Code setting at run time.

·       Revert to Default option can restore it to values defined in code

 

 



 

Import things to remember:

  • ·       Never change the GUID after deployment
  • ·       Renaming properties causes data loss, explicit migration is required if the old values have to be restored
  • ·       Admin changes always take precedence
  • ·       Avoid downgrades as older assemblies will not overwrite newer DB definition

Comments

Popular posts from this blog

Create a Simple home page in Optimizely CMS

  Introduction In this blog post, I will walk you through a step by step process to create a very basic home page on a Optimizley CMS Empty site. This is part of the “Learning by Doing: Build series” where we build a fictional website from scratch to focus on hands on learning and gain practical insights. If you prefer a video, please check out Optimizely CMS - Learning by Doing : EP02 . Step 1: Create Empty Website Create a project using Optimizley CMS Empty Template     Build and Run   Set up administrator account You will be redirected to home page but since the home page is not yet set up, 404 error is displayed Verify if you are able to login to admin / CMS interface by navigating to localhost:5000/EPiServer/CMS Step 2: Create Models •        Create Base Page Type (SitePageData.cs) •        Base class for all the pages to inherit common properties like SEO •   ...

Optimizely CMS : Overview of the Architecture

Optimizely is considered one of the top digital experience platforms.   In this blog, let us break down the architecture of Optimizely CMS, which is the core of the Optimizely DXP stack. This quick 3-minute read offers a concise glimpse into the layered architecture of Optimizely CMS. Optimizely CMS architecture can be visualized as layered architecture which includes the following layers. Platform & Framework The Optimizely CMS is build on ASP .NET core & hosted using Webservers like IIS, Kestrel OR Cloud environments Optimizely CMS Admin UI is built using JavaScript & DOJO toolkit enabling functionality like drag and drop, On page editing, responsive panels, custom widgets, plugins etc Data This layer handles storage and retrieval of content Microsoft SQL Servers stores the content, Azure SQL is also supported Integration to External content provides great flexibility Create Playground for the content authors and marketers Offers basic building bl...