What Is a Web Framework and Why Would I Want to Use One?

Back at the dawn of time (1996–1998), dynamic web sites were coded strictly through the use of the Common Gateway Interface, or CGI. Most sites used simple form-driven methods of retrieving user input, had ad-hoc implementations of features because best practices had not been established, and only supported a minimal amount of reuse or extensibility.

Eventually the web increased in popularity and become accountable for an increasing amount of mission-critical and financial data. Stability, code reuse, and standardization of practices became imperative. Early attempts to unify code libraries resulted in the first wave of web frameworks, which provided convenience methods for common features and streamlined deployment and other kinds of overhead. The use of scripting languages like Perl lost favor, as developers grappled with idiosyncratic legacy code, riddled with security holes, that was often written by non-programmers. "Real" web programming was done with industry-backed languages like Java™ and C#, employing deep layers of abstraction over HTTP. The idea that a "framework" could provide stable APIs and a common language across web products became established practice, especially in the Java community with the introduction of J2EE and web servlets.

By the mid-2000s, many developers thought the pendulum had swung too far to the other side. Heavyweight frameworks that required dozens of configuration files were the norm. Outside ...

Get Next-Generation Web Frameworks in Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.