Generation of a Composite Model Using Reflection and Sitecore Serialization

Context

In my previous post, I’ve described the benefits of composition pattern over inheritance in code generation and mentioned that it simplifies restoration of models from reflection. From my point, this is a huge plus as it enables the creation of developer friendly modular architecture in Sitecore.

I do not think that someone still has problems with a creation of an update package with Sitecore config transforms, but it is not really possible to install an update package in your Visual Studio solution. Of cause, you can install it in Sitecore, grab all libraries from bin folder and copy to your source, then serialize installed items into your project, generate your models based on “everything” you have in Sitecore.

To me, it doesn’t sound like a good approach, moreover, there are many of solution like NuGet, npm, bower that drastically simplify package management and installation for development. Also, when referencing items from packages, you don’t expect to modify DLL coming with them, so I do not think that you should have to serialize Sitecore items to use them in your model generation.

Most likely you already have information about your templates in compiled into your module DLLs. Below you would see how you could use it.

Continue reading “Generation of a Composite Model Using Reflection and Sitecore Serialization”

Generation of a Composite Model Using Reflection and Sitecore Serialization

Debug TDS code generation templates

Context

I was playing with Sitecore solution & projects setup and configuration, I faced a need to alter code generation logic used in it. We use TDS for content synchronization as well as it’s code generation engine build on T4 text templates.

While T4 is great for code generation, it is not as straightforward to debug them as it might be expected. So let me describe how to do this.

Continue reading “Debug TDS code generation templates”

Debug TDS code generation templates

Sitecore Continuous Integration, part 1

Usually during standard process of development you would have several environments like DEV, QA, UAT/STAGING and so on. The more environments you have – the more cases and differences in deployment you will need to implement. In this post I would try to describe how you could simplify your life implementing CI for Sitecore based projects. Continue reading “Sitecore Continuous Integration, part 1”

Sitecore Continuous Integration, part 1