“Should I stay or should I go?” Should you stick to an all-too-familiar traditional CMS and “reap” the benefit of getting loads of much-needed functionality out-of-the-box? Or should you bid on flexibility, top speed, and versatility instead? In a headless CMS vs traditional CMS “debate”, which system best suits your specific needs?
Now, let me try and “guess” some of the CMS requirements on your wishlist:
- to have all the needed functionality “under the same hood” (a predefined theme, robust database, a user-friendly admin dashboard...)
- to be developer friendly
- to integrate easily and seamlessly with any modern JS front-end of your choice
- to “fuel” your website/app with high speed
Needless to add that:
You can't have them all in one CMS, either traditional or headless.
What you can actually do is:
- set up a hierarchy with all your feature needs and requirements
- set it against each of these two types of CMSs' advantages and limitations
Just see which one of them “checks off” the most requirements on your list.
Then, you'd have yourself a “winner”.
So, let's do precisely that:
A headless CMS vs traditional CMS comparison to help you determine which one's... a better fit for you.
1. Traditional CMS: Benefits and Challenges
Everything in one place...
That would be a concise, yet fully comprehensive definition for the traditional CMS.
Just imagine a content management system that provides you with all the critical features and functionality, all the needed elements straight from the box:
- a generic theme
- a dashboard for easily managing your own content
- a predefined database
- PHP code for retrieving the requested content from your database and serving it to the theme layout
The back-end and front-end, meaning the code, database, and the layout/design, are “under the same hood”, strongly coupled.
It's all there, pre-built, at hand... “Convenience” must be another word for “traditional CMS”.
Security & Performance: A Few Challenges to Consider
Getting all that critical functionality out-of-the-box does translate into... code. Lots and lots of code, lots and lots of files.
Which also means lots and lots of potential vulnerabilities to be exploited.
There could be an error in any of the files in that heavy load of files that you get. Or a query string parameter that could be turned into “free access” into your database...
Therefore, the convenience of built-in functionality does come with its own security risks.
Also, whenever you make a “headless CMS vs traditional CMS” comparison, always be mindful of the maintenance aspect:
Of the upgrading that you'll need to perform with every new security patch that gets released.
Now, as regards the performance “pumped” into your traditional CMS-based website/application, just think: compiling files.
That's right! Consider all those custom files, in addition to the pre-defined ones that you'll be provided with, that you'll pile up for... customizing your website.
All these files, all the new libraries that you'll want to integrate, will need to get compiled. Which can only mean:
- more stress put on your server memory
- copying code of functionalities that you might not even use
- a poor page loading time, with an impact on the user experience provided on your website
2. A Traditional CMS Is the Best Choice for You If...
Now, you must be asking yourself: “How do I know if a traditional CMS is the best fit for my own use case?”
My answer is:
You go through the here listed “scenarios” and see if any of them matches your own.
- you already have a team of PHP experts with hands-on experience working with a particular CMS (Drupal, WordPress...)
- it's a stand-alone website that you need; no other applications and tech stack that might depend on a CMS's provided functionality
- you're not opinionated on the technology that your website will get built on
3. Headless CMS: What Is an API-Based Website, More Precisely?
“It's a CMS that gives you the flexibility and freedom to build your own front-end — Angular, Rails, Node.js-based, you name it — and integrate it with content management tools via an API."
In short: your headless CMS can then serve raw content — images, text values — via an API, to a whole “ecosystem” of internet-connected devices: wearables, websites, mobile apps.
And it'll be those content-consuming devices' responsibility to provide the layout and design of the content delivered to the end-users.
What's in it for you?
- it dramatically streamlines the development cycle of your API-based website; you can get a new project up and running in no time
- there's no need to pile up lots and lots of files and the code of out-of-the-box functionalities that you might not even need
- if there's a particular service that you need — store form submissions or a weather forecast — there's always a specific service with an API that you could integrate to have that particular content served on your website
A headless approach gives you the freedom to integrate exclusively the functionalities that you need into your website.
Moreover, you still get a dashboard for easily managing your content. Your headless CMS will have got you covered on this.
With no code being “forced” into your website/mobile app or need to perform a performance “routine” for this. You get it by default.
Security and Performance: Main Considerations
In terms of security, a short sentence could sum all the advantages that you can “reap” from having an API-based website:
There's no database...
Therefore, there are no database vulnerabilities, no unknown gateway that a hacker could exploit.
Furthermore, in a “headless CMS vs traditional CMS” debate, it's important to outline that the first one doesn't call for an administration service.
Meaning that you get to configure all those components delivering content to your website as you're building it. Except for that, the rest of the dynamic content gets safely stored and managed in your headless CMS.
“But can't anyone just query the service endpoints delivering content on my API-based website?”
True. And yet, there are ways that you can secure those channels:
- use double-authentication for sensitive content
- be extra cautious when handling sensitive data; be mindful of the fact that anyone can query the JS implementation
Now, when it comes to performance, keep in mind that:
It's just assets that your web server will provide. As for the content coming from all those third-party services that your headless CMS is connected with, it will get delivered... asynchronously.
Now, considering that:
- most of those endpoints are hosted in the cloud and highly flexible
- the first response — the first static HTML file that gets served — is instant
- you could go with a headless CMS that leverages a CDN for delivery
- in a traditional CMS scenario the website visitor has to wait until the server has finished ALL the transactions (so, there is a bit of waiting involved in there)
… you can't but conclude that in a “headless CMS vs traditional CMS” debate, the first one's way faster.
4. Use a Headless Approach If...
- you already have your existing website built on a specific modern tech stack (Django, React, Node.js, Ruby on Rails) and you need to integrate it with a content management system, quick and easy
- you don't want your team to spend too much time “force-fitting” your existing tech stack into the traditional CMS's technology (React with... WordPress, for instance)
- you need your content to load quickly, but you don't want a heavy codebase, specific to traditional CMSs, as well
- you want full control over where and how your content gets displayed across the whole ecosystem of devices (tablets, phones, any device connected to the IoT...)
- you don't want to deal with all the hassle that traditional CMS-based websites involve: scaling, hosting, continuous maintenance
5. Headless CMS vs Traditional CMS: Final Countdown
Now, if we are to sum it up, the two types of CMSs' pros and cons, here's what we'd get:
It comes with a repository for your content, as well as a UI for editing it and a theme/app for displaying it to your website visitors.
While being more resource-demanding than a headless CMS, it provides you with more built-in functionality.
It, too, provides you with a way to store content and an admin dashboard for managing it, but no front-end. No presentation layer for displaying it to the end user.
Its main “luring” points?
- it's faster
- it's more secure
- more cost-effective (no hosting costs)
- it helps you deliver a better user experience (you get to choose whatever modern JS framework you want for your website's/app's “storefront”)
It's true, though, that you don't get all that functionality, right out-of-the-box, as you do when you opt for a traditional CMS and that you still need to invest in building your front-end.
In the end, in a “headless CMS vs traditional CMS” debate, it's:
- your own functionality/feature needs
- your versatility requirements
- the level of control that you wish to have over your CMS
- your development's team familiarity with a particular technology
… that will influence your final choice.
Photo from Unsplash