Framework or CMS?

One of the many confusing things to get your head around when you enter the changing world of web development is this – what is a framework and/or a CMS? Here I will briefly summarise the differences, and also attempt to clarify when you should use them, or if you need to use them at all.

What is a CMS?

Let’s start with the easy one first. A CMS is a content management system. These have been around for more than 20 years, and their basic premise is still the same. They are a web based application which provides a non technical person the tools needed to add content to their website. This is a good thing, as it means content creation is not limited to people who are web developers. Literally anyone with some computer knowledge can log into a CMS and add a blog post for instance, or a new product to their online store.

There are thousands of CMS systems out there, many of which are free to use. The (small) catch is you might need someone to install it on your web server, but the most popular ones are often available as one click installs in your service provider’s control panel. You are reading this article on WordPress, which is by far the most popular CMS in the world. Other’s you may hear of are Drupal and Joomla, but there are paid sites that provide an excellent CMS experience, like Squarespace. This is now a crowded market, so the quality is high.

The downsides of a CMS

However it is not all wonderful in the world of CMS’s. A common issue is that many sites look too similar, if you want a truly unique site , a CMS is not necessarily the way to go. It is possible to customise them, and in the case of WordPress many web developers have made entire careers just out of custom WordPress sites and themes. However it requires a lot of technical know how, and in some cases is very ‘hacky’, i.e. you are making the CMS do stuff it was never designed to do, and then when it is updated, these modifications may not work as intended, or at all.

Installation can also be painful if you stray too far from the well known CMS brands. But despite this Content Management Systems remain popular, and are constantly evolving and getting better.

What is a Framework?

Frameworks have not been around for quite as long as CMS’s. When I first started out 25 odd years ago, as far as I’m aware they didn’t exist, or were just a distant rumour. Now they dominate the coding landscape, and there is a good reason for that – they make a developer’s life easier ! And this is an important difference , Frameworks are for web developers, not end users.

The reason Frameworks came into being was that web developers got tired of doing the same things over and over again. This often involved CRUD – Create, Read, Update and Delete. These are the primary functions you will find on any CMS or admin back end, and when you are on your 100th website, having to write the same code over and over again becomes boring pretty quickly. Another good example is user authentication, something almost every single website will require.

This is the issue that Frameworks attempt to fix. For example , Laravel is a PHP Framework, possibly the most popular one out there. You can create a basic Laravel site with user authentication in a matter of minutes. It’s like turning up to build a house, and some kind person has already laid the foundation for you, and even lined up the bricks and mixed the cement, you are ready to build something without all the tedious prep every website requires. They are also structured in such a way (using the MVC paradigm for instance) as to encourage you to write good code.

Framework downsides

The problem with Frameworks now is they are almost too prevalent. The danger here for new web developers is that they don’t learn the core skills needed before jumping into Frameworks. You can’t appreciate how wonderful Laravel’s user authentication scaffolding is until you’ve already spent hours and hours building your own from scratch. It’s like passing your driving test and getting given a Ferrari, rather than learning the ropes in a clapped out Fiesta first.

Another issue is that even for simple sites developers automatically reach for a Framework, when they could probably use basic code instead.

And finally there is the learning curve. They all have them , some worse than others. You have to have a decent knowledge of the core language first, like PHP for Laravel, JavaScript for Vue JS, etc.. before you even start to learn a Framework. And then which one do you go for? For JavaScript there are three popular Frameworks at the moment, React, Angular and Vue, which one to choose?

Conclusion

In the end both Frameworks and CMS systems are there to make the lives of both developers and end user’s easier, which they do, but not without a few catches to be aware of ! Hopefully this short article has made clear the differences between the two.