a platform for rapidly
developing websites
James Tauber


                         PyCon 2009
PyCon 2009
Pinax provides what many
 sites have in common so
  you can focus on what
 makes your site different
pi in hex
def pi():
    N = 0
    n, d = 0, 1
    while True:
        xn = (120*N**2 + 151*N + 47)
        xd = (512*N**4 + 1024*N**...
Your Site
Your Site
            Django



 Python      Python
why layer?
portability of higher layers
reusability of lower layers
productivity through
compromise
We read Knuth so you don't
have to.
           — Tim Peters
idea   realisation
Quisition
            • currently has:
              • signup, login, password
                management
              • ...
Hot Club of France

      reusable apps

     app conventions
Potter Predictions
               • send invitations
               • connect to friends
               • make comments on...
Tabula Rasa
          reusable apps

         app conventions


                +
  starting point for new projects

scaff...
• django-friends
• django-notification
• django-mailer
• django-email-confirmation
pianx
pinakes
pancakes
IHOP
NHØP
Django
If you want to build a ship, don’t drum up the men to
        gather wood, divide the work and give orders.
Instead, teach...
Let’s Build a
Social Networking Site
{ n | available(“cloud<n>.com”), n < 30 }
                      =
              { 14, 26, 27, 28 }
collection of reusable apps

  conventions for reusable apps

  starting point for new projects

scaffolding for developin...
Your Project
Your Project
                  Pinax



  Django         Django




  Python         Python
•   AuthX (AuthN + AuthZ)

Modern Web Infrastructure                                       ◦ Capabilities
                ...
What seems the biggest shame to me is that everyone is
currently rebuilding this stuff over and over again and rationalizi...
Your Project
               the trade off:
   Pinax
               how much to fix?
               how much to make configur...
Pinax IS Django
Features in 0.5
•   openid support                                 • interest groups
                                     ...
0.5 Structure
  •   external apps
  •   local apps
  •   libraries
  •   two sample projects
  •   path hacking
External apps
 •   all on Google Code Project Hosting
 •   use of svn:externals
 •   half were written independently of Pi...
Libraries
 • batteries included
 • except for PIL
 • makes for a huge checkout
Sites Using Pinax
•   cloud27.com            •   badlist.co.uk
•   foodsel.com            •   goodlist.co.uk
•   trailmapp...
0.7 Release
•   open micro-blogging
•   schedules
•   locations
•   page-cms
•   account and group improvements
•   uni-fo...
New Account App
 • turn OpenID on/off
 • turn sign up on/off
 • waiting list
 • invite only / private beta
 • token-based ...
you signed up for       admin initiated           each user has fixed        user can invite
       beta                acc...
New Group App
 • Don’t Repeat Yourself!
 • endo vs exo
 • membership app
Endo Approach
(framework-like)
Exo Approach
(library approach)
Shared Templates and Media
 • look up:
  • project
  • pinax             new level
  • app
 • media build command
 • ship ...
Problems with 0.5 structure
 • it largely relies on external dependencies
   being in svn and this is increasingly not the...
virtualenv and pip
 • encourage externals apps to be distutils-
   compliant
 • pip for package install (at least during
 ...
Pinax is NOT just for
   social networks
site
       site
              site
                     site
                              site
                         ...
site
       site
              site
                     site
                              site
                         ...
Editions

 •   social networking
 •   intranet
 •   learning management
 •   e-commerce
 •   clubs and associations
 •   c...
http://pinaxproject.com/
Pinax - A platform for rapidly developing websites
Pinax - A platform for rapidly developing websites
Pinax - A platform for rapidly developing websites
Upcoming SlideShare
Loading in …5
×

Pinax - A platform for rapidly developing websites

2,744 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,744
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
65
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Pinax - A platform for rapidly developing websites

  1. 1. a platform for rapidly developing websites James Tauber PyCon 2009
  2. 2. PyCon 2009
  3. 3. Pinax provides what many sites have in common so you can focus on what makes your site different
  4. 4. pi in hex
  5. 5. def pi(): N = 0 n, d = 0, 1 while True: xn = (120*N**2 + 151*N + 47) xd = (512*N**4 + 1024*N**3 + 712*N**2 + 194*N + 15) n = ((16 * n * xd) + (xn * d)) % (d * xd) d *= xd yield 16 * n // d N += 1
  6. 6. Your Site Your Site Django Python Python
  7. 7. why layer?
  8. 8. portability of higher layers
  9. 9. reusability of lower layers
  10. 10. productivity through compromise
  11. 11. We read Knuth so you don't have to. — Tim Peters
  12. 12. idea realisation
  13. 13. Quisition • currently has: • signup, login, password management • announcements • deck searching and sort • want to add: • user profiles • rating, tagging and commenting on decks • groups, friendships • membership levels • notifications • OpenID
  14. 14. Hot Club of France reusable apps app conventions
  15. 15. Potter Predictions • send invitations • connect to friends • make comments on predictions • tag prediction • mass mailout to users
  16. 16. Tabula Rasa reusable apps app conventions + starting point for new projects scaffolding for developing new apps
  17. 17. • django-friends • django-notification • django-mailer • django-email-confirmation
  18. 18. pianx
  19. 19. pinakes
  20. 20. pancakes
  21. 21. IHOP
  22. 22. NHØP
  23. 23. Django
  24. 24. If you want to build a ship, don’t drum up the men to gather wood, divide the work and give orders. Instead, teach them to yearn for the vast and endless sea. – Antoine de Saint-Exupéry
  25. 25. Let’s Build a Social Networking Site
  26. 26. { n | available(“cloud<n>.com”), n < 30 } = { 14, 26, 27, 28 }
  27. 27. collection of reusable apps conventions for reusable apps starting point for new projects scaffolding for developing new apps + a platform for website development
  28. 28. Your Project Your Project Pinax Django Django Python Python
  29. 29. • AuthX (AuthN + AuthZ) Modern Web Infrastructure ◦ Capabilities ◦ Multifactor Auth ◦ Rate Limiting ◦ Signup ◦ OpenID ◦ OAuth ◦ External import • API Metering • Groups • Backups & Snapshots • Invites • Counters • Lists • Cloud/Cluster Management Tools • Notifications ◦ Instrumentation/Monitoring (Ganglia, Nagios) ◦ Spam filtering ◦ Failover ◦ Multi-protocol routing ◦ Node addition/removal and hashing ◦ Fine-grained controls/rules ◦ Autoscaling for cloud resources • Presence • CSRF/XSS Protection • Social Activity Log (Newsfeed) • Data Retention/Archival ◦ Filtering • Deployment Tools • Social Model ◦ Multiple Devs, Staging, Prod ◦ Connectivity (uni/bidi) ◦ Data model upgrades ◦ Privacy (private, reciprocal, public) ◦ Rolling deployments ◦ Views ◦ Multiple versions (selective beta) ◦ Traversal ◦ Bucket Testing • Social Object ◦ Rollbacks ◦ Privacy, Social Scoping ◦ CDN Management ◦ Voting • Distributed File Storage ◦ Sharing • Distributed Log storage, analysis ◦ Publishing • Graphing ◦ Comments • HTTP Caching ◦ Favoriting • Input/Output Filtering ◦ Social editing • Memory Caching ◦ Permissions • Non-relational Key Stores • Tagging • Rate Limiting ◦ Combinations • Relational Storage ◦ Relatedness • Queues • User • Rate Limiting ◦ Achievements/Awards • Real-time messaging (XMPP) ◦ Activity Log • Search ◦ External User ID Mapping ◦ Ranging ◦ Permissions (see AuthX) ◦ Geo ◦ Deletion/Archival • Sharding ◦ Flagging • Smart Caching ◦ Direct Messaging ◦ dirty-table management ◦ User Cards
  30. 30. What seems the biggest shame to me is that everyone is currently rebuilding this stuff over and over again and rationalizing it as some sort of secret sauce competitive advantage when it’s really infrastructure - stuff that really should be standardized so you can actually get around to doing the new and interesting stuff. — Leonard Lin http://randomfoo.net/2009/01/28/infrastructure-for-modern-web-sites
  31. 31. Your Project the trade off: Pinax how much to fix? how much to make configurable? how much to leave Django completely to site developer?
  32. 32. Pinax IS Django
  33. 33. Features in 0.5 • openid support • interest groups (called tr ibes) • email ver ification • password management • projects with basic task and issue management • site announcements • threaded discussions • a notification fr amewor k • wikis • user-to-user messaging with multiple mar kup suppor t • fr iend invitation • blogging (both inter nal and exter nal to the site) • bookmar ks • a basic twitter clone • tagging • oembed suppor t • contact impor t • gr avatar suppor t (from vCard, Google or Yahoo) • photo management
  34. 34. 0.5 Structure • external apps • local apps • libraries • two sample projects • path hacking
  35. 35. External apps • all on Google Code Project Hosting • use of svn:externals • half were written independently of Pinax • avoiding “rhythm section apps” • do one thing
  36. 36. Libraries • batteries included • except for PIL • makes for a huge checkout
  37. 37. Sites Using Pinax • cloud27.com • badlist.co.uk • foodsel.com • goodlist.co.uk • trailmapping.com • www.pinaxcn.com • tuttivisti.com • www.dooplan.com • girlgamer.com • faircompanies.com • coathangr.com • drinktale.com • replyforall.com • aletale.com • corpu.com • Eldarion intranet • we20.org • NASA SMD Spacebook • earth.burningman.com • gameocracy.org • trackmytrophies.com • mftransparency.org • carposse.com • lifelist.net • sequencemed.com
  38. 38. 0.7 Release • open micro-blogging • schedules • locations • page-cms • account and group improvements • uni-form and Section 508 • better shared templates and media • more sample projects (and complete renamed social) • virtualenv and pip • pinax is now a package
  39. 39. New Account App • turn OpenID on/off • turn sign up on/off • waiting list • invite only / private beta • token-based password reset • resend signup email confirmation with exponential backoff • use email for login
  40. 40. you signed up for admin initiated each user has fixed user can invite beta account number to hand out anyone admin sent code user invited you general code unique invite just go to site (type in) (email link) have code external auth username / password username signup (no password) SIGNED UP
  41. 41. New Group App • Don’t Repeat Yourself! • endo vs exo • membership app
  42. 42. Endo Approach (framework-like)
  43. 43. Exo Approach (library approach)
  44. 44. Shared Templates and Media • look up: • project • pinax new level • app • media build command • ship with famfamfam silk icons
  45. 45. Problems with 0.5 structure • it largely relies on external dependencies being in svn and this is increasingly not the case (although it was when Pinax started) • it makes it difficult for Pinax itself to move away from svn • there is no management of dependencies between external dependencies, nor between particular projects in Pinax and their individual dependencies
  46. 46. virtualenv and pip • encourage externals apps to be distutils- compliant • pip for package install (at least during development) • optional “batteries included” release • virtualenv to provide isolation, remove need for path hacking and just because it kicks ass
  47. 47. Pinax is NOT just for social networks
  48. 48. site site site site site site site site site site site site Learning Social Networks Intranets e-commerce Management Pinax Django
  49. 49. site site site site site site site site site site site site Learning Social Networks Intranets e-commerce Management Pinax Django
  50. 50. Editions • social networking • intranet • learning management • e-commerce • clubs and associations • conference management • software project management
  51. 51. http://pinaxproject.com/

×