Headless CMS: Why Decouple The Front And Backend Of Your Site?

Headless CMS: Why Decouple The Front And Backend Of Your Site?

Photo by Alexas_Fotos on Pixabay

We’ve discussed static site generators often on the Future Hosting blog. Like many developers and site owners, I enjoy the flexibility and freedom static site generators offer, not to mention the performance benefits of static sites. But static site generators pose a problem for developers who build sites for ordinary users. SSGs expect a familiarity with web technologies that web developers can’t assume of their users.

Headless content management systems are a nice compromise: they allow developers to build front-ends that are decoupled from the underlying content management system’s theme framework. That means front-ends can be built in Angular, React, or any other JavaScript framework by developers who aren’t keen on tangling with the intricacies of PHP-based themes.

Writers, editors, and publishers spend years becoming familiar with content management systems. They are expert CMS users, but they often have no desire or incentive to learn the underlying systems and code. They understandably want to focus on creating and publishing content — the CMS is just a tool. A headless CMS allows creatives to use the interface they are familiar with without imposing the constraints of an inflexible content management system framework on front-end developers and designers.

The front-end component interacts with the back-end via an API, pulling content and metadata from the content management system’s API and using JavaScript and CSS to format and display the results. The difference is transparent to ordinary site visitors and to users who publish and manage content, but a headless content management system gives developers more flexibility.

That’s important because with the freedom provided by a headless content management system, developers can iterate more quickly on the front-end experience, build different front-ends that take advantage of the same content, and access the most up-to-date web technology.

Historically, a headless CMS was complex to build and manage, but with the advent of the WordPress API, it’s a lot simpler. Sites like the New York Times and Quartz used WordPress as a headless content management system before the introduction of the WordPress API, but it was an expensive and time-consuming process, putting headless content management systems out of the reach of the average business. But today’s WordPress provides everything a developer needs to build a fully functional decoupled front-end.

WordPress is a battle-tested platform built on mature technologies like PHP and MySQL. On the back-end, stability and consistency trump the bleeding edge every time. But the front-end world is moving forward at an incredible pace. New languages like Typescript and advanced frameworks like React and Vue allow developers to build rich user interfaces quickly. It’s entirely possible to build complex interfaces with WordPress or Drupal templates, but it’s not ideal for developers steeped in the JavaScript world.

A headless CMS offers the best of both worlds and that’s why they are becoming a favored option for ambitious front-end developers.

Matthew Davis is a technical writer and Linux geek for Future Hosting.

Dedicated Server Special

Take advantage of our Double RAM offer on the E3-1230v2 4 x 3.30GHz+HT server! Only $134.95 per month. Managed and Unmanaged options available at checkout.