I read through the guidelines and I didn’t see anything against me publishing my submission for Pycon. So I’d like any feedback you might have on this tutorial outline.
I have to ask myself “Who is the target audience?”. A developer with some programming, maybe not Python experience who does web programming. A developer with some basic familiarity with web frameworks, maybe having used rails, Turbogears, Django, or even Pylons before. A developer who uses Pylons but hasn’t really looked at what it can do for them?
I also keep hemming and hawing over the web services the “hard way” section. Why show someone the way not to do it? My argument for it is I find the positive impact of doing it the easy way, with the RESTful controller/routes template to be so much greater when it directly follows the common, home grown style I see all over.
I’ve kept it off the main page, since the proposal is rather long.
Developing (RESTful) Web Services with Pylons
Contact: Wayne Witzel III (wwitzel@acm.org, +1-###-###-####)
Audience: Beginning to intermediate programmers. Familiarity with Python and
basic HTML is assumed.
Format: Interactive lecture. Attendee participation will be encouraged with
try-your-self examples and Q and A
Recording: I give permission to record my tutorial for free distribution.
Requirements: Recommended that attendees bring laptops installed with
Python >= 2.5, Pylons >= 0.9.7, SQLalchemy >= 0.5
Notes
When looking around at different Pylons projects on the web I found a
shocking lack of use of the built-in RESTful controller. In fact, I found
people rolling their own REST-like implementations without realizing it.
RESTful controller templates will be one of the things I will be sure to cover.
Summary
Are you a developer using Python for web services? Are you currently
using some other framework besides Pylons, perhaps no framework at all?
In this tutorial, we will cover using the Pylons web framework for creating your
web services. We will talk about how you can benefit from using a web framework
and cover the features that Pylons and its helpers extend to the developer.
This is an interactive tutorial with lots of hands-on, try it yourself examples
and a start to finish RESTful web service implementation. I will be taking
questions throughout the tutorial.
It is recommended that those attending bring a laptop with Python >= 2.5
and Pylons >= 0.9.7 installed. The tutorial will cover easy_install, but
due to the nature of wireless availability and mirror reliability, it is
highly recommended attendees come with them pre-installed.
Outline: Review
* Introduction: Why a framework? (10 minutes)
Cons of web frameworks
Pros of web frameworks
Why Pylons?
* Getting started: Setting up Pylons (30 minutes)
easy_install, done.
Creating a new project.
The boiler plate: Shouldn't this be done for me?
The ini file: Who uses ini files?
Serving with paster
* First web service (10 minutes)
Creating a controller
Making a simple request.
* ORM: Modeling without clay. (30 minutes)
What is ORM?
SQLalchemy in the house.
SQLalchemy listens to the ini.
Models: Doing ORM in Pylons
Reflection: Photocopying your database.
In practice: Using models in Pylons
* First web service revisited (10 minutes)
Utilize the new model in the request
Make a more advanced request (paging)
* Web Service; the hard way. (20 minutes)
Old-style implementation of web services
POST/GET handling
HTTP argument processing.
if-then-else logic pathing
* RESTful: A quick introduction (10 minutes)
What is RESTful
Why RESTful
* Web Service; the RESTful way. (30 minutes)
Creating a new RESTful controller
Letting routes and Pylons do the heavy lifting (logic path)
Implementing different return types.
* 30 minutes (Q&A, time buffer)
Outline: Website
* Introduction: Why a framework?
* Getting started: Setting up Pylons
* First web service
* ORM: Modeling without clay
* First web service revisited
* Web service: the hard way
* RESTful: A quick introduction
* Web service: the RESTful way
* Q&A
Bio
Wayne Witzel III is a full-time Python programmer working in the insurance sector and
a member of both the ACM and ACCU. Wayne lives in Florida with his wife.
Previous Experience:
* Group presentations at team meetings about Python.
* Corporate presentation in my efforts to migrate from ASP and Windows to Linux and Python.
Leave a Reply
You must be logged in to post a comment.