Beyond Headless Content: Layout as a Service in dotCMS
Expect More Than Content
You should expect more than just content from your REST
APIs. With "Layout as a Service", or LaaS-ie (groan), you can get the
benefits of a traditional CMS-driven experience with the developer friendliness
of CaaS. Layout as a Service makes app/CMS integrations (including previews)
extraordinarily straightforward. Scroll down to "The Goods" for
example code.
Give it a REST
In the CMS space, RESTful access to content (Content as a
Service, CaaS, Headless CMS, etc.) is all the rage. With the rise of modern
JavaScript frameworks and Single Page Apps, it is pretty easy to see why.
Content as a Service allows the decoupling of the management of content from
the presentation of that content and gives developers access to content in a
familiar JSON format. This is a huge benefit for developers as they are no
longer tied to developing in what they might consider old-fashioned CMS-based
page presentations. Developers can develop (read: play) with the latest modern
application technologies, Angular, React or whatever and access / inject
business managed content into their apps via REST. The good news is that dotCMS
has had these REST endpoints for years. Hooray Developers, right?
When Content as a Service Is Not Enough
The problem comes along when business users need to see a
whole layout in CONTEXT to manage content effectively, very much like
traditional in-context editing, and when users require more control over the
layout, order, and presentation of their content than a single CaaS call will
allow. In fact, they need to manage something very much like a page made up of
different content objects, but it needs to be machine consumable in order to be
delivered properly in other applications.
Concrete example: We recently had a customer whose business
users were in charge of managing not single content objects, but
lists/carousels of different content objects, with specific graphical headers,
based on visitor personalization and contextual data — think Netflix movie
lists. Business users needed to be able to generate lists and respond in an
extremely agile way to fast developing marketplace trends (say the death of a
beloved performer) and the business needed to be able to manage and order the
lists of the carousels (managing the list of lists) so that they made sense for
the visitor. And, insult to injury, the resulting layouts and lists needed to
be displayed not as pages, but in apps and set top boxes, some with limited
HTML markup capabilities.
Enter Layout as a Service
Layout as a Service (LaaS) takes the best of a CMS-driven
experience (easy templating, server-side contextual rendering, workflow,
personalization, rule and permission-based content delivery) and marries it
with the developer friendliness of Content as a Service. In dotCMS 4.2, you can
call any page and receive the full page payload back as a single JSON object,
including:
Site/Host/Channel with surrounding metadata
Page details, SEO Keywords, descriptions and canonical URLs
Template details
Content block details — these are a listing of the editable
blocks of content that make up a page
Layout details, including header, footer, column and row
information for grids
Not only that — and here is the magic — you can tell dotCMS
to render the results and return the rendered results as JSON to you so you can
use the information to paint your screen as needed, with very little effort.[
Source]-https://dzone.com/articles/beyond-headless-content-layout-as-a-service-in-dot?fromrel=true
We provide best Java Training in Navi Mumbai, navi mumbai. We have industry experienced
trainers and provide hands on practice. Basic to advanced modules are covered
in training sessions.
Comments
Post a Comment