We will cover just enough networking and HTTP to build a simple working server.
You will finish this tutorial with a 100 line HTTP server and completely
understand it. We'll be working in Python, but this content transcends language
and is useful in nearly every language and OS. This will be a hands-on tutorial
with three labs.
Modern web frameworks hide most of the messy details of web programming and
present a powerful abstration for us to work with. Unfortunately, they often hide the
simplicity of HTTP itself. If you're new to web programming, or have only
used frameworks, it is hard to see exactly what an HTTP header is, or how an
HTTP verb is specified on the wire. In this tutorial, we're going to start at
the bottom, and work our way up to the HTTP fundamentals common to all web
frameworks. As complex as web programming can be, we'll see that HTTP is clear
We will look at basic TCP/IP, the socket abstraction, request/response
protocols, HTTP verbs, and HTTP headers. Each of these is a topic worthy of in
depth study itself... but we're going to skim them all, taking just what we need
to build a working HTTP server.
- Comfortability with some programming language: variables, string manipulation, for loops and function calls.
- You will need a laptop with Python 2.x installed. (2.7 recommended).
- It will be convenient to have either GIT or SVN installed.
Brian Dorsey is a database and Python developer with over 10 years of
experience using Python professionaly. He currently works full time, developing
command line tools, simple web applications, Windows services, HTTP/JSON APIs
and the occasional iPhone prototype. He is excited about information,
databases, user experience, testing and glue code. Brian is a co-organizer of
the Seattle Python Interest Group (www.seapig.org) and has given several talks
and tutorials at conferences, user groups and taught Python at the University
of Washington, in Seattle.
He is an enthusiastic teacher and a bit obsessed with this stuff. You will have fun and learn a lot.