Going headless with CMS to use the new front end technologies

Going headless with CMS to use the new front end technologies

Have you worked with CMS like WordPress or Drupal? Or may be Magento for any e-commerce solutions?

I have good experience with each of these CMS, but one thing which bothers me a lot is their choice of front end frameworks. For example, the most of the JavaScript API for Drupal is still available in jQuery. WordPress is a little better because you can use themes like sage where you can compile React or Vue.js. In Magento you need to work with jQuery or knockout js.

I have worked a lot with modern frameworks where data binding happens out of the box. DOM manipulation is not required, because we can do that using data change. And so jQuery feels very limiting.

These CMSes are very strong when it comes to working with content. That's their forte right? But, the front end stack has not evolved so much at their core. And, the reason is quite simple - there are so many websites running on those technologies. So, you cannot move away from something like that so easily.

So, to get the best of both worlds we have the headless space. The idea is that you work with the content inside the CMSes because that's where their real power comes in. For doing the front end, you rely on what's the best in that space. Using APIs we can exchange data between a front end app and the CMSes. And then we can build with something like Next.js or Nuxt.js based on your weapon of choice.

This gives you the ability to use the real power of these front end frameworks. They focus on what their framework is suppose to do best. A small example is the new image component that Next.js has introduced. It allows compression, lazy loading, eager loading and other stuff which we all do so many times in every site as part of optimization.

I am planning to build my own website using Next.js which will be powered by APIs. And with server side rendering, I don't need to worry about SEO as well.

Will share my experience on building the site soon.

Photo by Mathew Schwartz on Unsplash