Definition
A framework is a set of pre-written, tested building blocks of code, with rules for putting them together. The developer only writes what is specific to your project.
An analogy
Building without a framework is like making kitchen cabinets plank by plank. With a framework, you start from standard units that are sturdy and compatible, and you choose the doors. It is faster, but you have to respect the manufacturer’s dimensions.
Example: a sign-up form has to check the fields (valid e-mail address, required boxes), block bots, save the answers and send a confirmation e-mail. A framework provides most of these blocks: the team focuses on the questions to ask and on what happens after sign-up.
A few names
- In the browser (what visitors see): React, Vue, Svelte.
- On the server (data, accounts, rules): Symfony and Laravel in PHP, Django in Python.
- Both at once: Next.js, Nuxt.
WordPress is not a framework but a CMS (content management system): a ready-to-fill website that you extend with plugins.
Benefits and trade-offs
- Benefits: time saved, organised code, easier for another developer to take over.
- Trade-offs: updates to follow, rules to learn, third-party components to monitor.
- A framework alone does not make a website secure or fast: it all depends on how it is used.
Do you need a framework?
For a showcase website of a few pages, HTML, CSS and JavaScript are enough: fewer updates and a lighter website. For an application with accounts, bookings or payments, a framework saves time. The right choice depends on the project, not on fashion.