Upload
shawn-rider
View
1.954
Download
0
Embed Size (px)
DESCRIPTION
This talk details the history of the PBS TeacherLine website, the first Django project launched to production at PBS in 2007. It discusses the challenges, successes, and failures of maintaining the site.
Citation preview
Teaching an Old Pony New Tricks:Maintaining and Updating an Aging Django Project
DjangoCon 2010
Shawn Rider
PBS Education
What is TeacherLine?
The Rebuild Challenge
In 2006 the TeacherLine sites were powered by Cold Fusion.
A complete rebuild was needed.
The Rebuild Challenge
Several technologies were considered:
•Ruby / Rails
•PHP / Some PHP Framework
•Python / Django
The Rebuild Challenge
Things About Django That Made Us Happy
• Speed of Development
• Code Quality
• Modularity of Framework
• Django Admin
• Active Community
• Python!
Things People Said About Django That Hurt Our Feelings
Beta frameworks are not
“enterprise ready”!
Django won’t last; the project will die!
Nobody around here knows Python!
TeacherLine Rises Again
Over 4 months, 2 developers built the new TeacherLine site.
It launched December 12, 2007
TeacherLine Rises Again
Features in relaunch:• Course Catalog
• CMS for localized content
• Staff Admin
• Support Ticketing System
• Robust Permissions/Roles System
• Profiles
• Graduate Credit Management System
• eCommerce
• API for Remote Integration
Features Added Since the Relaunch
• Message Queue
• Named URLs
• Test Suite
• New File Storage Backend
• Virtual Environment Project Structure
• Robust Visual Reports
Major Apps Added Since the Relaunch
• Facilitator Scheduling Tool
• Capstones Course Tools
Deployment Changes Since the Relaunch
• Adopted Virtual Environments
• Moved from traditional to cloud hosting
Things That Worked for Us
Django is opinionated in a generally good way.
Things That Worked for Us
A culture of self-criticism.
Things That Worked for Us
Isolate functionality into reusable components.
Things That Worked for Us
Always use URL tags in templates.
Things That Worked for Us
Our multi-deployment configuration solution turned out to be a good idea.
Mistakes We Made
Never override the User model.
Mistakes We Made
Make tests right away.
Mistakes We Made
Never underestimate the Admin.
Mistakes We Made
Manipulators made us shy to fully leverage Forms.
Things Are Getting Better
• Continuous ORM Improvements
• Django Forms are now awesome
• Enhanced security protections
• Authorization backends
Upgrading the Framework
To take advantage of framework upgrades, you must schedule the work in your project.
Upgrading the Framework
Sell the upgrade to the Uppers:
• It will lower the cost of future development
• It will alleviate a pain point felt by staff processes
Upgrading the Framework
Facilitate the work:
• Make the most of your VCS
• Use tests
• Take your time
Things We’d Like to Improve
• Remote API
• Adopt Haystack/SOLR instead of Djapian/Xapian
• Email backends
• DB master/slave and sharding
• Leverage Django Admin features better
Ponies We Still Want
• Multi-configuration support out-of-the-box
• A better way to know when Django’s modules are completely loaded into memory
• More robust event handling (Signals++)
Thanks & Kudos
The Django ProjectThe core devs and all the contributors.
The Django CommunityEveryone developing Django apps and community sites.
The current TeacherLine team: Nowell Strite (@nowells), Tareque Hossain (@tarequeh), Ron Cox (@monkyhead), Sam Deng (@samdeng)