Supplementary Course Readings

Web programming is a deep pool. There’s more to cover than a 10-session course could ever hope to accomplish. To that end, I’ve compiled a list of related readings that will support the information you’ll learn in class. Think of this as supplemental materials. You can read it at your leisure to help increase both the depth and breadth of your knowledge.

The readings are organized like the class, by session and topic.

Session 1 - TCP/IP and Sockets

If you want to know a bit more about the lower layers of the stack, you might find the following readings enlightening:

Transport Layer

Internet Layer

Link Layer

In addition, you may find it interesting to take a look at ZeroMQ, a next-generation implementation of the socket concept built with parallel and networked computing in mind:

Session 2 - Web Protocols

Python offers a number of external libraries that offer extended support for covered web protocols, or support for protocols not covered in the Standard Library:

  • httplib2 - A comprehensive HTTP client library that supports many features left out of other HTTP libraries.
  • requests - ”... an Apache2 Licensed HTTP library, written in Python, for human beings.”
  • paramiko - “a module for python 2.5 or greater that implements the SSH2 protocol for secure (encrypted and authenticated) connections to remote machines”

For a historical perspective on how protocols can change (as well as how they remain unchanged) over time, skim these specifications for HTTP and SMTP:

Session 3 - CGI and WSGI

For alternative introductions to WSGI, try these two sources. They are a bit more minimal and may be easier to comprehend off the bat.

Session 4 - APIs and Mashups

Python offers a number of solid external libraries to support Web Services, both from the side of production and consumption:

  • BeautifulSoup - “You didn’t write that awful page. You’re just trying to get some data out of it. Right now, you don’t really care what HTML is supposed to look like. Neither does this parser.”
  • requests - HTTP for humans
  • httplib2 - A comprehensive HTTP client library that supports many features left out of other HTTP libraries.
  • rpclib - a simple, easily extendible soap library that provides several useful tools for creating, publishing and consuming soap web services
  • Suds - a lightweight SOAP python client for consuming Web Services.
  • restkit - an HTTP resource kit for Python. It allows you to easily access to HTTP resource and build objects around it.

Session 5 - MVC Applications and Data Persistence

As we’ll be learning about Pyramid over the next three sessions, please take some time to read and digest some of the copious documentation for thie powerful framework.

In particular, to cover the topics we address in this session you’ll want to read the following:

You may also wish to read a bit about SQLAlchemy. In particular you may want to work through the Object Relational Tutorial to get a more complete understanding of how the SQLAlchemy ORM works.

Session 6 - Pyramid Views, Renderers and Forms

This week we’ll be focusing on the connection of an HTTP request to the code that handles that request using URL Dispatch. Quite a lot is possible with the Pyramid route system. You may wish to read a bit more about it in one of the following documentation sections:

In Pyramid, the code that handles requests is called a view.

A view passes data to a renderer, which is responsible for turning the data into a response to send back.

Getting information from a client to the server is generally handled by HTML forms. Working with forms in a framework like Pyramid can be facilitated by using a form library like WTForms.

For layout and design, CSS will be your tool of choice. There is no better tool for learning CSS than trying things out, but you need a good reference to get started. You can learn a great deal from the Mozilla Developer Network CSS pages. I also find A List Apart and Smashing Magazine to be fantastic resources.

Sesstion 7 - Pyramid Authentication and Deployment

There are no special readings associated with this week.

Sessions 8, 9, & 10 - Django

Though it’s way too much to read in any one sitting (or even in 10 or 20), the Django documentation is excellent and thorough. As a start, take a look at these sections:

  • Django at a Glance - introduction to the concepts and execution of Django
  • Quick Install Guide - lightweight instructions on installing Django. Use Python 2.7.
  • Django Tutorial - The tutorial covers many of the same concepts we will in class. Go over it to re-enforce the lessons you learn
  • Using Django - far more in-depth information about core topics in Django. In particular, the installation instructions here can be helpful when you run into trouble.

Bookmark the Django Documentation homepage. It really is “everything you need to know about Django”

When you have some time, read Django Design Philosophies - for some well-considered words on why Django is the way it is.

Conversely, for some well-considered criticisms of Django and the way it is, read this in-depth comparison of SQLAlchemy and the Django ORM by the creator of Flask: SQLAlchemy and You

Or consider viewing this video of a talk given at DjangoCon 2012 by Chris McDonough, one of the driving forces behind the Pyramid framework.