Chris McDonough
2015-03-18 e3e87ac4fde343683b1475c024de11ab1edcbb74
commit | author | age
04bee5 1 =====================
CM 2  Author Introduction
3 =====================
9ec2d6 4
fd5ae9 5 Welcome to "The :app:`Pyramid` Web Application Framework".  In this
04bee5 6 introduction, I'll describe the audience for this book, I'll describe
CM 7 the book content, I'll provide some context regarding the genesis of
fd5ae9 8 :app:`Pyramid`, and I'll thank some important people.
393a31 9
CM 10 I hope you enjoy both this book and the software it documents.  I've
11 had a blast writing both.
12
c5f24b 13 .. index::
CM 14    single: book audience
15
393a31 16 Audience
04bee5 17 ========
393a31 18
CM 19 This book is aimed primarily at a reader that has the following
20 attributes:
21
22 - At least a moderate amount of :term:`Python` experience.
23
24 - A familiarity with web protocols such as HTTP and CGI.
25
26 If you fit into both of these categories, you're in the direct target
27 audience for this book.  But don't worry, even if you have no
28 experience with Python or the web, both are easy to pick up "on the
29 fly".
30
31 Python is an *excellent* language in which to write applications;
32 becoming productive in Python is almost mind-blowingly easy.  If you
33 already have experience in another language such as Java, Visual
34 Basic, Perl, Ruby, or even C/C++, learning Python will be a snap; it
35 should take you no longer than a couple of days to become modestly
36 productive.  If you don't have previous programming experience, it
37 will be slightly harder, and it will take a little longer, but you'd
38 be hard-pressed to find a better "first language."
39
40 Web technology familiarity is assumed in various places within the
223d4c 41 book.  For example, the book doesn't try to define common web-related
CM 42 concepts like "URL" or "query string."  Likewise, the book describes
43 various interactions in terms of the HTTP protocol, but it does not
44 describe how the HTTP protocol works in detail.  Like any good web
fd5ae9 45 framework, though, :app:`Pyramid` shields you from needing to know
223d4c 46 most of the gory details of web protocols and low-level data
CM 47 structures. As a result, you can usually avoid becoming "blocked"
48 while you read this book even if you don't yet deeply understand web
49 technologies.
9ec2d6 50
04bee5 51 .. index::
CM 52    single: book content overview
ee79c5 53
04bee5 54 Book Content
CM 55 ============
56
b42831 57 This book is divided into three major parts:
04bee5 58
38b33d 59 :ref:`narrative_documentation`
04bee5 60
fd5ae9 61   This is documentation which describes :app:`Pyramid` concepts in
04bee5 62   narrative form, written in a largely conversational tone.  Each
CM 63   narrative documentation chapter describes an isolated
fd5ae9 64   :app:`Pyramid` concept.  You should be able to get useful
04bee5 65   information out of the narrative chapters if you read them
CM 66   out-of-order, or when you need only a reminder about a particular
67   topic while you're developing an application.
68
38b33d 69 :ref:`tutorials`
04bee5 70
bd73fc 71   Each tutorial builds a sample application or implements a set of
CM 72   concepts with a sample; it then describes the application or
73   concepts in terms of the sample.  You should read the tutorials if
fd5ae9 74   you want a guided tour of :app:`Pyramid`.
04bee5 75
38b33d 76 :ref:`api_reference`
04bee5 77
38b33d 78   Comprehensive reference material for every public API exposed by
fd5ae9 79   :app:`Pyramid`.  The API documentation is organized
38b33d 80   alphabetically by module name.
CM 81
3ea7c7 82 .. index::
CM 83    single: repoze.zope2
84    single: Zope 3
85    single: Zope 2
c5f24b 86    single: repoze.bfg genesis
edd915 87    single: pyramid genesis
3ea7c7 88
9ec2d6 89 The Genesis of :mod:`repoze.bfg`
04bee5 90 ================================
edd915 91
fd5ae9 92 Before the end of 2010, :app:`Pyramid` was known as :mod:`repoze.bfg`.
9ec2d6 93
CM 94 I wrote :mod:`repoze.bfg` after many years of writing applications
95 using :term:`Zope`.  Zope provided me with a lot of mileage: it wasn't
1de5ec 96 until almost a decade of successfully creating applications using it
9ec2d6 97 that I decided to write a different web framework.  Although
CM 98 :mod:`repoze.bfg` takes inspiration from a variety of web frameworks,
393a31 99 it owes more of its core design to Zope than any other.
9ec2d6 100
3ea7c7 101 The Repoze "brand" existed before :mod:`repoze.bfg` was created.  One
CM 102 of the first packages developed as part of the Repoze brand was a
103 package named :mod:`repoze.zope2`.  This was a package that allowed
104 Zope 2 applications to run under a :term:`WSGI` server without
105 modification.  Zope 2 did not have reasonable WSGI support at the
106 time.
9ec2d6 107
CM 108 During the development of the :mod:`repoze.zope2` package, I found
109 that replicating the Zope 2 "publisher" -- the machinery that maps
110 URLs to code -- was time-consuming and fiddly.  Zope 2 had evolved
111 over many years, and emulating all of its edge cases was extremely
112 difficult.  I finished the :mod:`repoze.zope2` package, and it
113 emulates the normal Zope 2 publisher pretty well.  But during its
114 development, it became clear that Zope 2 had simply begun to exceed my
115 tolerance for complexity, and I began to look around for simpler
116 options.
117
f5106b 118 I considered using the Zope 3 application server machinery, but it
9ec2d6 119 turned out that it had become more indirect than the Zope 2 machinery
CM 120 it aimed to replace, which didn't fulfill the goal of simplification.
121 I also considered using Django and Pylons, but neither of those
122 frameworks offer much along the axes of traversal, contextual
123 declarative security, or application extensibility; these were
124 features I had become accustomed to as a Zope developer.
125
3ea7c7 126 I decided that in the long term, creating a simpler framework that
CM 127 retained features I had become accustomed to when developing Zope
128 applications was a more reasonable idea than continuing to use any
129 Zope publisher or living with the limitations and unfamiliarities of a
fd5ae9 130 different framework.  The result is what is now :app:`Pyramid`.
9ec2d6 131
fd5ae9 132 The Genesis of :app:`Pyramid`
edd915 133 =============================
CM 134
fd5ae9 135 What was :mod:`repoze.bfg` has become :app:`Pyramid` as the result of
edd915 136 a coalition built between the :term:`Repoze` and :term:`Pylons`
CM 137 community throughout the year 2010.  By merging technology, we're able
138 to reduce duplication of effort, and take advantage of more of each
139 others' technology.
393a31 140
c5f24b 141 .. index::
CM 142    single: Bicking, Ian
143    single: Everitt, Paul
144    single: Seaver, Tres
145    single: Sawyers, Andrew
146    single: Borch, Malthe
147    single: de la Guardia, Carlos
148    single: Brandl, Georg
149    single: Oram, Simon
150    single: Hardwick, Nat
151    single: Fulton, Jim
152    single: Moroz, Tom
153    single: Koym, Todd
154    single: van Rossum, Guido
155    single: Peters, Tim
37bcb7 156    single: Rossi, Chris
2c0f82 157    single: Holth, Daniel
CM 158    single: Hathaway, Shane
394c7b 159    single: Akkerman, Wichert
dade3b 160    single: Laflamme, Blaise
6bc4d5 161    single: Laflamme, Hugues
dade3b 162    single: Bangert, Ben
CM 163    single: Duncan, Casey
164    single: Orr, Mike
1f4f96 165    single: Shipman, John
895859 166    single: Beelby, Chris
88f967 167    single: Paez, Patricio
8c0344 168    single: Merickel, Michael
c5f24b 169
9ec2d6 170 Thanks
04bee5 171 ======
9ec2d6 172
e4ed8f 173 This book is dedicated to my grandmother, who gave me my first
CM 174 typewriter (a Royal), and my mother, who bought me my first computer
175 (a VIC-20).
9ec2d6 176
CM 177 Thanks to the following people for providing expertise, resources, and
178 software.  Without the help of these folks, neither this book nor the
dade3b 179 software which it details would exist: Paul Everitt, Tres Seaver, Andrew
CM 180 Sawyers, Malthe Borch, Carlos de la Guardia, Chris Rossi, Shane Hathaway,
181 Daniel Holth, Wichert Akkerman, Georg Brandl, Blaise Laflamme, Ben Bangert,
88f967 182 Casey Duncan, Hugues Laflamme, Mike Orr, John Shipman, Chris Beelby, Patricio
8c0344 183 Paez, Simon Oram, Nat Hardwick, Ian Bicking, Jim Fulton, Michael Merickel,
CM 184 Tom Moroz of the Open Society Institute, and Todd Koym of Environmental
185 Health Sciences.
9ec2d6 186
c81116 187 Thanks to Guido van Rossum and Tim Peters for Python.
9ec2d6 188
c81116 189 Special thanks to Tricia for putting up with me.