Web development is changing every year (even often to be honest). In past years, headless CMS became more popular. But is it worth going headless nowadays? Why not to choose WordPress (which is still the most popular CMS solution in the world) with any default theme, and start using it with all pros and cons that it provides?
Many digital agencies say that it’s the only proper way to build a website nowadays. JAMstack, Headless CMS, communication via REST API… It may be difficult to understand by the company’s owner or even marketing department to understand what are those technologies and when to use them.
First of all — what does it mean, that CMS is headless?
In simple words: headless CMS is a Content Management System that has only a back-end and provides data to the front-end through API (e.g. REST API or GraphQL).
What’s the difference? “Traditional” CMS also renders a front-end — the whole application is managed by one system.
Headless CMS requires an independent front-end application that grabs the data from the back-end.
When will headless CMS be a bad solution for your company?
- When you have a team of marketing specialists that know the basics of HTML
- When you want to test new solutions quickly (without hiring team of developers each time) using plugins or built-in CMS sollutions
- When you love to use a lot of plugins instead of creating dedicated solutions
- If you don’t really need a fast performance. More important is possibility to make quick changes on your website than load time on your customers’ devices
- If safety of your back-end is not the most important thing in your company’s politics
Traditional CMS (I will use WordPress as an example) has a lot of advantages. Huge community, a lot of plugins that give you the possibility to do anything with your site (plugins for back-end and front-end), great support, and tons of articles with tutorials on how to do it yourself. It gives you an opportunity to quickly test your solutions if they work. But it also loads a lot of stuff that you will probably never use, so your website’s loading time can become enormous.
Using a lot of plugins also increases the danger of being hacked. You will need to remember about regular updates of the back-end and all plugins, especially if a new safety issue appears. If you have a staff that can handle it, you can sleep (quite) easy.
If your marketing team often does changes, e.g. A/B tests of sections on your website, etc — it will also be a reason not to use headless CMS. It will be easier to achieve with a “traditional” WordPress approach (I will write an article about a more efficient way to do custom WP themes, that can provide more safety and more flexibility to your website).
So is it worth to use headless CMS at all?
For sure — yes. Especially if the following aspects are important to you:
- Performance of your website
- Security of your website
- Efficient front-end of your website
- Modern tech stack (e.g. Vue.js or React instead of jQuery)
- Being SEO friendly
Headless CMS provides you a much better performance than “traditional” CMS. It is because you load scripts and styles that you need — you won’t trash your users’ network with tons of unused stuff.
It is also more secure. Your front-end and back-end have to have different URLs. You can hide your request behind a proxy, so it would be much difficult to find the way to your back-end, so if a hacker would try to hack your website, they would have a really difficult job to do — there will be no back-end on your website’s main URL. You can make your back-end accessible only to your employees.
Your developers will be able to use modern technologies that offer a lot of possibilities to make your website faster, and easier to maintain. Reduced script bundles, purged stylesheets, minified images… Nowadays web development gives you the opportunity to build really efficient websites.
Changing your website into a web app would be easier using a headless approach (or you can easily add a new module that may change your business into the online leader of your niche). It is better to maintain a web app using new technologies (like Vue.js or React) than in pure JS. It will be faster and PWA-ready, so your customers can easily pin your website (web app) onto the screens of their mobile devices.
You can also grab data from many different sources using one front-end. Your content marketing team can manage your blog using a CMS that they love (of course if this CMS provides API access), and you can run the store with any e-commerce solution (e.g. Magento 2, Shopify, etc.). Imagine how many possibilities are open now! You can pick the best solution for every need.
Sites with independent front-end are also SEO-friendly. Faster load times, server-side rendering of the web app (I didn’t mention this before, but you should use an SSR solution like Nuxt.js or Next.js), optimized images, PWA, etc. — Google just loves it.
I’d like to use headless CMS but my team loves WordPress. What should I do?
The answer is pretty simple. Use WordPress as a headless CMS! WordPress has native support of REST API (btw, it can be done much better. By default, anyone can enumerate all users of your WordPress site, because it’s publicly accessible), so you can grab the data from your WordPress. There are also plugins that enhance possibilities of using WordPress as headless, e.g. WP GraphQL Plugin that provides to get the data using GraphQL instead of REST API.
How to do it? Just create a WordPress website (e.g. on subdomain: yourbackend.yourwebsite.com) and then create a front-end app that is getting the data from WordPress. You’ll be able to use WordPress as a content-management system with all its goods and have an independent frontend that loads really fast. It sounds great, doesn’t it?
What can I use as headless CMS for free?
- Strapi
- Ghost
- WordPress
- Contentful
- Twill
- Sulu
- CosmicJS
- ButterCMS
- dotCMS
- Directus
What technology stack should I use on frontend?
Your development team should use the stack that they prefer. One important aspect is that the stack should provide a server-side rendering possibility?
Why is SSR so important? For two reasons: security and SEO. Security, because by using SSR, you can hide all requests to your back-end behind proxy, so a potential hacker wouldn’t know on what domain you have your back-end. SEO because search engines better handle content rendered on the server side, than dynamically loaded via JavaScript.
How does the development process look like?
It depends on the agency that you picked to create a website in this approach. We usually work in the following order:
- Talk about your needs. We need to understand what will be the main goal of the website.
- Think about the customer journey. We take care about all aspects that your website requires to be efficient.
- Design a layout. We prepare a bespoke layout that will suit your company.
- Prepare the back-end. We do a backend to provide a possibility to change all content of your website.
- Do the front-end. Our front-end developers program the design onto live website and connect it through API to the back-end.
How long does it take? It depends on the complexity of the website. Simple websites can be done in a few weeks, while large projects take a couple of months.
Był pomocny?