What is a framework?

Published on 03 June 2019

Reading time 9 minutes

When you start programming, you discover HTML, CSS, PHP, JavaScript... But quickly, you also hear about Symfony, Spring, Laravel, Angular... These are not programming languages, but frameworks. In this article, we'll discover what a framework is!

How can we define a "framework?"

Framework definition

Modern-day toolbox, a software framework allows developers to be more efficient in the design of web applications by offering a ready-to-use and reusable architecture and software components to use with them.

You might compare a framework to a car factory. The car would be the final product, and the framework would be the factory. In this factory, we already have everything we need in stock: the robots, the workstations, and all the parts, like the steering wheel and the doors. Among these components, we come and get the ones we need to reuse them.

Once this basic application or "skeleton" has been produced, other developers no longer need to reinvent everything for each new project. One way to do this is to look at the DRY concept: Don't Repeat Yourself. DRY is a philosophy in computer programming consisting of avoiding code redundancy within an application in order to facilitate maintenance, testing, debugging and evolutions of the latter.

In many cases, frameworks are generally designed by a community of developers. They work by programming language and allow the development of all types of media: a mobile app, a desktop software, a web platform (from a web page to an entire website), video games, etc. That said, you can also create your own framework.

Frameworks have different parts. For example, there are authentication, database management, display, or user interaction tools.

You have to keep in mind that a framework meets a specific need. To choose the one that suits you best, you have to define your needs efficiently beforehand.

Why use a framework?

What are the advantages of a framework?

Save time

Frameworks save time! Indeed, they help the developer avoid having to develop everything from scratch, i.e., rewrite or reinvent each line of code (DRY concept). Thanks to frameworks, developers can focus on the realization of specific functionalities for their project rather than spending time on recurring chores for each project such as the architecture, the basic security of the application, etc.

Have a clear and organized work environment

A framework provides an optimized file and folder hierarchy. Thanks to this file separation and classification, the interface becomes clearer and easier to use—for those who know how to use it. If the guidelines of the framework are followed, a coherent code structure and unity is achieved, thereby improving its quality.

Be more efficient and optimize teamwork

A software framework provides various formalized architectures according to the needs for which it is used. Team development is thus facilitated, and the distribution of tasks within the same team is simpler since each person has his or her own work "zone."   

Moreover, when programmers arrive in teams working on frameworks they've already mastered, they'll find their bearings more easily and quickly. Think of a vehicle. The initial difficulty is learning to drive, but once you're past that hump, going from one vehicle to another is a breeze. The same goes for frameworks: once you know how to handle one, moving from one application based on this framework to another is simplified because the architecture is essentially the same.

Ensure optimal maintenance and evolution

As a framework is developed by a community of developers, or sometimes by private organizations, its maintenance and evolution are more optimal, and updates are more frequent.

By using a framework, you don't really have to worry about the latest web standards, new compatibility between services, and such. The community takes care of "everything," updating the tool itself. Developers then benefit from these updates, so there's much less to worry about for the web development team, which in turn can devote gained time in search of added value and the development of the project itself.

Boost and optimize security

Most of the time, the framework covers and prevents a large number of the security flaws that might be encountered during application design.
However, this doesn't prevent developers from intervening and optimizing the security and performance of their application as needed by adding features predefined by the framework.

An "infinite" user community

You are rarely alone in using a specific framework. If you encounter a bug or other problem—or if you have specific questions—the user community is there to help you. An efficient search on Stack Overflow (among others), and the solution will probably appear right in front of you.

To give you an idea, Symfony or React are frameworks used by more than a million developers, so many people who will be able to help you if you get stuck.

What drawbacks does using a software framework have?

Different learning curves

Mastering a framework can take time, and it isn't easy at all! However, each framework has its own learning curve: some allow the developer to get up to speed quickly while others require a longer learning curve.

Knowledge of general concepts required

In order to understand and correctly interpret the basic principles of frameworks and make judicious technical choices, it's essential to master at least the general concepts of internal functioning, understand good practices and, of course, have accurate knowledge of the language and programming concepts the framework relies on.

Limitations on complex functionalities

As the name suggests, a framework is a framework. There are therefore certain limits to its use, for example: a software framework often imposes its own choices on us in terms of the architecture of our code. When programmers want to access features of the language that are not managed by the framework, they may encounter difficulties. The advice we can give to a developer who wants to use a framework is to let the framework guide him or her.

They are too tempting!

They give us the impression that everything is simpler thanks to them, but nothing could be further from the truth! A framework imposes a heavy and complex architecture on applications, and sometimes when they don't need that.

Whatever it is, each framework answers precise and advanced needs! It's impractical to drive a Ferrari to buy bread at the end of the block each day; you risk damaging it more than anything else. The same goes for framework: if you want to make a static site with a few pages, it will complicate your task more than it will simplify it. Basic HTML/CSS and JS technologies will be enough!

Keep one thing in mind: before you start developing via frameworks, define your needs effectively in order to establish a real need for the use of a specific framework.


What different types of frameworks exist?

A few examples of frameworks:

First of all, it's important to know that frameworks are not in competition with one another! Remember what we said above: each of them meets a specific need.

In PHP, two stand out: Symfony and Laravel

Symfony, launched in 2005 by Fabien Potencier and now maintained by SensioLabs. Although it's mostly used by French speakers, its use is also expanded to other countries as it is a world-renowned framework. Discover the many applications that use or rely on the Symfony project.

Laravel, launched in 2011 by Taylor Otwell, is one of the most used frameworks in the world. A little anecdote: some parts of Laravel are based on Symfony.

To learn more about PHP frameworks, click here!

In JS: NodeJs, VueJs, Angular and React

We can mention NodeJs, Angular, or React. I hear some grumbling already, but read to the end before you decide!

  • NodeJs, with its high performance and usability in many situations, has allowed great advances in the world of JavaScript. Founded in 2009 by Ryan Dahl, it broke down the wall between the front end and the back end. It is he who made it possible to build back-end applications in JavaScript. NodeJs helps companies to create scalable applications that can handle simultaneous high-speed connections. For example, companies like Google or PayPal use NodeJs on some parts of their applications.
  • VueJs, created by Evan You in 2014, is a scalable JavaScript-based framework with a component-oriented approach. It's typically used for the front end. It has a gradual learning curve, which makes it "easy" to pick up. Its high performance and lightweight (30 kb) make it one of the fastest JavaScript frameworks. We can cite some sites that use VueJs: Adobe, Alibaba, or Nintendo.
  • Angular is the official front-end framework developed by Google. Born in 2016, it offers out-of-the-box solutions and allows you to create components in JavaScript. It's a very good framework for developing highly interactive web applications. Component-oriented, it provides you with a solid code base. However, it has a certain complexity in its learning curve, and the development of an application under Angular necessarily involves its use from A to Z. It is not possible to change the framework in the meantime. You'll also have to go through the TypeScript step to use Angular!
  • React is not a framework, which is why I may have overheard some grumbling earlier. Instead, it's referred to as a "front-end library." Born in 2013 and developed by Facebook, it has a large and free open source community (which relies on collaborative and decentralized work methods). Despite its relatively fast learning curve, its long-term use is slightly more complex. Being in front of a library, React provides reusable components, but is free from any software architecture.

You don't get something for nothing! Development is exciting and accessible to all, and some frameworks are simple to use at the beginning, but become complex as the application grows. On the contrary, others require a longer learning curve, but become more manageable long-term, once the app is up and running. In short, you should choose methods based on each project and your own skills.

Regardless, using a framework requires knowledge of the language in which it's developed. To use Symfony, Laravel and many others, you'll need to be comfortable with PHP and OOP (Object Oriented Programming). As for React, Angular or NodeJS, prior knowledge of JavaScript is a must.

Finally, there are many other web development frameworks—enough to satisfy all your desire to learn!

If you're interested in web development, discover the job of a web developer on our dedicated webpage, or take our free and online intro to coding!

And if you have any questions, don't hesitate to contact me personally on my LinkedIn account!