Why Python Web Frameworks Are Changing the Web

  • 2,638 views
Uploaded on

An overview and histroy of Python web frameworks, and a discussion of the features of Python that provide for such a strong set of frameworks. Presented at Pycon NZ 2009.

An overview and histroy of Python web frameworks, and a discussion of the features of Python that provide for such a strong set of frameworks. Presented at Pycon NZ 2009.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
2,638
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
1
Likes
3

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Why Python Frameworks Are Changing the Web Joel Burton [email_address] Pycon New Zealand 2009
  • 2. Long, Long Ago...
  • 3. Avert Your Gaze! <H1><! print $title; !></H1> <UL> <% SELECT name FROM friends %> <LI><! print $name; !></LI> </UL>
  • 4. “ Beautiful is better than ugly ”
  • 5. “ Experience is simply the name we give our mistakes ” ― Oscar Wilde
  • 6. Zope 3 “ Explicit is better than implicit . ”
  • 7. Grok! “ Although practicality beats purity . ”
  • 8. “ I’m not a Plone evangelist . I’m a Plone survivor .” ― Chris Calloway ttw rich editing versioning custom content types form generation app dev tools caching systems theming ajax add ons
  • 9. repoze.bfg “ Do as little as possible , but do it well ! ”
  • 10.  
  • 11.  
  • 12. N y e t w o r k s “ It’s so easy to write a web framework in Python, why would you use someone else’s?”
  • 13. Attribute-Based Templates Zope Page Templates, Genshi, ... <h1 tal:replace =&quot;title&quot; > [title here] </h1> <ul> <li tal:replace =&quot;friend friends&quot; tal:content =&quot;friend/name&quot; > [friend] </li> </ul>
  • 14. Codelined Templates Mako, Jinja, Cheetah, ... <table> #for $client in $clients <tr> <td> $client.surname, $client.firstname </td> <td> <a href=&quot;mailto: $client.email &quot;> $client.email </a> </td> </tr> #end for </table>
  • 15. Deliverance <prepend theme=&quot;//head&quot; content=&quot;//head/link&quot; nocontent=&quot;ignore&quot; /> <append-or-replace theme=&quot;//head&quot; content=&quot;//head/title&quot; nocontent=&quot;ignore&quot; /> <copy theme=&quot;//div[@id='container']&quot; content=&quot;//div[@id='region-content']/div[3]&quot; /> * check it out! http://www.coactivate.org/projects/deliverance
  • 16. URL -> Database? /path/to/folder/in/database
  • 17. … or take a route? urlpatterns = patterns('', (r'^articles/2003/$', 'news.views.special_case_2003'), (r'^articles/(d{4})/$', 'news.views.year_archive'), (r'^articles/(d{4})/(d{2})/$', 'news.views.month'), (r'^articles/(d{4})/(d{2})/(d+)/$', 'news.views'), )
  • 18. ZODB
  • 19. Object-Relational Mappers SQLObject SQLAlchemy ...
  • 20. “ The Internet is... a series of tubes . ” ― Ted Stevens, US Senator, Alaska WSGI * start here: http://archimedeanco.com/wsgi-tutorial/
  • 21. do repeat yourself http://pypi.python.org/pypi/zc.buildout apache varnish pound squid supervisor backup
  • 22. how did we get here?
  • 23. *security “ PHP isn’t a bad language . It’s just used by bad people .”
  • 24. CVEs in Last 3 Years http://plone.org/products/plone/security
  • 25. the results? Powered by Plone
  • 26. Testing “ Untested code is broken code.” repoze.bfg has 100% test coverage
  • 27. interfaces & adapters
  • 28. culture “ Readability counts.”
  • 29. Conferences Plone Conference, Naples, Italy
  • 30. Friends in High Places
  • 31. Componentizing our code Relicensing project Sharing widely with repoze & grok Loving interfaces/adapters Broadening test coverage Integrating AJAX frameworks Innovating in UI concepts
  • 32. so... what can you do? “ mr. lyle”
  • 33. … thanks! PyCon New Zealand Tim Knapp The Plone Foundation Chris Calloway Photo Credits: http://www.flickr.com/photos/alf07/ http://www.flickr.com/photos/thetruthabout http://www.flickr.com/photos/chavals http://www.flickr.com/photos/32530713@N08 http://www.flickr.com/photos/caveman_92223 http://www.flickr.com/photos/santos http://www.flickr.com/photos/atomicshed http://www.flickr.com/photos/vidio All images taken by author or from above Creative Commons-licensed works.
  • 34. Have a great conference & keep in touch: [email_address]