state of pinax
DESCRIPTION
State of Pinax talk from DjangoCon 2009 by James TauberTRANSCRIPT
![Page 1: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/1.jpg)
State of
James Tauber
DjangoCon 2009
![Page 2: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/2.jpg)
![Page 3: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/3.jpg)
pi in hex
![Page 4: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/4.jpg)
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
![Page 5: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/5.jpg)
Your Site
Python Python
Django
Your Site
![Page 6: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/6.jpg)
idea realisation
![Page 7: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/7.jpg)
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
![Page 8: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/8.jpg)
app conventions
reusable apps
Hot Club of France
![Page 9: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/9.jpg)
Potter Predictions
• send invitations• connect to friends• make comments on
predictions• tag prediction• mass mailout to
users
![Page 10: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/10.jpg)
starting point for new projects
scaffolding for developing new apps
app conventions
reusable apps
+
Tabula Rasa
![Page 11: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/11.jpg)
![Page 12: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/12.jpg)
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
![Page 13: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/13.jpg)
Let’s Build aSocial Networking Site
![Page 14: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/14.jpg)
![Page 15: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/15.jpg)
![Page 16: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/16.jpg)
{ n | available(“cloud<n>.com”), n < 30 }=
{ 14, 26, 27, 28 }
![Page 17: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/17.jpg)
a platform for website development
conventions for reusable apps
collection of reusable apps
starting point for new projects
scaffolding for developing new apps
+
![Page 18: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/18.jpg)
Your Project
Django Django
Pinax
Your Project
Python Python
![Page 19: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/19.jpg)
• API Metering• Backups & Snapshots• Counters• Cloud/Cluster Management Tools
◦ Instrumentation/Monitoring (Ganglia, Nagios)◦ Failover◦ Node addition/removal and hashing◦ Autoscaling for cloud resources
• CSRF/XSS Protection• Data Retention/Archival• Deployment Tools
◦ Multiple Devs, Staging, Prod◦ Data model upgrades◦ Rolling deployments◦ Multiple versions (selective beta)◦ Bucket Testing◦ Rollbacks◦ CDN Management
• Distributed File Storage• Distributed Log storage, analysis• Graphing• HTTP Caching• Input/Output Filtering• Memory Caching• Non-relational Key Stores• Rate Limiting• Relational Storage• Queues• Rate Limiting• Real-time messaging (XMPP)• Search
◦ Ranging◦ Geo
• Sharding• Smart Caching
◦ dirty-table management
• AuthX (AuthN + AuthZ)◦ Capabilities◦ Multifactor Auth◦ Rate Limiting◦ Signup◦ OpenID◦ OAuth◦ External import
• Groups• Invites• Lists• Notifications
◦ Spam filtering◦ Multi-protocol routing◦ Fine-grained controls/rules
• Presence• Social Activity Log (Newsfeed)
◦ Filtering• Social Model
◦ Connectivity (uni/bidi)◦ Privacy (private, reciprocal, public)◦ Views◦ Traversal
• Social Object◦ Privacy, Social Scoping◦ Voting◦ Sharing◦ Publishing◦ Comments◦ Favoriting◦ Social editing◦ Permissions
• Tagging◦ Combinations◦ Relatedness
• User◦ Achievements/Awards◦ Activity Log◦ External User ID Mapping◦ Permissions (see AuthX)◦ Deletion/Archival◦ Flagging◦ Direct Messaging◦ User Cards
Modern Web Infrastructure
![Page 20: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/20.jpg)
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
![Page 21: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/21.jpg)
Django
Pinax
Your Project
the trade off:
how much to fix?how much to make configurable?how much to leavecompletely to site developer?
![Page 22: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/22.jpg)
Reusability is not just at the app layer
![Page 23: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/23.jpg)
quisition potterpredictions
reusable app
![Page 24: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/24.jpg)
djangopeople pythonpeople
![Page 25: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/25.jpg)
djangopeople pythonpeople
pinax project
![Page 26: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/26.jpg)
Ole Kirk Christiansen
![Page 27: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/27.jpg)
• blocks• sets• themes
![Page 28: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/28.jpg)
Pinax IS Django
![Page 29: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/29.jpg)
Pinax IS NOT Django
![Page 30: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/30.jpg)
“Pinax is opinionated so Django doesn’t
have to be”
![Page 31: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/31.jpg)
“PINAX:Even more
opinionated than Django”
![Page 32: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/32.jpg)
• 0.5.0 — October 2008• 0.5.1 — January 2009• 0.7beta1— April 2009 (485)• 0.7beta2 — April 2009 (58)• 0.7beta3 — July 2009 (445)• 0.7rc1— September 2009 (291)
Milestones
![Page 33: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/33.jpg)
1271 commits343 tickets closedbetween 0.5 and 0.7(not counting external apps)
![Page 34: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/34.jpg)
• openid support• emai l ver i ficat ion• password management• site announcements• a noti ficat ion framework• user-to-user messaging• fr iend invitat ion
(both internal and external to the s ite)
• a basic twitter clone• oembed suppor t• gravatar suppor t
Features in 0.5
• interest groups(cal led tr ibes)
• projectswith basic task and issue management
• threaded discussions• wikis
with mult iple markup suppor t
• blogging• bookmarks• tagging• contact impor t
(from vCard, Google or Yahoo)
• photo management
![Page 35: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/35.jpg)
• external apps• all on Google Code (SVN)• half written independently of Pinax
• local apps• libraries (batteries included)• two sample projects• path hacking
0.5 Structure
![Page 36: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/36.jpg)
Sites Using Pinax
![Page 37: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/37.jpg)
Sites Using Pinax
![Page 38: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/38.jpg)
Sites Using Pinax
![Page 39: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/39.jpg)
Sites Using Pinax
![Page 40: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/40.jpg)
Sites Using Pinax
![Page 41: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/41.jpg)
• translation removal• locations• frontend-admin and generic flat-blocks• account and group improvements• new task app• 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
0.7 Release
![Page 42: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/42.jpg)
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)• (use email for login)
![Page 43: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/43.jpg)
you signed up for beta
admin initiated account
each user has fixed number to hand out
user can invite anyone
admin sent code user invited you
general code(type in)
unique invite(email link) just go to site
external authhave code
username / passwordsignup
username(no password)
SIGNED UP
![Page 44: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/44.jpg)
New Group App
• Don’t Repeat Yourself!• endo vs exo• group apps versus content apps• membership app
![Page 45: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/45.jpg)
Endo Approach(framework-like)
![Page 46: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/46.jpg)
Endo Approach(framework-like)
![Page 47: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/47.jpg)
Exo Approach(library approach)
![Page 48: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/48.jpg)
Exo Approach(library approach)
![Page 49: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/49.jpg)
Shared Templates and Media
• look up:• project• pinax• app• media build command• ship with famfamfam silk icons
new level (multiple themes)
![Page 50: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/50.jpg)
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
![Page 51: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/51.jpg)
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
![Page 52: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/52.jpg)
release install(download tarball, extract and cd)
$ python scripts/pinax-boot.py ../pinax-env$ source ../pinax-env/bin/activate(pinax-env)$ cd ..
(pinax-env)$ pinax-admin clone_project social_project mysite(pinax-env)$ cd mysite/(pinax-env)$ python manage.py syncdb(pinax-env)$ python manage.py runserver
![Page 53: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/53.jpg)
development install(download pinax-boot.py from github)
$ python pinax-boot.py --development ./pinax-env$ source ./pinax-env/bin/activate(pinax-env)$
(pinax-env)$ cd ./pinax-env/(pinax-env)$ pip install --requirement src/pinax/requirements/external_apps.txt
![Page 54: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/54.jpg)
Move to githubhttp://github.com/pinax/pinax/
![Page 55: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/55.jpg)
![Page 56: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/56.jpg)
35 contributors108 members of pinax-core-dev list 58 at PyCon
336 users on code.pinaxproject.com403 watchers on github 157 at PyCon
649 members of pinax-users list 398 at PyCon
![Page 57: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/57.jpg)
Pinax is NOT just for social networks
![Page 58: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/58.jpg)
Django
Pinax
Social Networks
site
Intranets Learning Management
site
site
site
site
site
site
site
site
site
site
site
e-commerce
![Page 59: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/59.jpg)
Django
Pinax
Social Networks
site
Intranets Learning Management
site
site
site
site
site
site
site
site
site
site
site
e-commerce
![Page 60: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/60.jpg)
Editions
• social networking• intranet• learning management• e-commerce• clubs and associations• conference management• software project management
![Page 61: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/61.jpg)
Roadmap• 0.7rc1 out last week
• 0.7 final in next day or two
• 0.8 “translation release”• based off 0.7 and in parallel to 0.9
• 0.9 “big feature release”• rethink friends: split into friends, contacts and invitations• rethink profiles• workflow• open stack• calendar / events• new apps• new projects• new editions?
![Page 62: State of Pinax](https://reader033.vdocuments.mx/reader033/viewer/2022051311/540698e78d7f72d8088b466e/html5/thumbnails/62.jpg)
Join Us During Sprint(even if just in #pinax-sprint on freenode)