A case for Headless CMS


Content management systems have always been an easy entry to website creation and there is a reason they are behind almost 50% of the current web. They are relatively easy to set up, in fact many website hosting providers have an option to install a CMS and get going with 1 click. You log in , you create a Content Type. You then create data for that Content type and press publish and.....voilà! You have yourself a website, with actual content you made and published. Links and routing are handled by themselfs. And the way the website looks is just one free theme and a few clicks away from looking really good. That's all, that simple. In fact the very first couple of websites I myself made where with CMSs. A couple of IPS forums geared to gaming and amateur computer hacking, a Wordpress Blog and profile website. It was easy and it worked and it required 0 code on my part. Anyone somewhat computer literate can get a site and get going with it. many off them

Another thing you might wanna do, is add some cool features to your site, a caldendar, a contact form with verification and captsa. ANd all this with an added bonus of having a chatroom fool of people discussing and debugging possible issues you might have during the installation or use of it. So many things out there that someone else has made, some of the plugins are so big and offer so many changes that they might completely transform the website on it self. An example of might be something like WooCommerce, it takes the default Wordpress blog site and it turn it into an e-shop. bundled with all the functionalitites you might need.


Someone once said that no matter what you have said, it holds zero values if a "BUT" following it. Here is the deal, I myself having worked with a CMS extensively in the past (Drupal, hence all the references that are about to followI do not like working with them. As easy as they are to get going for something simple they become extremely difficult to work with when dealing with complex sites. They are slow out of the gate, they make hundreds of useless calls to the database that take time from the page rendering, They are very opinionated in the way you write your code. Anyone who tried to add a simple Javascript snippet or run jQuery in Drupal knows what I am talking about. "The Drupal way" is a phrase that strikes terror in my heart till this day. Having to re-write chunks of code to a specific standard just to work, only to realise that you JS will cause you site to fail on a different browser. Thousands of plugins that you do not know who wrote or what does they code bring with them. Security issues and thousands vulnrabilities that get created. Code that is written terribly and might work only in some scenarios and plugins that people have simply stopped supporting. Frequent updates that fix x but break y,z,q,e,r,t,w.


Also the past decade has been a notable focus on performace, having super lightweight highly responsive websites served with minimal cost that are SEO are the new standard of the industry. Again another thing CMSs have failed to follow. And its only logical right? CMSs have been an even bigger part of the web in the past, but the decline in use over those modern ,frameworks has reduced the talentpool of developers for them compared always to the market size. Some of the most popular Drupal plugins are s beta or even alpha to this day!! Just because people made something that was demanded and then they moved on. Hell people are still using Drupal 7 because they want to use specific plugins. Doing custom themeing is also a mess, different directories and file extensions you need to learn and absurd rules you need to follow, manually refreshing the cache even in development mode. "Hey! , but there is a plugin for that!!!"

STOP!! just stop!

Thats the problem, you can not have a core part of your code that is as opinionated as a complex CMS and add more partitioned code that depends on it. Then add the fact that you are going to make updates to the main body of the code.....things are eventually goinfg to break. People might point out that is because in the majority of them, PHP is the language that everything is build with... and I disagree. PHP is old, but its solid and robust. The problem is, that there is a lot of shitty PHP code outthere that a lot of people copy paste from the internet and leave inside a plugin that might work for the time, but will cause an issue down the line. Another issue is that most of those CMSs are build on top of frameworks Symphony, Zend etc. Again those are SOLID, the problem arises when the underlying frameworks get updates either for security or quality of life, something that the higher abstruction level CMS does not get the benefit of because it uses an older version. Requiring rewritting in parts so it can work.

Keeping the good, an alternative.

Taking a step back, the majority of the stuff I mentioned above are in regards to the front end. As easy it is for a developer to create an API that serves data, still the content creation part is lacking. And that is what in my opinion CMS excel at.After all it's in their name, Content Management. In fact, all of the popular ones have plugins that turn them into data serving API's. That is what you call a Headless CMS. Basically you get all the benefits of being able to create/edit/delete data. With none of the troubles of having to deal with serving it alongside a UI. Leaving you free to choose your preferred front-end technology. In fact, this website is made with one of them... Strapi, I have never used it before. It was super easy to setup and get going, literally took me 15 from installation to creating end points, with the availiability of doing custom things always being there. After that I used NextJS for serving my front and i was ready to go.

Coming to an end.

Here is were I stand on the matter, I do not think that any CMS is going to replace custom build enterprise platforms. Those need to be optimised every little step of the way. On top of that they are not for pockets of everyone, as they require a lot of developers and time to be created, both of which cost money. But simple websites, that maybe require 1-2 custom features, I am believe is were they find theirs place in tthe current web ecosystem.

Contact Me