SlideShare a Scribd company logo
the
 repoze.bfg
web framework
       Presented By
     Chris McDonough
  Agendaless Consulting
  Plone Conference 2008
• About a year old.
• Allow Zope developers to use WSGI
  technologies more easily.
• Allow non-Zope developers to use Zope
  technologies without using all of Zope.
• repoze.bfg: July 2008
• Chris McDonough, Tres Seaver, Paul Everitt,
  Carlos de la Guardia, Malthe Borch, Stefan
  Eletzhofer, Fernando Neto-Correa.
• Big f'ing gun -OR- big friendly giant: you
  choose.
WHY?
•   Zope2: still kicking, but only due to Plone

•   Zope3: big, many dependencies. App developers
    encouraged to use CA.

•   Grok: quot;making Z3 easier to usequot; (see Zope 3).

•   Django: nice, but Z2-like.

•   Pylons/TG2: nice, but geared towards RDB / URL
    dispatch apps.

•   Others: not Zope-like / no traction.
Goals
• Familiarity: like Zope, but less
• Simplicity: pay only for what you eat
• Speed: go as fast as possible while still actually
   doing something
• Documentation: the lack of formal
   documentation of a feature or API is a bug
• Collaboration: culture of using and promoting
   non-Zope stuff
What BFG Does
• Maps URLs to code
• Provides mechanisms that allow developers
  to make declarative security assertions
• Provides text and HTML templating
  facilities
• Allows for use of existing Zope libs (via
  ZCML).
What BFG Doesn't Do
• Database / persistence
• Sessions
• Indexing / searching
• ZMI / TTW code
• View code sharing with Z3 / Five
• etc...
The Application is the
     Application
• You don't write quot;Productsquot; to plug into
  BFG. Extensibility is via normal Python
  packages and ZCML as necessary.
• An application is generated for you; you
  develop the application and run the
  application; you don't run the framework.
Graph Traversal and
    URL Dispatch

• BFG supports both graph traversal (ala
  Zope) and quot;URL dispatchquot; (ala everything
  else) to map URLs to code.
• URL dispatch is backed by Routes.
Zope CA

• The Zope Component Architecture was
  used to construct BFG.
• BFG application developers don't
  need to use the CA. It's a framework
  implementation detail.
Components

• WSGI pipeline.
• Router (aka Publisher).
• quot;Application registryquot; (ZCML / decorators).
• Views (aka quot;controllersquot; in Pylons/Rails).
• Templates (chameleon/XSL/other).
Dependencies
 Paste-1.7.1-py2.4.egg                   zope.deferredimport-3.4.0-py2.4.egg
 PasteDeploy-1.3.2-py2.4.egg             zope.deprecation-3.4.0-py2.4.egg
 PasteScript-1.6.3-py2.4.egg             zope.event-3.4.0-py2.4.egg
 Routes-1.9.2-py2.4.egg                   zope.exceptions-3.5.2-py2.4.egg
 WebOb-0.9.2-py2.4.egg                   zope.hookable-3.4.0-py2.4-macosx-10.5-i386.egg
 zope.i18n-3.5.0-py2.4.egg               zope.proxy-3.4.1-py2.4-macosx-10.5-i386.egg
 elementtree-1.2.6_20050316-py2.4.egg    zope.i18nmessageid-3.4.3-py2.4-macosx-10.5-i386.egg
 lxml-2.1.1-py2.4-macosx-10.5-i386.egg   zope.interface-3.4.1-py2.4-macosx-10.5-i386.egg
 pytz-2008c-py2.4.egg                    zope.location-3.4.0-py2.4.egg
 setuptools-0.6c8-py2.4.egg              zope.publisher-3.5.3-py2.4.egg
 zope.schema-3.4.0-py2.4.egg             zope.traversing-3.5.0a3-py2.4.egg
 z3c.pt-1.0a1-py2.4.egg                  zope.security-3.5.1-py2.4-macosx-10.5-i386.egg
 zope.component-3.4.0-py2.4.egg          zope.testing-3.5.1-py2.4.egg
 zope.configuration-3.4.0-py2.4.egg

Many are due to inappropriate dependencies in Zope
                       eggs.
How it Works
Models
• quot;contentquot; objects
• typically arranged
  in a graph (although
  not required)
• For Zope people: think ZODB
• ZODB not required for repoze.bfg
  applications: filesystem directories, XML
  documents, RDF graphs, SQL databases,
  etc. can be the source of model data
A Model
from zope.interface import implements
from zope.interface import Interface

class IMyModel(Interface):
    pass

class MyModel(object):
    implements(IMyModel)
    def __init__(self, name):
        self.name = name
Views

• Views are functions which accept a
  quot;contextquot; (a model object) and a quot;requestquot;.
• Views must return a response. Unlike Zope.
• The view may use a template to generate
  the response body, or not.
A View
from webob import Response

def hello_world(context, request):
    return Response('Hello world!')
A View That Renders a
  chameleon.zpt Template
from repoze.bfg.chameleon_zpt 
 import render_template_to_response

def hello_world(context, request):
    render_template_to_response(
             'templates/hello.pt',
              context=context,
              myname='chris')
Using Model Data from
        a View
from webob import Response

def hello_world(context, request):
    name = context.name
    return Response('Hello %s!' %
                     name)
Templates
• Default templating engine: chalmeleon by
  Malthe Borch. ZPT or Genshi syntax. ~
  10X - 15X faster than zope.pagetemplate.
• Included: XSLT.
• Add-on: jinja2 (Django-style, via
  repoze.bfg.jinja2)
• Any other you'd like to use; bindings are
  simple to create (see the jinja2 bindings).
Traversal
•   The BFG router traverses the model graph based on
    the path segments in the URL (like Zope does).

•   If traversal quot;falls offquot; the end of the model graph,
    and there are path segments remaining, it looks for
    a view registered against the interface of the last
    model traversed using the next path segment as
    the view name.

•   If there are no segments remaining, the default view
    is used.

•   If no view is found, a 404 not found error is
    returned.
View Registrations
<configure xmlns=quot;http://namespaces.zope.org/zopequot;

     xmlns:bfg=quot;http://namespaces.repoze.org/bfgquot;

     i18n_domain=quot;repoze.bfgquot;>

  <include package=quot;repoze.bfgquot; />

  <— default view for .interfaces.IMyModel —>
  <bfg:view
     for=quot;.interfaces.IMyModelquot;
     view=quot;.views.my_viewquot;
     />

  <— named view for .interfaces.IMyModel —>
  <bfg:view
     for=quot;.interfaces.IMyModelquot;
     view=quot;.views.other_viewquot;
     name=quot;otherquot;
     />
</configure>
View Registrations via
    Decorators
from webob import Response
from repoze.bfg.convention import 
    bfg_view

@bfg_view(name='hello.html')
def hello_world(context, request):
    name = context.name
    return Response('Hello %s!' %
                     name)
Speed
<html xmlns=quot;http://www.w3.org/1999/xhtmlquot;
     xmlns:tal=quot;http://xml.zope.org/namespaces/talquot;>
  <head>
    <title tal:content=quot;context.titlequot;>The title</title>
    <meta http-equiv=quot;content-typequot; content=quot;text/html;charset=utf-8quot;/>
  </head>
  <body>

    <h2><span tal:replace=quot;context.title_or_id()quot;>content title or id</span>
        <span tal:condition=quot;context.titlequot;
              tal:replace=quot;context.titlequot;>optional template title</span></h2>

    This is Page Template <em tal:content=quot;request.view_namequot;>template id</em>.
  </body>
</html>



     Zope 2.10 view page template: 309 req/sec
                       vs.
   BFG view + chameleon.zpt template: 869 req/sec
Memory Usage and
   Process Sharing
• Existing Zope 2 and Zope 3 apps cannot
  run side-by-side in the same process due to
  globals sharing (ZCML global registry,
  database references); BFG has been written
  to make such a configuration work by
  default.
• Lower memory requirements per
  application instance (BFG minimum ~15 MB
  vs. Zope 3 minimum ~50MB).
Startup Speed

• repoze.bfg caches the ZCML registry as a
  pickle for faster startup.
• Startup time with a single view defined:
  900ms.
Paste-Derived Reload
              Feature
[chrism@vitaminf myproj]$ ../bin/paster serve myproj.ini —reload
Starting subprocess with file monitor
Starting server in PID 61405.
serving on 0.0.0.0:6543 view at http://127.0.0.1:6543

/Users/chrism/projects/repoze/bfgenv/myproj/myproj/run.py
changed; reloading...
—————————— Restarting ——————————
Starting server in PID 61409.
serving on 0.0.0.0:6543 view at http://127.0.0.1:6543
Template Auto-Reload
      Feature

• Templates auto-reload by default.
• This can be turned off for speed.
WSGI-Middleware-
   Derived Features
• Profiler (repoze.profile)
• Alternate exception handlers
  (paste.evalexception).
• Caching (repoze.accelerator)
• Theming (Deliverance).
• Transaction management (repoze.tm2)
• etc...
Project Setup Demo
Futures
• Vudo CMS (http://docs.vudo.me) to be
  implemented using repoze.bfg, hopefully.
  Work towards this: repoze.bfg.skins,
  repoze.bfg.layout, repoze.bitblt,
  repoze.squeeze.
• BFG will stay minimal. Add-ons and
  superframeworks like vudo and
  repoze.lemonade will provide functionality.
The End


• For a more in-depth exploration of how a
  bfg app is written, see the screencast at

  http://static.repoze.org/presentations/repozebfg-wiki.mov

More Related Content

What's hot

Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and GulpOptimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Matthew Davis
 
Grails 1.4.0.M1 メモLT
Grails 1.4.0.M1 メモLTGrails 1.4.0.M1 メモLT
Grails 1.4.0.M1 メモLT
Tsuyoshi Yamamoto
 
Quickly function add by Eclipse Monkey
Quickly function add by Eclipse MonkeyQuickly function add by Eclipse Monkey
Quickly function add by Eclipse Monkey
bose999
 
System webpack-jspm
System webpack-jspmSystem webpack-jspm
System webpack-jspm
Jesse Warden
 
SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)
Robert Swisher
 
Capistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient wayCapistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient way
Sylvain Rayé
 
Profiling PHP with Xdebug / Webgrind
Profiling PHP with Xdebug / WebgrindProfiling PHP with Xdebug / Webgrind
Profiling PHP with Xdebug / Webgrind
Sam Keen
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidence
John Congdon
 
Xdebug, KCacheGrind and Webgrind with WampServer
Xdebug, KCacheGrind and Webgrind with WampServer  Xdebug, KCacheGrind and Webgrind with WampServer
Xdebug, KCacheGrind and Webgrind with WampServer
Mediovski Technology
 
以 Laravel 經驗開發 Hyperf 應用
以 Laravel 經驗開發 Hyperf 應用以 Laravel 經驗開發 Hyperf 應用
以 Laravel 經驗開發 Hyperf 應用
Shengyou Fan
 
LCA2014 - Introduction to Go
LCA2014 - Introduction to GoLCA2014 - Introduction to Go
LCA2014 - Introduction to Go
dreamwidth
 
Perlmania_Study - CPAN
Perlmania_Study - CPANPerlmania_Study - CPAN
Perlmania_Study - CPAN
Jeen Lee
 
Chef training Day4
Chef training Day4Chef training Day4
Chef training Day4
Andriy Samilyak
 
Chef training - Day3
Chef training - Day3Chef training - Day3
Chef training - Day3
Andriy Samilyak
 
Fun with Ruby and Cocoa
Fun with Ruby and CocoaFun with Ruby and Cocoa
Fun with Ruby and Cocoa
Patrick Huesler
 
CoffeeScript in 5mins
CoffeeScript in 5minsCoffeeScript in 5mins
CoffeeScript in 5mins
Masakuni Kato
 
Docker in Production: Reality, Not Hype
Docker in Production: Reality, Not HypeDocker in Production: Reality, Not Hype
Docker in Production: Reality, Not Hype
bridgetkromhout
 
Dbbarang
DbbarangDbbarang
Lviv 2013 d7 vs d8
Lviv 2013   d7 vs d8Lviv 2013   d7 vs d8
Lviv 2013 d7 vs d8
Andy Postnikov
 
Up And Running With Web VR Fall 2014
Up And Running With Web VR Fall 2014Up And Running With Web VR Fall 2014
Up And Running With Web VR Fall 2014
Tony Parisi
 

What's hot (20)

Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and GulpOptimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
 
Grails 1.4.0.M1 メモLT
Grails 1.4.0.M1 メモLTGrails 1.4.0.M1 メモLT
Grails 1.4.0.M1 メモLT
 
Quickly function add by Eclipse Monkey
Quickly function add by Eclipse MonkeyQuickly function add by Eclipse Monkey
Quickly function add by Eclipse Monkey
 
System webpack-jspm
System webpack-jspmSystem webpack-jspm
System webpack-jspm
 
SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)
 
Capistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient wayCapistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient way
 
Profiling PHP with Xdebug / Webgrind
Profiling PHP with Xdebug / WebgrindProfiling PHP with Xdebug / Webgrind
Profiling PHP with Xdebug / Webgrind
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidence
 
Xdebug, KCacheGrind and Webgrind with WampServer
Xdebug, KCacheGrind and Webgrind with WampServer  Xdebug, KCacheGrind and Webgrind with WampServer
Xdebug, KCacheGrind and Webgrind with WampServer
 
以 Laravel 經驗開發 Hyperf 應用
以 Laravel 經驗開發 Hyperf 應用以 Laravel 經驗開發 Hyperf 應用
以 Laravel 經驗開發 Hyperf 應用
 
LCA2014 - Introduction to Go
LCA2014 - Introduction to GoLCA2014 - Introduction to Go
LCA2014 - Introduction to Go
 
Perlmania_Study - CPAN
Perlmania_Study - CPANPerlmania_Study - CPAN
Perlmania_Study - CPAN
 
Chef training Day4
Chef training Day4Chef training Day4
Chef training Day4
 
Chef training - Day3
Chef training - Day3Chef training - Day3
Chef training - Day3
 
Fun with Ruby and Cocoa
Fun with Ruby and CocoaFun with Ruby and Cocoa
Fun with Ruby and Cocoa
 
CoffeeScript in 5mins
CoffeeScript in 5minsCoffeeScript in 5mins
CoffeeScript in 5mins
 
Docker in Production: Reality, Not Hype
Docker in Production: Reality, Not HypeDocker in Production: Reality, Not Hype
Docker in Production: Reality, Not Hype
 
Dbbarang
DbbarangDbbarang
Dbbarang
 
Lviv 2013 d7 vs d8
Lviv 2013   d7 vs d8Lviv 2013   d7 vs d8
Lviv 2013 d7 vs d8
 
Up And Running With Web VR Fall 2014
Up And Running With Web VR Fall 2014Up And Running With Web VR Fall 2014
Up And Running With Web VR Fall 2014
 

Viewers also liked

KSS Techniques - Joel Burton
KSS Techniques - Joel BurtonKSS Techniques - Joel Burton
KSS Techniques - Joel Burton
Jeffrey Clark
 
Plone I18n Tutorial - Hanno Schlichting
Plone I18n Tutorial - Hanno SchlichtingPlone I18n Tutorial - Hanno Schlichting
Plone I18n Tutorial - Hanno Schlichting
Jeffrey Clark
 
Top Ten Test
Top Ten TestTop Ten Test
Top Ten Test
Joe Sciacca
 
Simplifying Plone
Simplifying PloneSimplifying Plone
Simplifying Plone
Jeffrey Clark
 
DIY Intranet Wiki
DIY Intranet WikiDIY Intranet Wiki
DIY Intranet Wiki
guestea9cfd
 
Opensourceweblion
OpensourceweblionOpensourceweblion
Opensourceweblion
Jeffrey Clark
 
Kss Extjs
Kss ExtjsKss Extjs
Kss Extjs
Jeffrey Clark
 
The PSF and You
The PSF and YouThe PSF and You
The PSF and You
Jeffrey Clark
 
Zpugdc2007 101105081808-phpapp01
Zpugdc2007 101105081808-phpapp01Zpugdc2007 101105081808-phpapp01
Zpugdc2007 101105081808-phpapp01
Jeffrey Clark
 

Viewers also liked (9)

KSS Techniques - Joel Burton
KSS Techniques - Joel BurtonKSS Techniques - Joel Burton
KSS Techniques - Joel Burton
 
Plone I18n Tutorial - Hanno Schlichting
Plone I18n Tutorial - Hanno SchlichtingPlone I18n Tutorial - Hanno Schlichting
Plone I18n Tutorial - Hanno Schlichting
 
Top Ten Test
Top Ten TestTop Ten Test
Top Ten Test
 
Simplifying Plone
Simplifying PloneSimplifying Plone
Simplifying Plone
 
DIY Intranet Wiki
DIY Intranet WikiDIY Intranet Wiki
DIY Intranet Wiki
 
Opensourceweblion
OpensourceweblionOpensourceweblion
Opensourceweblion
 
Kss Extjs
Kss ExtjsKss Extjs
Kss Extjs
 
The PSF and You
The PSF and YouThe PSF and You
The PSF and You
 
Zpugdc2007 101105081808-phpapp01
Zpugdc2007 101105081808-phpapp01Zpugdc2007 101105081808-phpapp01
Zpugdc2007 101105081808-phpapp01
 

Similar to Bfg Ploneconf Oct2008

Repoze Bfg - presented by Rok Garbas at the Python Barcelona Meetup October 2...
Repoze Bfg - presented by Rok Garbas at the Python Barcelona Meetup October 2...Repoze Bfg - presented by Rok Garbas at the Python Barcelona Meetup October 2...
Repoze Bfg - presented by Rok Garbas at the Python Barcelona Meetup October 2...
maikroeder
 
Psgi Plack Sfpm
Psgi Plack SfpmPsgi Plack Sfpm
Psgi Plack Sfpm
som_nangia
 
Psgi Plack Sfpm
Psgi Plack SfpmPsgi Plack Sfpm
Psgi Plack Sfpm
wilburlo
 
IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009
Christopher Judd
 
Plack - LPW 2009
Plack - LPW 2009Plack - LPW 2009
Plack - LPW 2009
Tatsuhiko Miyagawa
 
Complex Made Simple: Sleep Better with TorqueBox
Complex Made Simple: Sleep Better with TorqueBoxComplex Made Simple: Sleep Better with TorqueBox
Complex Made Simple: Sleep Better with TorqueBox
bobmcwhirter
 
GAEO
GAEOGAEO
GAEO
GAEOGAEO
Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09
Steve Souders
 
Mojolicious
MojoliciousMojolicious
Mojolicious
Marcus Ramberg
 
The Dojo Build System
The Dojo Build SystemThe Dojo Build System
The Dojo Build System
klipstein
 
PSGI/Plack OSDC.TW
PSGI/Plack OSDC.TWPSGI/Plack OSDC.TW
PSGI/Plack OSDC.TW
Tatsuhiko Miyagawa
 
Widget Summit 2008
Widget Summit 2008Widget Summit 2008
Widget Summit 2008
Volkan Unsal
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
Sagar Nakul
 
Struts,Jsp,Servlet
Struts,Jsp,ServletStruts,Jsp,Servlet
Struts,Jsp,Servlet
dasguptahirak
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
Sagar Nakul
 
Intro To Django
Intro To DjangoIntro To Django
Intro To Django
Udi Bauman
 
Deliverance: Plone theming without the learning curve from Plone Symposium Ea...
Deliverance: Plone theming without the learning curve from Plone Symposium Ea...Deliverance: Plone theming without the learning curve from Plone Symposium Ea...
Deliverance: Plone theming without the learning curve from Plone Symposium Ea...
Jazkarta, Inc.
 
ElggCamp Santiago - Dev Edition
ElggCamp Santiago - Dev EditionElggCamp Santiago - Dev Edition
ElggCamp Santiago - Dev Edition
Brett Profitt
 
ElggCamp Santiago> For Developers!
ElggCamp Santiago> For Developers!ElggCamp Santiago> For Developers!
ElggCamp Santiago> For Developers!
Condiminds
 

Similar to Bfg Ploneconf Oct2008 (20)

Repoze Bfg - presented by Rok Garbas at the Python Barcelona Meetup October 2...
Repoze Bfg - presented by Rok Garbas at the Python Barcelona Meetup October 2...Repoze Bfg - presented by Rok Garbas at the Python Barcelona Meetup October 2...
Repoze Bfg - presented by Rok Garbas at the Python Barcelona Meetup October 2...
 
Psgi Plack Sfpm
Psgi Plack SfpmPsgi Plack Sfpm
Psgi Plack Sfpm
 
Psgi Plack Sfpm
Psgi Plack SfpmPsgi Plack Sfpm
Psgi Plack Sfpm
 
IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009
 
Plack - LPW 2009
Plack - LPW 2009Plack - LPW 2009
Plack - LPW 2009
 
Complex Made Simple: Sleep Better with TorqueBox
Complex Made Simple: Sleep Better with TorqueBoxComplex Made Simple: Sleep Better with TorqueBox
Complex Made Simple: Sleep Better with TorqueBox
 
GAEO
GAEOGAEO
GAEO
 
GAEO
GAEOGAEO
GAEO
 
Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09
 
Mojolicious
MojoliciousMojolicious
Mojolicious
 
The Dojo Build System
The Dojo Build SystemThe Dojo Build System
The Dojo Build System
 
PSGI/Plack OSDC.TW
PSGI/Plack OSDC.TWPSGI/Plack OSDC.TW
PSGI/Plack OSDC.TW
 
Widget Summit 2008
Widget Summit 2008Widget Summit 2008
Widget Summit 2008
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
 
Struts,Jsp,Servlet
Struts,Jsp,ServletStruts,Jsp,Servlet
Struts,Jsp,Servlet
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
 
Intro To Django
Intro To DjangoIntro To Django
Intro To Django
 
Deliverance: Plone theming without the learning curve from Plone Symposium Ea...
Deliverance: Plone theming without the learning curve from Plone Symposium Ea...Deliverance: Plone theming without the learning curve from Plone Symposium Ea...
Deliverance: Plone theming without the learning curve from Plone Symposium Ea...
 
ElggCamp Santiago - Dev Edition
ElggCamp Santiago - Dev EditionElggCamp Santiago - Dev Edition
ElggCamp Santiago - Dev Edition
 
ElggCamp Santiago> For Developers!
ElggCamp Santiago> For Developers!ElggCamp Santiago> For Developers!
ElggCamp Santiago> For Developers!
 

More from Jeffrey Clark

Python memory management_v2
Python memory management_v2Python memory management_v2
Python memory management_v2
Jeffrey Clark
 
Python meetup
Python meetupPython meetup
Python meetup
Jeffrey Clark
 
Jwt with flask slide deck - alan swenson
Jwt with flask   slide deck - alan swensonJwt with flask   slide deck - alan swenson
Jwt with flask slide deck - alan swenson
Jeffrey Clark
 
Genericmeetupslides 110607190400-phpapp02
Genericmeetupslides 110607190400-phpapp02Genericmeetupslides 110607190400-phpapp02
Genericmeetupslides 110607190400-phpapp02
Jeffrey Clark
 
Pyramiddcpythonfeb2013 131006105131-phpapp02
Pyramiddcpythonfeb2013 131006105131-phpapp02Pyramiddcpythonfeb2013 131006105131-phpapp02
Pyramiddcpythonfeb2013 131006105131-phpapp02
Jeffrey Clark
 
Dc python meetup
Dc python meetupDc python meetup
Dc python meetup
Jeffrey Clark
 
Zpugdc deformpresentation-100709203803-phpapp01
Zpugdc deformpresentation-100709203803-phpapp01Zpugdc deformpresentation-100709203803-phpapp01
Zpugdc deformpresentation-100709203803-phpapp01
Jeffrey Clark
 
Zpugdccherry 101105081729-phpapp01
Zpugdccherry 101105081729-phpapp01Zpugdccherry 101105081729-phpapp01
Zpugdccherry 101105081729-phpapp01
Jeffrey Clark
 
Tornado
TornadoTornado
Tornado
Jeffrey Clark
 
Science To Bfg
Science To BfgScience To Bfg
Science To Bfg
Jeffrey Clark
 
Using Grok to Walk Like a Duck - Brandon Craig Rhodes
Using Grok to Walk Like a Duck - Brandon Craig RhodesUsing Grok to Walk Like a Duck - Brandon Craig Rhodes
Using Grok to Walk Like a Duck - Brandon Craig Rhodes
Jeffrey Clark
 
What Makes A Great Dev Team - Mike Robinson
What Makes A Great Dev Team - Mike RobinsonWhat Makes A Great Dev Team - Mike Robinson
What Makes A Great Dev Team - Mike Robinson
Jeffrey Clark
 
What Makes A Great Dev Team - Mike Robinson
What Makes A Great Dev Team - Mike RobinsonWhat Makes A Great Dev Team - Mike Robinson
What Makes A Great Dev Team - Mike Robinson
Jeffrey Clark
 
Real World Intranets - Joel Burton
Real World Intranets - Joel BurtonReal World Intranets - Joel Burton
Real World Intranets - Joel Burton
Jeffrey Clark
 
State Of Zope 3 - Stephan Richter
State Of Zope 3 - Stephan RichterState Of Zope 3 - Stephan Richter
State Of Zope 3 - Stephan Richter
Jeffrey Clark
 

More from Jeffrey Clark (15)

Python memory management_v2
Python memory management_v2Python memory management_v2
Python memory management_v2
 
Python meetup
Python meetupPython meetup
Python meetup
 
Jwt with flask slide deck - alan swenson
Jwt with flask   slide deck - alan swensonJwt with flask   slide deck - alan swenson
Jwt with flask slide deck - alan swenson
 
Genericmeetupslides 110607190400-phpapp02
Genericmeetupslides 110607190400-phpapp02Genericmeetupslides 110607190400-phpapp02
Genericmeetupslides 110607190400-phpapp02
 
Pyramiddcpythonfeb2013 131006105131-phpapp02
Pyramiddcpythonfeb2013 131006105131-phpapp02Pyramiddcpythonfeb2013 131006105131-phpapp02
Pyramiddcpythonfeb2013 131006105131-phpapp02
 
Dc python meetup
Dc python meetupDc python meetup
Dc python meetup
 
Zpugdc deformpresentation-100709203803-phpapp01
Zpugdc deformpresentation-100709203803-phpapp01Zpugdc deformpresentation-100709203803-phpapp01
Zpugdc deformpresentation-100709203803-phpapp01
 
Zpugdccherry 101105081729-phpapp01
Zpugdccherry 101105081729-phpapp01Zpugdccherry 101105081729-phpapp01
Zpugdccherry 101105081729-phpapp01
 
Tornado
TornadoTornado
Tornado
 
Science To Bfg
Science To BfgScience To Bfg
Science To Bfg
 
Using Grok to Walk Like a Duck - Brandon Craig Rhodes
Using Grok to Walk Like a Duck - Brandon Craig RhodesUsing Grok to Walk Like a Duck - Brandon Craig Rhodes
Using Grok to Walk Like a Duck - Brandon Craig Rhodes
 
What Makes A Great Dev Team - Mike Robinson
What Makes A Great Dev Team - Mike RobinsonWhat Makes A Great Dev Team - Mike Robinson
What Makes A Great Dev Team - Mike Robinson
 
What Makes A Great Dev Team - Mike Robinson
What Makes A Great Dev Team - Mike RobinsonWhat Makes A Great Dev Team - Mike Robinson
What Makes A Great Dev Team - Mike Robinson
 
Real World Intranets - Joel Burton
Real World Intranets - Joel BurtonReal World Intranets - Joel Burton
Real World Intranets - Joel Burton
 
State Of Zope 3 - Stephan Richter
State Of Zope 3 - Stephan RichterState Of Zope 3 - Stephan Richter
State Of Zope 3 - Stephan Richter
 

Recently uploaded

How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 

Recently uploaded (20)

How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 

Bfg Ploneconf Oct2008

  • 1. the repoze.bfg web framework Presented By Chris McDonough Agendaless Consulting Plone Conference 2008
  • 2. • About a year old. • Allow Zope developers to use WSGI technologies more easily. • Allow non-Zope developers to use Zope technologies without using all of Zope.
  • 3. • repoze.bfg: July 2008 • Chris McDonough, Tres Seaver, Paul Everitt, Carlos de la Guardia, Malthe Borch, Stefan Eletzhofer, Fernando Neto-Correa. • Big f'ing gun -OR- big friendly giant: you choose.
  • 4.
  • 5. WHY? • Zope2: still kicking, but only due to Plone • Zope3: big, many dependencies. App developers encouraged to use CA. • Grok: quot;making Z3 easier to usequot; (see Zope 3). • Django: nice, but Z2-like. • Pylons/TG2: nice, but geared towards RDB / URL dispatch apps. • Others: not Zope-like / no traction.
  • 6. Goals • Familiarity: like Zope, but less • Simplicity: pay only for what you eat • Speed: go as fast as possible while still actually doing something • Documentation: the lack of formal documentation of a feature or API is a bug • Collaboration: culture of using and promoting non-Zope stuff
  • 7. What BFG Does • Maps URLs to code • Provides mechanisms that allow developers to make declarative security assertions • Provides text and HTML templating facilities • Allows for use of existing Zope libs (via ZCML).
  • 8. What BFG Doesn't Do • Database / persistence • Sessions • Indexing / searching • ZMI / TTW code • View code sharing with Z3 / Five • etc...
  • 9. The Application is the Application • You don't write quot;Productsquot; to plug into BFG. Extensibility is via normal Python packages and ZCML as necessary. • An application is generated for you; you develop the application and run the application; you don't run the framework.
  • 10. Graph Traversal and URL Dispatch • BFG supports both graph traversal (ala Zope) and quot;URL dispatchquot; (ala everything else) to map URLs to code. • URL dispatch is backed by Routes.
  • 11. Zope CA • The Zope Component Architecture was used to construct BFG. • BFG application developers don't need to use the CA. It's a framework implementation detail.
  • 12. Components • WSGI pipeline. • Router (aka Publisher). • quot;Application registryquot; (ZCML / decorators). • Views (aka quot;controllersquot; in Pylons/Rails). • Templates (chameleon/XSL/other).
  • 13. Dependencies Paste-1.7.1-py2.4.egg zope.deferredimport-3.4.0-py2.4.egg PasteDeploy-1.3.2-py2.4.egg zope.deprecation-3.4.0-py2.4.egg PasteScript-1.6.3-py2.4.egg zope.event-3.4.0-py2.4.egg Routes-1.9.2-py2.4.egg zope.exceptions-3.5.2-py2.4.egg WebOb-0.9.2-py2.4.egg zope.hookable-3.4.0-py2.4-macosx-10.5-i386.egg zope.i18n-3.5.0-py2.4.egg zope.proxy-3.4.1-py2.4-macosx-10.5-i386.egg elementtree-1.2.6_20050316-py2.4.egg zope.i18nmessageid-3.4.3-py2.4-macosx-10.5-i386.egg lxml-2.1.1-py2.4-macosx-10.5-i386.egg zope.interface-3.4.1-py2.4-macosx-10.5-i386.egg pytz-2008c-py2.4.egg zope.location-3.4.0-py2.4.egg setuptools-0.6c8-py2.4.egg zope.publisher-3.5.3-py2.4.egg zope.schema-3.4.0-py2.4.egg zope.traversing-3.5.0a3-py2.4.egg z3c.pt-1.0a1-py2.4.egg zope.security-3.5.1-py2.4-macosx-10.5-i386.egg zope.component-3.4.0-py2.4.egg zope.testing-3.5.1-py2.4.egg zope.configuration-3.4.0-py2.4.egg Many are due to inappropriate dependencies in Zope eggs.
  • 15. Models • quot;contentquot; objects • typically arranged in a graph (although not required) • For Zope people: think ZODB • ZODB not required for repoze.bfg applications: filesystem directories, XML documents, RDF graphs, SQL databases, etc. can be the source of model data
  • 16. A Model from zope.interface import implements from zope.interface import Interface class IMyModel(Interface): pass class MyModel(object): implements(IMyModel) def __init__(self, name): self.name = name
  • 17. Views • Views are functions which accept a quot;contextquot; (a model object) and a quot;requestquot;. • Views must return a response. Unlike Zope. • The view may use a template to generate the response body, or not.
  • 18. A View from webob import Response def hello_world(context, request): return Response('Hello world!')
  • 19. A View That Renders a chameleon.zpt Template from repoze.bfg.chameleon_zpt import render_template_to_response def hello_world(context, request): render_template_to_response( 'templates/hello.pt', context=context, myname='chris')
  • 20. Using Model Data from a View from webob import Response def hello_world(context, request): name = context.name return Response('Hello %s!' % name)
  • 21. Templates • Default templating engine: chalmeleon by Malthe Borch. ZPT or Genshi syntax. ~ 10X - 15X faster than zope.pagetemplate. • Included: XSLT. • Add-on: jinja2 (Django-style, via repoze.bfg.jinja2) • Any other you'd like to use; bindings are simple to create (see the jinja2 bindings).
  • 22. Traversal • The BFG router traverses the model graph based on the path segments in the URL (like Zope does). • If traversal quot;falls offquot; the end of the model graph, and there are path segments remaining, it looks for a view registered against the interface of the last model traversed using the next path segment as the view name. • If there are no segments remaining, the default view is used. • If no view is found, a 404 not found error is returned.
  • 23. View Registrations <configure xmlns=quot;http://namespaces.zope.org/zopequot; xmlns:bfg=quot;http://namespaces.repoze.org/bfgquot; i18n_domain=quot;repoze.bfgquot;> <include package=quot;repoze.bfgquot; /> <— default view for .interfaces.IMyModel —> <bfg:view for=quot;.interfaces.IMyModelquot; view=quot;.views.my_viewquot; /> <— named view for .interfaces.IMyModel —> <bfg:view for=quot;.interfaces.IMyModelquot; view=quot;.views.other_viewquot; name=quot;otherquot; /> </configure>
  • 24. View Registrations via Decorators from webob import Response from repoze.bfg.convention import bfg_view @bfg_view(name='hello.html') def hello_world(context, request): name = context.name return Response('Hello %s!' % name)
  • 25. Speed <html xmlns=quot;http://www.w3.org/1999/xhtmlquot; xmlns:tal=quot;http://xml.zope.org/namespaces/talquot;> <head> <title tal:content=quot;context.titlequot;>The title</title> <meta http-equiv=quot;content-typequot; content=quot;text/html;charset=utf-8quot;/> </head> <body> <h2><span tal:replace=quot;context.title_or_id()quot;>content title or id</span> <span tal:condition=quot;context.titlequot; tal:replace=quot;context.titlequot;>optional template title</span></h2> This is Page Template <em tal:content=quot;request.view_namequot;>template id</em>. </body> </html> Zope 2.10 view page template: 309 req/sec vs. BFG view + chameleon.zpt template: 869 req/sec
  • 26. Memory Usage and Process Sharing • Existing Zope 2 and Zope 3 apps cannot run side-by-side in the same process due to globals sharing (ZCML global registry, database references); BFG has been written to make such a configuration work by default. • Lower memory requirements per application instance (BFG minimum ~15 MB vs. Zope 3 minimum ~50MB).
  • 27. Startup Speed • repoze.bfg caches the ZCML registry as a pickle for faster startup. • Startup time with a single view defined: 900ms.
  • 28. Paste-Derived Reload Feature [chrism@vitaminf myproj]$ ../bin/paster serve myproj.ini —reload Starting subprocess with file monitor Starting server in PID 61405. serving on 0.0.0.0:6543 view at http://127.0.0.1:6543 /Users/chrism/projects/repoze/bfgenv/myproj/myproj/run.py changed; reloading... —————————— Restarting —————————— Starting server in PID 61409. serving on 0.0.0.0:6543 view at http://127.0.0.1:6543
  • 29. Template Auto-Reload Feature • Templates auto-reload by default. • This can be turned off for speed.
  • 30. WSGI-Middleware- Derived Features • Profiler (repoze.profile) • Alternate exception handlers (paste.evalexception). • Caching (repoze.accelerator) • Theming (Deliverance). • Transaction management (repoze.tm2) • etc...
  • 32. Futures • Vudo CMS (http://docs.vudo.me) to be implemented using repoze.bfg, hopefully. Work towards this: repoze.bfg.skins, repoze.bfg.layout, repoze.bitblt, repoze.squeeze. • BFG will stay minimal. Add-ons and superframeworks like vudo and repoze.lemonade will provide functionality.
  • 33. The End • For a more in-depth exploration of how a bfg app is written, see the screencast at http://static.repoze.org/presentations/repozebfg-wiki.mov