Welcome back to the show, Kyle Willard jumping in with you today! I have to keep saying it, what craziness! It's always crazy, right? Regardless a huge thank you to everyone hitting the like, share, subscribe, and follow buttons. That of course is a huge help as this podcast continues!
This week we are going to talk about a legit Software Engineering topic that I have looked pretty hard at over the last few months, and one that I am pretty excited about. We are hitting Headless CMS. What is it, why is it awesome, why could it suck...
A headless CMS is any type of back-end content management system where the content repository “body” is separated or decoupled from the presentation layer “head.” Content that is housed in a headless CMS is delivered via APIs for seamless display across different devices. Some traditional CMS platforms offer a “headless API” that allows you to send content to a separate presentation layer. They call this “headless” because the presentation layer is separated from the body. One way to solve the limitations of a traditional CMS is by implementing a “headless” CMS — if the presentation layer of a website is the “head” of a CMS, then cutting off that presentation layer creates a headless CMS. While this type of headless CMS enables you to choose an appropriate presentation layer for a digital platform, it doesn’t solve an underlying problem: structuring content so that it can be reused across different platforms and channels. Headless architecture is a similar concept to a headless CMS, as it is a multichannel solution for effectively publishing dynamic content across a variety of platforms and devices. Content stored in a headless architecture is raw and unformatted, and its final presentation isn’t limited by a front-end system.
Source: Contentful
First, for those new to the scene, a CMS is a Content Management System. Basically, it allows non-technical users (and technical users) to create and share content on their site without crunching code to hardcode it in. This concept has been around for a really long time and has simply evolved.
To simplify the statement above, the head is the face or the UI/UX side of the products. The front end if you will.
I will note here that there is a headless CMS in place as an API for the New Evolution Digital website that currently is a bit overkill, but long term will allow for us to add things that otherwise we would have to crunch a ton of additional code. It really does speed up the backend development to have a headless CMS when you are dealing with a good amount of content that needs to be pushed to the front end. For example, Sanity.io and Strapi can be spun up in minutes, and with a little exception, you can have access to the REST or GraphQL API within a few minutes. It has some pain points that get a little bit awkward to deal with but generally, it's pretty quick.
So again this is kind of a cop-out. A headless CMS uses a normal server it is just built out in such a way that you can spin it up and work within the confines of the predetermined code. Which is good and bad.
If I wrote out a full Node server and I built in all of the features that I wanted it to have it might take a bit more time, but at the end of the day the features are in, and I would assume that you tested that server, and it was 100% viable. I now have created a full server and it is going to work exactly how I want it to without any sort of compromises or deviations from my design.
Now with a headless CMS, you will have some flexibility, but the production-grade code that is already spun up will limit you in some regards, and it will be a bit different for each different CMS that you work with. For example, as I noted I used strapi. The email side of that was a bit of a pain for some reason, but once it got running it does great. It's overkill for what it is handling, but again, we have room for growth. I could have simply spun up nodemailer, and set up a CRUD for the reviews if that was all that was planned, BUT that isn't what is planned. Hint hint... YOU as the developer need to take the time to plan the best option for your project. If there are a good number of aspects of a headless that you can leverage and you like the way it's been built out you are in a great place.