Friday, October 22, 2021

Sitecore Synthesis ORM

 ØSynthesis is an object mapping framework for Sitecore that enables the development of more reliable and maintainable sites in less time than traditional Sitecore development.

ØIt is a strongly typed template object generator that is easily understandable for developers with either a Sitecore or traditional .NET background.

ØIt neatly integrates with Sitecore MVC (via the Synthesis. Mvc package) as a View rendering model provider and IoC dependency for controller renderings.

You can see the complete details here https://github.com/blipson89/Synthesis

Sample Code here: https://github.com/ArulPushpam/Sitecore-Synthesis/tree/master/code  

Demo

Step 1:

ØCreate new folder under Foundation

 ØInstall Nuget and it will generate the default config files in your solution




Step 2:

ØCreate a new class  BaseHelixModuleRegisteration


Step 3:

ØRegister your layers  

FeatureModelRegistration,FoundationModelRegistration , ProjectModelRegistration




Step 4:

ØCreate a new config file to patch our custom models

ØThe folder structure should be


ØPlease register your layer details here


Special Note

ØYou should enable this config file if you use an identity server for your Sitecore instance.Initially, it should be disabled



Step 5:

ØI have only two feature modules Events, Navigation for generating synthesis model.

ØAdd the project reference


ØIt’s time to register our synthesis with our module



Step 6:

ØRequired config has been done , lets move to generate synthesis model

ØGo to

https://sitecoreinstance/synthesis.aspx

Special Note

ØIf you can’t find the highlighted button please check your web.config file

ØWe needs to set true then only you can see the button.If you are in Prod instance we wouldn’t set the true .

Step 7:

ØModel has been generated and we can see the model now.


Special Note

ØIf you want the model at different path, you can define that in BaseHelixModuleRegisteration 


Step 8:

ØLet’s see the created model by synthesis

ØThis is my logo property from my events synthesis model

Special Note

ØWhenever we made the changes on templates synthesis automatically generate the model in your code. We have already defined those setting in this config



















 

2 comments:

Steps to follow when using a PowerShell script to modify the goals in Sitecore

I have previously utilized PowerShell for item creation, modification, deletion, and presentation details in Sitecore.   Ø Recently, I attem...