Pylons Project MiniCon

Last Friday (April 29, 2011) I had the privilege of giving a presentation at the Pylons Project Mini Conference in downtown San Francisco, organized by Whit Morriss from Survey Monkey. The event was a resounding success, especially given that it was put together in all of 2 weeks. The program was strong, featuring talks by Ben Bangert (founder of the Pylons Project) and Chris McDonough (author of the Pyramid web framework, the current centerpiece of Pylons Project software), as well as a number of other Bay Area Python luminaries.

Pylons and Pyramid was at the center of things, but was far from the only focus. In fact, of the 7 pre-scheduled presentations, only 3 (Ben's, Chris's, and mine) were explicitly Pylons-related; the rest touched on topics of general interest to the Python web-dev community such as continuous integration, writing code that is portable across different Python interpreters, and behavior driven development. It was a great time, educational and fun, and it was I think quite valuable in generating more cohesion for the Bay Area Pylons community. My thanks go to all of the speakers and sponsors, but especially to Whit, who planted a seed for the idea at PyCon and put in many hours to see it through to fruition.

The Mini Conf was followed up by two days of sprinting, which I unfortunately was not able to attend. There will also be a similar event held in New York on ...
More...


Much Ado About Traversal

Introduction

With the announcement and initial alpha releases of Pyramid, a lot of folks who have been using Pylons (and, therefore, Routes-based URL matching) are being exposed for the first time to "traversal" and "view lookup", which together provide an alternate mechanism for routing incoming HTTP requests to callable code. This has caused a bit of grumbling and muttering. Some think that traversal is hard to understand. Others question its usefulness; URL matching has worked for them so far, why should they have to deal with another approach, one which doesn't fit their brain and which doesn't provide any immediately obvious value?

This article is an attempt to counter these opinions. Traversal and view lookup ARE useful. There are some straightforward, real-world use cases that are much more easily served by a traversal-based approach than by a pattern-matching mechanism. Even if you haven't yet hit one of these use cases yourself, understanding these new ideas is worth the effort for any professional web developer so you know when you might want to use them. Especially because (WARNING: Bold Assertion Ahead) these ideas are not particularly hard to understand. In fact, traversal is a straightforward metaphor easily comprehended by anyone who's ever used a run-of-the-mill file system with folders and files.

URL Matching

Let's take a step back. The problem we're trying to solve is straightforward. We have an HTTP request for a particular path that has been routed to our web application. The ...
More...