What is a development framework?
20th September 2012
My answer to What is a development framework? on Quora
The most useful distinction, in my opinion, is to think about the difference between a framework and a library.
A library is code that you can call from your project—a collection of reusable functions for manipulating PDF files, or classes for making OAuth calls, or resizing images for example. You write your code however you like, then call out to the library functions when you need them.
A framework is also reusable code, but it tends to prescribe how you use it. CodeIgniter for example strongly encourages a specific way of organising your code. In a framework, you often find yourself writing classes or functions that will be called by the framework.
Both have their strengths—libraries are great because you can mix and match them, but frameworks can solve much larger problems (like how to effectively code PHP using the MVC design pattern).
I’ve argued in the past that PHP itself is a development framework... it encourages you to organise your web code in files that map to user-facing URLs, provides a mechanism for accessing $_GET and $_POST data, and includes a huge array of web-development-specific functions baked in to the language. This is in comparison to a general purpose programming language like Ruby or Python which can’t easily be used for web development without the addition of a framework such as Django or Rails.
These are certainly not hard and fast definitions—in fact I don’t think widely agreed dictionary definitions of these terms exist. It’s how I tend to think about them though.
More recent articles
- AI for Data Journalism: demonstrating what we can do with this stuff right now - 17th April 2024
- Three major LLM releases in 24 hours (plus weeknotes) - 10th April 2024
- Building files-to-prompt entirely using Claude 3 Opus - 8th April 2024
- Running OCR against PDFs and images directly in your browser - 30th March 2024
- llm cmd undo last git commit - a new plugin for LLM - 26th March 2024
- Building and testing C extensions for SQLite with ChatGPT Code Interpreter - 23rd March 2024
- Claude and ChatGPT for ad-hoc sidequests - 22nd March 2024
- Weeknotes: the aftermath of NICAR - 16th March 2024
- The GPT-4 barrier has finally been broken - 8th March 2024
- Prompt injection and jailbreaking are not the same thing - 5th March 2024