Sitefinity as a Headless CMS

Today’s content management system (CMS) platforms are required to offer an increasing array of functionality. One of those functionalities is referred to as a ‘Headless CMS.’

In essence, this refers to a platform that can manage content and provides API’s for any ‘device’ to access and display it. There are some pure Headless CMS systems out there but most, like Sitefinity, still have a frontend system – it now provides the API’s required to be classed as a Headless CMS.

Consider this example:

You are a car maintenance expert. With Sitefinity, you manage articles and documents around maintaining cars. Some articles are used as a lead generator and are open to everyone, while some are for subscription clients only.

You strike up a deal with several car websites to post some of your articles on a regular schedule. Rather than sending a copy of your article to each website owner every month, you provide them the API where they can access and pull the article contents. This means you create and manage the article once in Sitefinity and the sites just pull that information in.

Another concept. You develop a mobile app. The app talks directly to your Sitefinity site for articles as well provides a login and sign-up process for people to access those subscribers only articles.

With Sitefinity, you don’t need a developer to ‘expose’ these APIs. You can configure these while the site is running in backend administration. They can be anonymous or require authentication.

You can also push data to third parties by reacting to triggers such as content being created, deleted, or modified. This trigger will then make a call to a third party pushing that information for it to consume and react to. A common third-party platform, Zapier, receives this information and then connects other third parties of your choice such as Twitter.

This is the idea of a Headless CMS. You have one platform that manages your content with many systems able to access and consume that data and/or react to events that happen.

Sitefinity Headless Components

Sitefinity provides and uses a number of technologies to deliver this concept.

.NET Core Render

To date, Sitefinity has been a backend and frontend system in one platform. This option will stay as such but, with the release of Sitefinity 14.1 (scheduled to be out around March 2022), there will be an official stand-alone frontend platform. This is known as the .NET Core Render. Simply put, on a separate piece of infrastructure you install this frontend Sitefinity instance which then makes calls to Sitefinity (headless) API’s to display and run your public website.

As an example, this separation will allow you to have four frontend servers serving and caching pages for your customers while having two backend servers managing your content. This will provide you a lot of flexibility when it comes to scaling and using resources much more efficiently.

This concept will increase both website performance as well as improve the development experience.  

OData

All of Sitefinity’s content data can be accessed via OData. OData (Open Data Protocol) is an ISO/IEC approved, OASIS standard that defines a set of best practices for building and consuming REST APIs.

Though this implementation, you can call pieces of content as well as entire pages and their layout to be used in the front end of your choice.

Out of the box Sitefinity provides the ability to access all its data but also provides an extension point allowing you to write your own OData endpoints to provide some customised services.

Service Hooks

A little bit on the edges of the Headless CMS concept are Service Hooks. Service hooks can be looked at as event handlers and are fantastic for helping you integrate into other services. An example would be that when a news item is updated you can trigger a call informing other systems of the new article. When a new user registers, you can trigger a call to other internal systems to process the new user data. And as mentioned earlier, you can connect to external services such as Zapier.

JavaScript SDK

Sitefinity also provides a JavaScript SDK to help you make connections to Sitefinity’s OData Headless endpoints with functions and examples to handle authentication and making calls. This piece of work makes it very easy to help third-party sites integrate into your Sitefinity platform and utilize your data if that is a requirement.

For advice and support regarding your Sitefinity implementation, contact your trusted Sitefinity partner, Americaneagle.com. Contact us today to get started


About Author

Darrin Robertson
Darrin Robertson is a Sitefinity awarded MVP and developer at Americaneagle.com. He started his career at a bank launching and managing their initial online banking services at a time when the cloud just meant rain was coming. After discovering Sitefinity and becoming a specialist, he eventually came to Americaneagle.com. Darrin lives in New Zealand with his one and only ‘teams’ joke of being ‘a man from the future.’


Featured Posts