Friday, July 31, 2015

Sitecore Serialization Synchronization Service (S4)

I know most of my posts have been instructional so far, so it is about time I make a bit of an announcement.  I am working on a new tool for Sitecore Development.  I would love input from the community of what their biggest expectations for this tool would be.

This tool is called the Sitecore Serialization Synchronization Service or S4 for short.  Basically it is a synchronization tool that connects to your Sitecore instance and keeps serialized items in sync.  You update an item and the item in the file system will be updated as well, this also goes the other way around.  You pull the latest from source control and it adds or modifies files in your sync folder and it pushes those changes into Sitecore.

At this point the serialization engine is almost complete, the biggest key for me here is performance.  I do not want this tool to take much memory or processor power.  I also do not expect to have any sort of Visual Studio integration, at least not that is required for use of the tool.

I do not plan to implement any sort of Code Gen or Code Deployment in this tool.  Visual Studio (and other IDE's) already have this functionality, so though it might be easier with a tool it is not 100% necessary.  I plan to do a tutorial on Code Gen with serialized Sitecore Items or possibly with S4 as a data provider.

S4 also will not deploy on build since it is not integrated with Visual Studio.  While at first this may sound like a breaking feature, S4 is intended to keep your items in sync at all time so there is no need to deploy the items on build.

If there are any questions, comments or requests with this tool please let me know.  I appreciate all feedback.  If the response is large enough I will push the development of this tool a bit harder.  As it stands right now I should hopefully have a beta ready (likely just base functionality without a friendly UI or anything) in the next month or so, so please check back often for updates.


Leveraging Sitecore's Caching Mechanism

In the time I have been developing in Sitecore I have seen many different approaches to caching, but only once have I seen someone actually use caching based on Sitecore's cache service.  It is in fact almost how scary it is to implement.

Basically all you have to do is create a class that inherits from Sitecore.Caching.CustomCache.  Of course you need to implement a constructor that calls the base constructor, and override the SetObject and GetObject methods.  That is pretty much it though.

This cache will be handled in the same admin page as the other Sitecore caches, and if you install the Cache Admin or Cache Manager shared source modules you can easily use them to monitor and manage the caches without needing to build your own custom admin page.

I highly recommend at least investigating this approach to anyone considering putting in a custom cache on their site.  It is efficient enough for most scenarios as well as being very easy to setup potentially saving you hours of coding.