Hi folks,

I've been working on the next minor revision to repoze.bfg, which will be 1.2.

1.2 will be a slightly more important release than the previous 1.1 release, 
because it involves exposing an "imperative" API for configuration (adding 
routes/views, etc).

In particular, it means that the simplest repoze.bfg application can be 
represented as a single file:

    from webob import Response
    from wsgiref import simple_server
    from repoze.bfg.configuration import Configurator

    def hello_world(request):
        return Response('Hello world!')

    if __name__ == '__main__':
        config = Configurator()
        app = config.make_wsgi_app()
        simple_server.make_server('', 8080, app).serve_forever()

As far as I can tell, aside from package dependencies, such a configuration 
mode puts repoze.bfg in the same category as "microframeworks" (such as Bottle 
and Tornado), because applications can start as a single file, then evolve into 
a package, then maybe "grow" declarative configuration in the form of ZCML, and 
so on.  repoze.bfg, on the other hand, has a good deal of functionality that 
microframeworks lack, so I like to think of this functionality as sort of the 
"best of both worlds" feature.

Thankfully, the 1.2 release will be almost 100% b/w compatible with previous 
releases, so I don't think we lost anything to obtain this feature (except for 
my time ;-) ).

If anyone has time, it would be great for folks to read the two new chapters of 
the repoze.bfg documentation available at:

- http://docs.repoze.org/bfg/trunk/narr/configuration.html

- http://docs.repoze.org/bfg/trunk/narr/scanning.html

.. and provide feedback and edits before I release an alpha.  In general, I 
think we'd all like the docs to be 100% clear on how all this works.

- C

Repoze-dev mailing list

Reply via email to