Jamie Introcaso
August 07, 2019
Note: This article has been archived as it may contain features or techniques not supported with the latest version of Cosmic.
If you are looking into the question of what a headless CMS can offer you that a traditional, full stack, front to back CMS cannot, then there are probably a couple of things that can be assumed about you. One is that you have probably dealt with a traditional web publishing CMS like WordPress or Drupal. Also that you have some technical acumen, you are probably a developer, designer, or have an interest in a web presence. Another is that you have hit some struggle or have some pain point that has led to you to look into if a headless CMS can solve that for you. This article will point out some of the advantages that a headless CMS offers. Hopefully, your pain point is covered in here or it sparks an idea for a new way of thinking about what you can do with a CMS.
Language Flexibility
If you have dealt with a traditional CMS, there is a good chance that you have lived in the land of PHP. But maybe your shop is not a PHP shop. Maybe you are a .NET or Java shop and a client has brought a new blog project to you. Maybe you are on the cutting edge and only deal in the newest of JavaScript front end frameworks like React, Vue, or Angular. With a headless CMS, you can write in whatever language you want. As long as you can make an http request to an API, you are golden. It allows you to focus on crafting the presentation of the content that gets your message across, in a language or framework that you are most comfortable working with.
Design Flexibility
Most CMS systems have a few types of objects that you can choose to implement, such as Pages, Posts, or Forms. With a headless CMS, you can create objects of different types and model them however you like. It is a blank canvas for you to create your content in a way that makes sense to your use case and needs. It basically allows you to create your own wide-open API-powered database without having to know about indexes and sharding.
CMS as a Service (CaaS)
Everything is "X as a service" now thanks to the movement to the cloud. There are some that wear knowledge of Apache server or IIS like it is a badge of honor. They know how to bounce a server when the connections to the database start pooling up. That is fantastic, but that is not for everyone. Some don’t want those concerns. They don’t want to have to spend nights or weekends rebooting and updating servers when traffic is low. They only want to have to worry about the endpoint where their content lives. Having a headless CMS offloads a great deal of these infrastructure concerns. For small shops or freelancers, this can be a great weight lifted off of their shoulders when they no longer have to spend time on this.
Debugging and Testing
There can be a steep learning curve for even experienced developers when developing for a traditional CMS. The inherent decoupling that a headless CMS offers allows you to use tools such as Postman or curl to test your endpoints. This can be especially useful when chasing down pesky bugs by allowing you to easily determine if your problem is before your request for the content, what you are requesting, or what you are doing with the data you receive from the CMS. This also allows you to build out a full test suite where you can mock your data that would be returned from the CMS.
Futureproofing
Most reliable API products take great care to version their API and not introduce breaking changes. They know that one thing that gives them an advantage is that they are more available and reliable than other solutions. They may introduce other features, but they leave it up to you if you want to implement them or you can just leave things working as they currently are. No forced updates, no library versioning hell. You are not going to have to worry if you have the right version of some obscure package installed on your server in order for your application to run properly. Also, migration to another server or horizontal scaling is as easy as just spinning your application up on another server. You don’t have to worry about what tables in some arcane database have references to your original server. You don’t have to have any tools to go through and update those to your new server, hoping than none of your data gets corrupted in the process as things are overwritten.
These are just a few of the aspects that a headless CMS such as Cosmic can offer to developers over more traditional CMS systems. Hopefully, one or more of these struck on a problem that you have been having or sparked some imagination of something new that you now envision creating.
Jamie Introcaso is a Full-Stack Developer in the Cosmic Community. Read about Jamie's migration from WordPress to the Cosmic Headless CMS here. If you have any comments or questions about building apps with Cosmic, reach out to us on Twitter and join the conversation on Slack.
Photo by Joel Filipe on Unsplash