KEMBAR78
Why Python Web Frameworks Are Changing the Web | ODP
Why Python Frameworks Are Changing the Web Joel Burton [email_address] Pycon New Zealand 2009
Long, Long Ago...
Avert Your Gaze! <H1><! print $title; !></H1> <UL> <% SELECT name FROM friends %> <LI><! print $name; !></LI> </UL>
“ Beautiful is better than ugly ”
“ Experience  is simply the    name we give  our mistakes ” ―  Oscar Wilde
Zope 3 “ Explicit  is better than  implicit . ”
Grok! “ Although  practicality beats  purity . ”
“ 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
repoze.bfg “ Do as  little as possible ,  but  do it well ! ”
 
 
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?”
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>
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>
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
URL -> Database? /path/to/folder/in/database
…  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'), )
ZODB
Object-Relational Mappers SQLObject SQLAlchemy ...
“ The Internet is...   a  series of tubes . ” ―  Ted Stevens, US Senator, Alaska WSGI * start here:   http://archimedeanco.com/wsgi-tutorial/
do repeat yourself http://pypi.python.org/pypi/zc.buildout apache varnish pound squid supervisor backup
how   did  we get    here?
*security “ PHP isn’t a  bad language . It’s just used by  bad people .”
CVEs in Last 3 Years http://plone.org/products/plone/security
the results? Powered by Plone
Testing “ Untested code is broken code.” repoze.bfg has 100% test coverage
interfaces & adapters
culture “ Readability counts.”
Conferences Plone Conference, Naples, Italy
Friends in High Places
Componentizing our code Relicensing project Sharing widely with repoze & grok Loving interfaces/adapters Broadening test coverage Integrating AJAX frameworks Innovating in UI concepts
so...   what can  you     do? “ mr. lyle”
…  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.
Have a great conference &  keep in touch: [email_address]

Why Python Web Frameworks Are Changing the Web

  • 1.
    Why Python FrameworksAre Changing the Web Joel Burton [email_address] Pycon New Zealand 2009
  • 2.
  • 3.
    Avert Your Gaze!<H1><! print $title; !></H1> <UL> <% SELECT name FROM friends %> <LI><! print $name; !></LI> </UL>
  • 4.
    “ Beautiful isbetter 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 nota 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 “ Doas little as possible , but do it well ! ”
  • 10.
  • 11.
  • 12.
    N y et 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 ZopePage 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.
    … ortake 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.
  • 19.
  • 20.
    “ The Internetis... a series of tubes . ” ― Ted Stevens, US Senator, Alaska WSGI * start here: http://archimedeanco.com/wsgi-tutorial/
  • 21.
    do repeat yourselfhttp://pypi.python.org/pypi/zc.buildout apache varnish pound squid supervisor backup
  • 22.
    how did we get here?
  • 23.
    *security “ PHPisn’t a bad language . It’s just used by bad people .”
  • 24.
    CVEs in Last3 Years http://plone.org/products/plone/security
  • 25.
  • 26.
    Testing “ Untestedcode is broken code.” repoze.bfg has 100% test coverage
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
    Componentizing our codeRelicensing 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 greatconference & keep in touch: [email_address]