Content as a Service

November 9, 2017 / Katherine Thompson / Labs, TechTalk

CoreMedia is a Content Management System (CMS) which can manage your content from creation straight through to rendering. Our Content Application Engine (CAE) provides tools and a framework with which you can easily design a beautiful, consistent and fully-functional user experience.

The components of the CoreMedia system work gracefully together as an isolated system, but it is also flexible enough to be a small but crucial component in a larger ecosystem. Perhaps you have data from many different sources to include into your website. These sources could include  commerce systems, brick-and-mortar backend systems, marketing data, user management systems. Perhaps you have already committed to a certain technology in your website that you need to include. Or perhaps you would like to inject content into native mobile apps.

You need the flexibility to incorporate all that data from many different sources into your website, or reuse that content on multiple channels, while still taking advantage of the powerful content management features that CoreMedia provides: versatile Studio for creating, editing and managing  your content; extensive collaboration features; configurable publication and translation workflows and a wide spectrum of other features.

Our answer to achieve this flexibility is to deliver content from CoreMedia in a standardized, structured way (JSON), making it available for another system, leaving you full freedom to design and render your content using the framework of your choice. We  affectionately call this service the “Headless API”.  And this service is available for you now in CoreMedia Labs (see Resources below).

Using the Headless API you can generate ready-to-go HTML content fragments or dynamic Javascript modules. You can then easily insert these fragments into any webpage or single-page application. Use these fragments to seamlessly integrate, reuse, syndicate or publish your content from your CoreMedia CMS anywhere.

How does it work?

The Headless API defines a simple REST API to access content from the CoreMedia repository. On the server side the content is transformed via GraphQL queries before being returned to the client as JSON reponse. On the client side, simply parse the JSON response and process it as you please.

You can customize the GraphQL queries to tailor the returned JSON to your application’s needs.

The first step is to define a schema, which maps the content properties in the repository scheme to the attributes that you would like to extract. This can be done manually or with the help of a schema generator.

Then you define a set of GraphQL queries which will be matched against the schema.

The schema and query set are either deployed alongside the headless server or installed in the CoreMedia repository. The headless server can be started either by Spring Boot or as a Tomcat webapp. This is a separate component that can be deployed and maintained decoupled from the central CoreMedia system.

On the client side, just request the service’s URLs. The URLs determine which GraphQL query will be used, which content should be extracted and optional parameters for more fine-grained responses. Then you may process the JSON response with whatever technology you prefer.

CaaS-Swagger-Screenshot

Resources

Interested in a deeper understanding of CaaS in CoreMedia? See what we’ve cooked up for you in our CoreMedia Labs.

Github project: Headless Server as source code, plus a React client as an example

Technical wiki: Documentation on installing and customising the Headless Server, plus documentation on the example React client


More posts

Jack in the Box: A Security Bug Story

XXE attacks are increasing. To harden our CMS against them, we implemented procedures proposed by OWASP. These worked fine – until they didn't. Here's what we did next.

Read More

Shoptalk 2018: From Retail Apocalypse to Retail Renaissance

Few retail conferences can rival the influence of the two leading players – the stalwart NRF, and the hip upstart, Shoptalk. Both shows have their strengths – but it’s hard to argue with one of Shoptalk’s key advantages: Vegas is March is a much sunnier experience than New York in January. With that in mind, I thought I’d dedicate this blog post to exploring some of the key themes and revelations from CoreMedia’s recent visit to Shoptalk 2018.

Read More

Sketch and Principle: UX Prototyping at Scale

The CoreMedia UX team has been busy working on a new vision for our UI. We wanted to explore new interaction concepts and interface design using an example story that leads through the major parts of our product. However, our product is huge so the story became quite long. We ended up with a Sketch...

Read More

Post a comment

SIGN UP

Add your name and email address to sign up for our CoreMedia Blog and Industry Newsletter and we will keep you posted about upcoming events, product enhancements and news about CoreMedia.

We promise to keep your data safe and you can opt out at any time.