I am guilty! After publicly complaining about the existence of too many
Python based web frameworks, after praising the merits of Django, Pylons,
TurboGears, CherryPy, and web.py, after having used them professionally
and taught them in University level courses, I could not resist and created one
more: web2py.
Why did I commit such a crime? I did it because I felt trapped by existing
choices and tempted by the beautiful features of the Python language. It all
started with the need to convince my father to move away from Visual Basic
and embrace Python as a development language for the Web. At the same
time I was teaching a course on Python and Django at DePaul University.
These two experiences made me realize how the beautiful features of those
systems were hidden behind a steep learning curve. At the University for
example we teach introductory programming using languages like Java and
C++ but we do not get into networking issues until later courses. In many
Universities students can graduate in Computer Science without ever seeing
a Unix Bash Shell or editing an Apache configuration file. And yet these
days to be an effective web developer youmust know shell scripting, Apache,
SQL, HTML, CSS, JavaScript, and Ajax. Knowing how to program in one language is not enough to understand the intricacy and subtleties of the APIs
exposed by the existing frameworks. Not to mention security.
Web2py started with the goal to drastically reduce the learning curve,
incorporating everything needed into a single tool that is accessible via the
web browser, collapsing the API to a minimum (only 12 core objects and
functions), delegating all the security issues to the framework, and forcing
developers to follow modern software engineering practices.
Most of the development work was done in the summer of 2007 while I
was on vacation. Since web2py was released many people have contributed
by submitting patches to fix bugs and to add features. web2py has evolved
steadily since and yet it never broke backward compatibility. In fact,web2py
has a topdown
design vs the bottomup
design of other frameworks. It is
not built by adding layer upon layer. It is built from the user perspective
and it has been constantly optimized inside in order to become faster and
leaner, while always keeping backward compatibility. I am happy to say that
today web2py is one of the fastest web frameworks and also one of the
the smallest (the core libraries including the Database Abstraction Layer, the
template language, and all the helpers amounts to about 300KB, the entire
source code including sample applications and images amounts to less than
2.0MB).
Yes, I am guilty, but so are the growing number of users and contributors.
Nevertheless, I feel, I am no more guilty than the creators of the other
frameworks I have mentioned.
Finally, I would like to point out, I have already paid a price for my crime,
since I have been condemned to spendmy 2008 summer vacation writing this
book and my 2009 summer vacations revising it.
This second edition describes many features added after the release of the
first edition, including CRUD, Access Control, and Services.
I hope you, dear reader, understand I have done it for you: to free you from
current web programming difficulties, and to allow you to express yourself
more and better on the Web.