We build a Vue.js SPA on Top of Headless WordPress.
What does it mean?
Before diving deeper into WordPress as a specific example, let’s make sure we’re on the same page as to what headless CMS means.
Until a few years ago, we were used to traditional CMSs working a certain way. They were managing everything. By that I mean the backend (data/content management, roles & permissions, admin tasks) to the frontend (in most cases PHP-generated views) and everything in between.
However, there’s a significant shift happening thanks to the rise of modern frontend development. In the vast ecosystem that has spawned around it, there’s simply no place for old, monolithic CMSs. Static site generators, API-centric micro-services & serverless architectures are here to stay.
It doesn’t mean that something like WordPress should go away though. It only means that it shouldn’t manage all parts of a website anymore. Why’s that? Because there are tools that are way better at accomplishing certain tasks than others.
So, why not use WordPress only for what it’s really good at? That’s exactly what the WP JSON REST API has enabled since the release of WordPress 4.7. It allows for the content injected in a WordPress backend to be consumed into frontend apps, no matter what technology is involved.
The main downsides of WordPress (which devs have been complaining about for years, by the way) was the lack of development freedom and the hassle that was template customization. But by using WordPress only as a backend, these concerns are thrown out the window and at a high-velocity, no less:
→ Freedom is given back to developers to use the tools they love, on a modular level. This allows for projects to scale only when needed and, incidentally, results in better performance.
→ Dealing with WP templating is over. Plug it into the frontend of your liking and don’t worry about overriding PHP-based templates. It’s way easier to build kick-ass UIs from scratch that can then consume WordPress data.
The following website https://www.vitalogue.com/ will highlight these benefits. Vue.js is the frontend framework that I’ll use to build my application on top of WordPress.