Try

Building Custom Plugins for a Composable CMS

Photo of Amanda Lee

Amanda Lee

Plugins are critical components of a composable CMS. They enable enterprises to add new features and extend functionality in response to new requirements or market conditions, continuing to improve the customer experience.

In this blog, we recap one of the talks from CrafterCMS Live! 2024, delivered by Carsten Paul and Silke Janichen of eXA Online. Together, they explored the principles of building custom plugins for a composable CMS, providing some examples of plugins they created for customers.

Watch Now: Building Custom Plugins for a Composable CMS

Creating CMS Extensions and Adaptations

Implementing CMS solutions for customers doesn’t end when the website goes live; it often includes continued customer support. A website is never finished, but rather it is an ongoing project that needs new features, content updates, and ongoing optimization.

For the team at eXA Online, this often includes creating custom skins or layouts, and integrating CRMs, DAMs, and eCommerce solutions. However, it also sometimes includes creating custom plugins. 

Essential Components of the Plugin Design Pattern

When building custom plugins, there are three components that should follow the plugin design pattern to ensure feasibility. 

Host Application

This primary software or platform that executes the main functions. It also provides a supportive environment for plugins. This platform is responsible for loading and managing plugins, ensuring they operate correctly, and supply necessary resources or data.

Plugin Interface

The plugin interface acts as a conduit between the host application and the plugins, and it delineates the methods, events, or properties that the plugins must implement, while guaranteeing consistent interaction with the host application.

Plugins

These refer to individual modules or components that enhance the host application functionality. Compliance with the plugin interface enables easy integration and independent development.

Key Principles and Benefits of the Plugin Design Pattern

Plugins should also follow these key principles. Similarly, the CMS system behind them should offer this composable functionality.

  • Modularity: This divides the software into discrete modules or components, that are each responsible for a specific function. This separation simplifies software management, maintenance, and scaling, all while maintaining the integrity of other modules.
  • Extensibility: This allows developers to easily expand the application's features by adding or removing plugins without altering the core architecture.
  • Separation of Concerns: Each plugin is dedicated to a specific feature, simplifying the task of pinpointing and resolving issues in an organized way
  • Scalability: Adding new plugins or enhancing existing ones is simpler than modifying an extensive framework, making it easier to scale the application as the number of users grows or as the demand for data and request processing increases.
  • Flexibility: Plugins operate independently, allowing for quicker modification, whether adding, removing, or updating specific functionalities, without significantly impacting the main codebase. This independence allows the application to adapt to changing needs or technologies.
  • Maintainability: Segmenting functionalities into separate plugins facilitates independent development, testing, and maintenance, reducing the chances of bugs and enabling parallel development. 

Plugin Development with CrafterCMS

As a composable CMS, CrafterCMS offers the ideal functionality and architecture to support plugin development. With CrafterCMS, plugins for the authoring and delivery environments can be created. 

Extend Crafter Studio (Content Authoring)

  • Studio authoring widgets that power the Sidebar and other UI elements
  • Embedded applications displayed on their own page within the Studio Plugin Host
  • New Form Engine extensions, featuring data sources and components
  • Server-side code and services that support the Studio UI extensions 

Extend Crafter Engine and the Project/Web Application (Content Delivery)

  • New content types, accompanied by their Groovy controllers and FreeMarker templates
  • REST APIs and/or server-side code
  • 3rd party integrations for the web app

Plugin Examples

Three example plugins created by eXA Online to solve different challenges include Imagic, Translatic, and Governancy. 

Imagic

For several of eXa Online’s enterprise customers, there were situations where images needed to be reused in different sizes and with different aspect ratios within a website. They needed to offer the audience the best possible experience. For instance, digital managers want images to always be displayed in the optimal size and format and contain the best section without creating different versions each time.

Translatic

The Translatic plugin aims to present content to users from a specific country in their own language. For example, country managers may want to translate the content from the main page into a local language. However, they might also want to see the original text while translating and tracking information. 

Governancy 

With the Governancy plugin, content teams could ensure that the internal requirements for content quality were met. This would give editors the possibility to check content quality before publishing. 

Learn More

To see these plugins in action and learn more about building custom plugins, view the entire talk from CrafterCMS Live! 2024 in this recorded video: Building Custom Plugins for a Composable CMS


Share this Post

Related Posts

Related Resources