All web applications fundamentally run the same loop on the server:
- read in an HTTP request from a client
- perform some computation based on it
- construct the appropriate HTTP response
- send the response back to the client.
This means that there are a lot of common tasks that don't vary much from application to application. A backend web framework is a library, or collection of libraries, providing functionality useful across many web apps. For instance, many frameworks provide code to perform these common tasks:
- talking to WebServers, to get the HTTP requests and to send the responses
- parsing HTTP requests to extract the parameters the user supplied
- talking to Databases, to store and query information that must be retained from one request to the next
- allowing users to create accounts, log in and out, update their passwords, etc
- generating HTML from your data
- adding cache-expiry tags to generated web pages, so WebBrowsers don't fetch them again needlessly.
People generally use the term "framework" rather than "library" because they generally call your code (in steps 2 and 3 of the loop above) rather than the other way round; this forces you to adapt your thinking to them. Many also impose a preferred structure on the program, such as ModelViewController.
Examples: Django, RubyOnRails, Dancer, Yesod.
Lower level: |
Root node:
|
Higher level: |
Links to this page /
Page history /
Last change to this page
Recent changes /
Edit this page (with sufficient authority)
All pages /
Search /
Change password /
Logout