[BangPypers] Web Application Development
Kiran Jonnalagadda
jace at pobox.com
Tue May 17 06:40:36 CEST 2011
On 05-May-2011, at 5:26 PM, Noufal Ibrahim wrote:
> Flask - Young and lightweight. Flexible with components (you can mix and
> match parts). Very well documented, good community.
>
> There's a bunch of offshoots of Zope (which was one of the earliest
> successfuly Python projects) like Grok, web2py etc. Haven't used any of
> them.
>
> I don't know anything about Pyramid and Pylons.
I've used Pyramid in its earlier incarnation as Repoze.BFG and liked it very much, but that was before Flask arrived on the scene. Now I use Flask for everything.
I have a major concern with Flask and SQLAlchemy that makes it hard to recommend them to others -- they mix up configuration with code.
Take, for example, the Flask-OAuth extension as documented here: http://packages.python.org/Flask-OAuth/
The documentation outlines Twitter integration. If you look at the sequence of the code, the OAuth handler must be provided a consumer_key and consumer_secret -- pieces of configuration -- before the handler code is written. Configuration has to be loaded while the module is being imported, not afterwards as a separate configure action.
SQLAlchemy declarative mode requires a Base metadata object to be shared by all models. This means you can't import models from two different sources. SQLAlchemy has a mixin syntax to get around this, but this is cumbersome.
This makes it really hard to reuse code.
Kiran
More information about the BangPypers
mailing list