I’ve been thinking a lot lately about content management systems (CMS’s). Having spent many hours trying to will a WordPress theme I created to do what I asked of it I was thinking how is it possible that 30% of the web is built on top of this seemingly antiquated system?
I was fixing up a mate’s WordPress site trying to have it so the content would display responsively on all different devices. This just means that your site or application looks good or preferably great and readable regardless of if it’s being viewed on a mobile, your computer or any other device with a screen you have lying around.
Having spent the better part of this year working with React.js and other modern front end frameworks and languages I was left thinking… what is this mysterious PHP thing and why didn’t I learn that sooner!
It was an excruciating process having to learn a way of doing something that didn’t seem to fit with the paradigm of software engineering as I had learnt it. A lot of this anguish was probably due to growing pains, I’ll give it that, and the inherent learning curve of taking on a foreign concept is not always a joy, but what gives man! How is this “how it’s done”! I was also eager to use all these cool new tools I had learnt and was instead stuck with having to learn a kinda old, (in programing years) language. How do I set up this local environment? Do I go with XAMP, MAMP, Local by Flywheel, do I need phpmyadmin?!?… Give me back PostgreSQL and some good old fashioned JS!
So this all got me thinking… what’s a good alternative to WordPress and PHP? Can I just avoid this whole song and dance? There should probably be a better approach to building future proof application? Right ? A platform that actually works well across multiple devices, good for small business owners and developer friendly?
Along comes the headless CMS, which is basically structured so that whatever your preference of front-end framework/language is you can apply it to a third party content management system and then communicate with it much like you would communicate with any other traditional API.
I chose to use a service called Contentful, which is a San Francisco/Berlin company that seems to be killing the game in this field. To demo this setup I took a small business I kinda secretly started last year and created a little storefront for it. I used React.js, Material UI and Contentful. How did it turn out?
Well check it here…
And the source code …
Oh and the WordPress I hear you ask? Well I didn’t give up on that either.… Figured you probably shouldn’t be listening to me unless I could do both.
Check it out here…
Now while I’m a bit of an advocate for the headless CMS setup rather than the more plug and play approach of WordPress, there is merit in both paths.
What would be a good solution for your business? I really think it depends on the type of company you own or the type of business it conducts and the kind of functionality is essential for it to operate. However, I would say that while WordPress might seem like the easier choice in the beginning it may end up being more work in the long run. If you want to grow your business, especially if it’s an E-commerce one, then you might want to do some serious thinking now and avoid the headaches of migrating all that structure later.
Pass this along to any small business owners who might find these examples helpful and reach out to me if you have any questions about developing in either of these environments since I didn’t go very deep into the technical side here and am always down to talk about that side of stuff. Maybe I can help you save some time and avoid the pitfalls that I fell into along the way!