Why you should use a framework.
Application frameworks are sets or tools on top of a programming language designed to simplify the work of a web developer. If you want to fully understand the term "framework", it is best to take a closer look at the evolution of the tasks of a web developer. In what follows, I will discuss four revolutionary developments that have led to the current use of frameworks. At the end of the article I'll give more information about the difference between a framework and a CMS and which of the two is the most suitable for your website! But first we go back to the end of the last century.
Revolution 1: The rise of PHP
At the beginning of the internet era web developers built websites in HTML, without additional decorations or automations. It was not long before web designers discovered repetitions in development patterns and started looking for ways to simplify their work. This formed the start of the current scripting languages. They started with Perl but this was quickly followed up by PHP and other scripting languages. It is remarkable that PHP is a language that became popular very quickly. The language was originally designed as an advanced template language and later, from PHP 3 you could also write web scripts to automate your site.
The disadvantages of PHP
After the introduction of these web scripts and the possibility of automation, PHP quickly became known as a badly designed language. There is a lot of repetition and as you write more code it becomes very difficult to maintain it, let alone that you can still understand the code you wrote a few years ago. Spaghetti code and a plethora of bad practices were the consequences. This type of code is very difficult to maintain and many web builders learned the wrong techniques to build a website in a good way.
Revolution 2: The beginning of CMS
The repetition within the PHP language inspired smart programmers to build content management systems (CMS). Two things put them to this:
- Patterns always repeat themselves
- The pressure to build websites quickly increased
Freelancers went to work en masse with open source packages such as PHPnuke and PHPbb. This led to many websites of poor quality that were cobbled together within a few hours or days. Of course, these content management systems were useful, but freelancers always faced the same shortcomings. It was almost impossible to perfectly implement the wishes of the customer and so one always had to make concessions. It was a real nightmare to keep track of the constant stream of security updates and version updates. Time for a next revolution!
Revolution 3: The development of CMS
At the beginning of the 21st century, more and more open source CMS applications came online. The three best known applications that are still used today are:
These new CMS applications tried to solve the problems of the previous content management systems with simpler plug-in systems, improved CMS building, faster updates and so on. These systems managed to solve so many of the aforementioned problems and provided programmers with tools to quickly set up a website on the basis of a standard template. However, not all problems of the job were.
The permanent disadvantages of CMS
There are still disadvantages associated with content management systems. It remains a prefabricated system that forces you to think and act through a certain logic when developing your concept. The moment you want to deviate from this logic, the process becomes very labor intensive and you notice that the custom code updates are difficult to maintain. This is due to the high number of security updates and version upgrades as mentioned earlier. CMS is simply not flexible enough for innovative programmers. Programmers must be able to take into account unusual situations and prefer not to lose hours of solving problems that can easily be solved with another method.
Revolution 4: The introduction of frameworks
At the beginning of the 21st century it was already my wish to use a system that would give me maximum freedom in combination with a fixed logic that my colleagues would understand. It was extremely frustrating to always reinvent the wheel for every website, but I did not want to use strange database schemas and difficult to maintain systems. Fortunately I did not appear to be the only programmer with this wish and around 2005 a new revolution started. Thanks to smart developers, a new generation of open source frameworks arose.
CMS or Framework? When do you use what?
Of course CMS are by definition no less suitable for you than a Framework. It all depends on your goal. If you need a standard website, with a homepage, news department, blog, contact page and comments, you can opt for a CMS. The advantage is that these websites are cheaper, because they are simple to make and can be adjusted on the basis of a template.
Do you have specific wishes, however? Do you want to add specific functionality to your website with certain data connections, import / export of data or use of API? Then you are better off with a framework. It will save you many hours of work and problems in the short and long term.
Do you not use a framework for a regular website?
It may sound strange to you but for a simple website you also use a framework of course! The CMS that you use is also built up through a framework. However, with a CMS you can not build a framework. In simple language this means that you could build Wordpress with Django, but that you can not build Django with a standard Wordpress theme. Code-on often uses Django-cms for customers without special requirements. The advantage is that in addition to the CMS you can still use the advantages of the framework.
Our advice? Use a framework!
The conclusion of this article is as ready as a lump. I advise everyone to use a framework for all online projects. This form of development is the most modern and ensures the highest quality. You can, of course, opt for content management systems such as Drupal or Wordpress for simple assignments, but if you want to develop a platform, a new social network or a new application with specific functionality, always choose a framework.
Code-on is the market leader in the use of Django in Flanders and we are happy to help you with your next project. Feel free to contact us to discuss the different options.