How Do Sitecore Modules Work with Sitecore XM Cloud ?
Sitecore XM Cloud is is here, and it's a great evolution of Sitecore XM with a software-as-a-service (SaaS) backbone. In short, Sitecore has basically stuffed the endlessly-customizable Sitecore XM into a SaaS-based framework and introduced it to the world as Sitecore XM Cloud.
One aspect of customization that really helped Sitecore XM/XP stand out was modules. Modules add or alter functionality to Sitecore, and have been written by developers, MVPs, partners, businesses, and Sitecore themselves. I've even contributed two modules to the Sitecore ecosystem: SPRK and CATS.
For better or for worse, XM Cloud sort of breaks compatibility with the traditional module ecosystem, but with some caveats. Let's explore what's different about using modules with XM Cloud.
Module Packages are No More
Sitecore modules have traditionally been installed via package files - a ZIP file containing all the binaries, items, and other files needed to allow the module to work. In some cases, this would require installation of packages on each server - both content management (CM) and for each content delivery (CD) server in use.
With XM Cloud, module packages are no longer supported. While the module installer is still available in the Sitecore Client backend, it will currently throw an error when installing a module package (that UI will probably be removed from the backend).
Because XM Cloud doesn't use CD servers - instead publishing to the single target of Experience Edge - modules that execute on a CD server are not supported. An example of this would be something that modifies the page rendering pipelines (which are executed on the CD servers). Modules may customize the CM-side of Sitecore as much as they want, but CD is no more.
How to Use Modules with XM Cloud
So how can a module be used with Sitecore XM Cloud?
The only way to add a module to XM Cloud is to integrate it with your solution's source code and deploy it as part of your solution. There are a couple of approaches to consider:
For those with access to open source modules, this should be a (relatively) straightforward task of adding the source files and assets to your solution, which also lets you take ownership of that module and ensure maximum compatility with your solution.
An existing module package file can be unzipped and all assets and binaries can be included in your project solution. Items will need to be converted to the new items-as-resources (IAR) file type or re-serialized into your project solution (there's no quick way to do either of these, so stand by for addition tooling from either Sitecore or the developer community in the near future).
Do you have questions, comments, or corrections for this post? Find me on Twitter: @BrandonMBruno