Try our conversational search powered by Generative AI!

Daniel Ovaska
Sep 18, 2020
  3496
(3 votes)

To use headless or not, that is the question

Noone can have missed the headless wave going through the web developer community lately. Episerver supports building a headless solution very well with the content delivery api that was added from v11.4. I have personally used it a lot to build SPA (single page application) solutions on top of Episerver using both vue, react and angular and it works great. The latter versions of Episerver also makes it possible to build support for editors too. But what is really the pros and cons with headless? When should you use it and when should you stay away from it?

Pros:

  • Easier to implement complex user experience parts with lots of interactions
  • Frontend developers get more power and can more easily implement a feature without help

Cons:

  • Performance can be tricky to achieve for first page load especially on large enterprise sites, which hurt conversion rate and SEO
  • Editor capabilities are limited. It's trickier to support more advanced scenarios like A/B testing, previewing, blocks etc
  • Routing and SEO. For a full SPA that also takes care of routing, SEO and deeplinking is more difficult
  • Implementing standard functionality that is powered by content made by editors takes longer time with headless than traditional architecture
  • Increases complexity of overall solution if used too much
  • Javascript frameworks have a best-before date similar to milk
  • Can easiliy grow to become a difficult-to-manage monolithic solution which may become difficult to replace in a few years
  • Backend developers get less power and will have more difficulty to implement a feature without help

Headless + powerful javascript framework X is great for user interaction-heavy parts of the site

To summarize, headless CMS combined with a rich Javascript framework like react, angular or vue is a great tool to solve a specific problem. Pages or parts of your website that has a lot of user interaction benefit from using a headless approach with a more powerful javascript framework. It can be complex forms, graphs or specific tools (think gmail, google maps, power BI, advanced checkout in an e-commerce and similar views). Be aware of the potential downside of initial load speed can have on conversion rate (especially on mobile) and SEO though. A page that loads in 4.2s will have approximately half the conversion rate that one that loads in 2.4s. Read more here.

Traditional site without heavy javascript framework is best for content-heavy site

For strict content heavy parts headless is not the best match. If your focus is content, rather than fancy user interaction, your site benefit more from a traditional architecture without the headache from headless and heavy javascript and focus more on Episerver pages and blocks powered by standard html, css and backend to give the editors maximum power. To the end user you will be able to get the absolute best performance and load times especially on mobile devices. SEO, A/B testing and a rich experience for editors to experiment with content is very easy to support. Add a content delivery network, (CDN) on top of that will give you the best performance anywhere around the globe. 

Summary

Architecture and design patterns like headless are tools to solve a problem. If you don't have the problem, don't apply the solution.

If you have a part of the site that is focused on content and a part of the site focused on user interaction, use both headless and traditional backend architecture, but avoid mixing them, to get maximum benefits for both users and developers. 

Happy coding!

Sep 18, 2020

Comments

Please login to comment.
Latest blogs
Solving the mystery of high memory usage

Sometimes, my work is easy, the problem could be resolved with one look (when I’m lucky enough to look at where it needs to be looked, just like th...

Quan Mai | Apr 22, 2024 | Syndicated blog

Search & Navigation reporting improvements

From version 16.1.0 there are some updates on the statistics pages: Add pagination to search phrase list Allows choosing a custom date range to get...

Phong | Apr 22, 2024

Optimizely and the never-ending story of the missing globe!

I've worked with Optimizely CMS for 14 years, and there are two things I'm obsessed with: Link validation and the globe that keeps disappearing on...

Tomas Hensrud Gulla | Apr 18, 2024 | Syndicated blog

Visitor Groups Usage Report For Optimizely CMS 12

This add-on offers detailed information on how visitor groups are used and how effective they are within Optimizely CMS. Editors can monitor and...

Adnan Zameer | Apr 18, 2024 | Syndicated blog

Azure AI Language – Abstractive Summarisation in Optimizely CMS

In this article, I show how the abstraction summarisation feature provided by the Azure AI Language platform, can be used within Optimizely CMS to...

Anil Patel | Apr 18, 2024 | Syndicated blog

Fix your Search & Navigation (Find) indexing job, please

Once upon a time, a colleague asked me to look into a customer database with weird spikes in database log usage. (You might start to wonder why I a...

Quan Mai | Apr 17, 2024 | Syndicated blog