Skip to content

Commit ba66c1e

Browse files
author
Kenneth Reitz
committed
Merge pull request realpython#23 from dcrosta/web-frameworks
Added docs on web frameworks
2 parents 3ccbeaa + a91ca85 commit ba66c1e

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

docs/scenarios/web.rst

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,67 @@ Context
99
WSGI
1010
----
1111

12+
The Web Server Gateway Interface (or "WSGI" for short) is a standard
13+
interface between web servers and Python web application frameworks. By
14+
standardizing behavior and communication between web servers and Python web
15+
frameworks, WSGI makes it possible to write portable Python web code that
16+
can be deployed in any `WSGI-compliant web server <#servers>`_. WSGI is
17+
documented in `PEP-3333 <http://www.python.org/dev/peps/pep-3333/>`_.
18+
1219

1320
Frameworks
1421
::::::::::
1522

23+
Broadly speaking, a web framework is a set of libraries upon which you can
24+
build custom code to implement a web application (i.e. an interactive web
25+
site). Most web frameworks include patterns and utilities to accomplish at
26+
least the following:
27+
28+
URL Routing
29+
Matches an incoming HTTP request to a particular piece of Python code to
30+
be invoked
31+
32+
Request and Response Objects
33+
Encapsulate the information received from or sent to a user's browser
34+
35+
Template Engine
36+
Allows for separating Python code implementing an application's logic from
37+
the HTML (or other) output that it produces
38+
39+
Development Web Server
40+
Runs an HTTP server on development machines to enable rapid development;
41+
often automatically reloads server-side code when files are updated
42+
1643

1744
Django
1845
------
1946

47+
`Django <http://www.djangoproject.com>`_ is a "batteries included" web
48+
application framework. By providing many utilities and patterns out of the
49+
box, Django aims to make it possible to build complex, database-backed web
50+
applications quickly, while encouraging best practices in code written using
51+
it.
52+
53+
Django has a large and active community, and many pre-built `re-usable
54+
modules <http://djangopackages.com/>`_ that can be incorporated into a new
55+
project as-is, or customized to fit your needs.
56+
57+
There are annual Django conferences `in the United States
58+
<http://djangocon.us>`_ and `in Europe <http://djangocon.eu>`_.
59+
2060

2161
Flask
2262
-----
2363

64+
`Flask <http://flask.pocoo.org/>`_ is a "microframework" for Python. Rather
65+
than aiming to provide everything you could possibly need, Flask implements
66+
the most commonly-used core components of a web application framework, like
67+
URL routing, request and response objects, and templates. As a user of
68+
Flask, it is therefore up to you to choose and integrate other components
69+
you may need, such as database access or form generation and validation. For
70+
many popular modules, `Extensions <http://flask.pocoo.org/extensions/>`_ may
71+
already exist to suit your needs.
72+
2473

2574
Pyramid
2675
-------
@@ -39,6 +88,9 @@ Apache + mod_python
3988
Nginx + gunicorn
4089
----------------
4190

91+
Mongrel2 + Brubeck
92+
------------------
93+
4294

4395
Mongrel2 + wsgid
4496
----------------
@@ -58,6 +110,14 @@ There is also a tutorial about deploying Django using this stack: http://daltonm
58110
Hosting
59111
:::::::
60112

113+
Heroku
114+
------
115+
116+
DotCloud
117+
--------
118+
119+
gondor.io
120+
---------
61121

62122
ep.io
63123
-----

0 commit comments

Comments
 (0)