Saturday, November 27, 2010

A Python Webframework for teaching

I'm on the hunt for a Python webframework that I can use to teach web development. The candidates in order of my bias are:
  • Plone
  • Pyramid
  • Pinax/Django
  • Flask
  • Web2py
In general I'm looking for a framework that will reduce distraction and keep newbies focused on the task of web application development. The non-exhaustive criteria are as follows:
  1. Fast iterations - This means make and view changes quickly. In my experience, people learn more effectively if they can see the result of their changes quickly (as close to instantly as possible).
  2. Minimal deployment requirements - I measure this based on expense, initial setup time, deploy/develop cycle.
  3. Minimal context switching - If they can do all their development in one space this will be a good thing.
Other nice to haves:
  • A framework that takes up minimal space. In other words 2MB is better than 20MB, this become especially important if we are providing a local deployment server and we have a class of 30 or more students. Or if we want to take advantage of a free hosting account.
The things that don't matter:
  • Best of class security ()
  • Solves all problems known to man
My Current Perspective

Plone. While I think that Plone is an excellent platform and provides lots of useful application "infrastructure", I don't think it is the best solution for teaching beginners web development. So I've more or less scratched Plone from the list. Besides, Plone is primarily an application and secondarily a framework (I'm sure we can argue about this distinction).

Pyramid. I'm mostly impressed and for web application development (non-content management problems), it's probably where I'm headed. Pyramid is pretty powerful, I've spent some time with it and I definitely see it in my future. That said, I've decided against it because it's too large to run on super cheap/weak shared hosting because of space.

All the solutions, except Plone, claim to run on Google App Engine, that provides a cost effective option for application deployment. At this point I'm strongly leaning to Web2py because the setup and deployment experience appears to be the simplest and the data abstraction layer (DAL) is attractive for portability.

Stop me if you have some convincing arguments regarding alternatives for a 12 week, 36 hour course.

2 comments:

Max said...

I have been teaching a 10weeks course based on web2py for three years. I have documentation about other professors who used web2py as well. I have a tool to allow students submit web2py projects and deploy automatically for grading. Please email me personally if you want to share experience and material.

Unknown said...

Hey David -

I am also teaching python-based end-to-end web development (albeit 3-4 years after you have been) and I'd love to chat with you about your experience. Shoot me an email and I'd love to get in touch ASAP.

Thanks!
Michele

Sign up for my upcoming Plone 5 Book & Video tutorials

plone 5 for newbies book and videos