Sunday, January 17, 2021

Headless CMS

 

Headless CMS (Content Management System) is a system where APIs are going to be used to get the required information from the CMS system in a way of JSON/HTML/XML format.

 

Fig 1: High level API Engine

Mainly the consuming systems will authenticate itself to main CMS through token keys and then once done, then rest of the calls which would be originated from consuming system to CMS systems will get the required results.

These data can be cached in the cache layer like content delivery network or in web servers so that the API calls to headless CMS system happens only when needed.

Headless CMS systems would require a Database system to store the content, console where web producers add content and preview it, Analytics system to attach analytics data to the content so that page load events and click track events can be captured.

 Lot many recent websites are multilingual, this means APIs should be able to provide language specific content when locale parameter is sent as query parameter. Headless CMS needs to have its own translation provide or self-console for international web producers to author language specific content and keep a translation memory so that same kind of text can be translated.

Search index needs to be done on various authored content with a key so that during search, search results can be shared based on the search done on the website via search API calls.


Fig 2: Search Index Generator Flow

In this above diagram, WIP (work in progress) content is the one where content creators starts to make changes for the created content to get the content to be ready for making it LIVE. LIVE content are the ones which content creators want the public to view.

We can have event handlers in the content management system used to detect any transition event changes on the content life cycle so that when the content editors make the WIP content to LIVE then the content can get indexed and that content can be saved in the indexing system. This system can create indexes based on the keywords, title, logical words from description with the page path.

Web Page can use any frontend framework to invoke content APIs to fetch content and search APIs on any searches done by end users.

Content APIs will fetch required content and Search API will fetch search response based on the keywords searched.

Caching layers can be introduced to store the results of the search pattern so that any items which are searched by one person can get the same results if searched with the same term.

A headless CMS is similar to a traditional CMS, but with one key difference: the headless CMS doesn’t have a frontend, and it doesn’t handle the display component of your website for you.

A headless CMS comes with a hefty dose of flexibility. Because it delivers content through an API, a headless CMS will deliver your content seamlessly to any device, in any context. When you go headless, the same backend can deliver content to an mobile app.

A headless CMS also gives you and your developers the ability to innovate quickly. With a traditional CMS, change can be clunky and time-consuming – to refresh your site, you generally need to re-implement the entire CMS. With a headless CMS, you can tweak your front-end without tweaking the backend, saving yourself time and resources.

A major benefit of using a headless CMS is that the same content can be published to a website, an app or anything connected to the internet of things. In the long run, the headless approach has practical implications for the artificial intelligence; in the short run, it can make managing content across different delivery formats much easier since the content isn't bound to a predetermined structure.

Fig 3: Translation Engine API Flow

For multi lingual sites where the websites need to support multiple language content is to have APIs which supports locale parameter to be sent in the query parameter or in any way so that server can give back the fragment which is localized.

In the above figure 3, we need to have mechanism in which we can treat a language like English as source language and think other languages as target and get the translation console up for any user entries to translate certain content manually and rest of them can have interaction with Google translator APIs to get the language specific content based of English content and then keep it in translation memory so that any later matches can pick the content from translation memory instead of making fresh calls for any service which are free or paid.

During interaction between CMS and Translation console, we can have the automated activity of creating packages from source tree based on console click option so that communication can happen to translation system and then back to CMS with translated content.

Benefits of using a headless CMS are,

Flexibility: Some developers find traditional CMS architecture to be frustratingly limiting. Using a headless CMS gives you the freedom to build a frontend framework that makes sense for your project. Since every headless CMS comes with a well-defined API, developers can spend more time focusing on content creation rather than content management.

Faster marketing: Speaking of which, creators needn't concern themselves with how different frontends display their content since all updates are pushed across all digital properties. This not only speeds up production, but it also allows you to reuse and combine individual content items.

Compatibility: You can display content to any device while controlling the user experience from one convenient backend.

Extra security: Since the content publishing platform isn't accessible from the CMS database, using a headless CMS lowers your risk of DDoS attacks.

Scalability: Keeping the backend and frontend separated usually means no downtime is needed for maintenance, so you can upgrade and customize your website without compromising performance.

Microservices architecture:

APIs also enable a microservices architecture, which can make components or services more easy to replace or upgrade as necessary. This modularity also decreases the dependence front-end engineers have on back-end engineers when it comes to changing themes or other presentation requirements that can create bottlenecks in traditional CMS platforms.