[omaha] best python web framwork

James Harr james.harr at gmail.com
Thu Jul 14 17:05:22 CEST 2011


I share this sentiment about Zope.

On the other hand (and slightly OT), ZODB is a pretty interesting
database for light use.
- Pretty good at repeat reads.
- Terrible at writes (you'll only get about 60-80TPS on a standard
system, no matter how many threads you run).
- Super light weight modeling. With a 1 line decoration, and object
can now be shoved in ZODB.
- Transactions are serializable and it has a really cool way to
resolve conflicts without completely retrying a transaction. This is
optional, and is more interesting than it is useful.
- Handles cyclical object graphs
- Really easy to mess up transactions if you use threading. Get a DB
connection per thread and never share objects between threads (I
learned this the hard way -- oops).
- A year ago, docs were kind of sparse, but they've improved since then.
- You can basically think of it as a fancy "pickle these objects to
disk". There's no way to do aggregate queries without maintaining your
own indices/structures.

I've never used it for a full application because it seemed like a
risky time investment, but it might come in handy some day and is
worth toying with if you're bored. I ended up using
http://www.sqlalchemy.org/ for that project and love it. A lot of
frameworks give you a choice as to which model framework you use and
this is a good one.



On Wed, Jul 13, 2011 at 8:23 PM, Matthew Nuzum <newz at bearfruit.org> wrote:
>
> On Wed, Jul 13, 2011 at 7:21 PM, jesse moseman <jmoseman01 at gmail.com> wrote:
>
> > I've done some cgi for my "job" just generating html based off of a
> > database
> > and stuff but i'm looking in setting up my own test web server that's
> > python
> > powered.  I've heard of django but don't know much about it.  I know it's
> > like a content management system but it doesn't have a front end.  One
> > thing
> > i also looked at was mod_python for apache.  Any one have any
> > recommendations on getting python powered websites going on you're own
> > server?
> >
> >
> django isn't really a content management system and mod_python isn't a
> framework at all. mod_python embeds Python in the web server and is
> generally a bad idea currently. Instead use mod_wsgi (pronounced "mod
> whiskey") if you have the option. (or fastcgi if you like to fiddle)
>
> Here are a couple of my opinions on frameworks:
>
> Django - I use this every day. It's extremely easy to be productive. It has
> a lot of built in features. You don't need to learn a database, just
> describe your data as a python class. You'll be going fast. Optimizing your
> site can be challenging because the abstractions that make you very
> productive also hide the guts of what's happening. For example, I had a page
> that was going a bit slow so I installed the django-debug-toolbar and it
> showed that what I thought was one SQL query was actually 13. I simply had
> to use an option called select_related on that query and it turned into one
> like I'd expected. My point is that the framework abstracts you away from
> the details so sometimes there are a few surprises lurking in there.
>
> Turbogears - it is a framework that is made of piecing some of the best bits
> of many other python frameworks. I used this several years ago. Since then
> it's changed a lot. At the time it used cherry py which is a great cgi-like
> framework. It used an excellent database ORM and a more powerful templating
> system than Django. It's main disadvantages were a smaller community and
> that the pieces were not cohesive.
>
> Flask - a very lightweight framework. Much more like cgi. You have a lot of
> control over the inner workings of your app. It gives you some of the most
> needed features of a web app and that's it.
>
> Google App Engine - a platform that lets you use other frameworks (like App
> Engine Oil) to publish Python apps to Google's hosted cloud platform.
>
> Zope - don't use this unless you like xml and pain.
>
> With any of these you can make a content management system or any number of
> other web apps.
>
> Here are some sites my team has made:
>
> http://www.ubuntu.com/usn - a CMS for hosting security notices about Ubuntu
> https://login.ubuntu.com/ - a single sign in service using OpenID
> https://pay.ubuntu.com/ and the related Ubuntu Software Center (a web
> service with a native Ubuntu client) - an e-commerce platform for handling
> software purchases
>
> If you like CGI I'd suggest Flask. If you want to go whole-hog into Python
> web development I'd suggest Django. The only other framework I recommend to
> anyone these days is Ruby on Rails but this is the wrong list for that. :-)
>
> --
> Matthew Nuzum
> newz2000 on freenode, skype, linkedin and twitter
>
> ♫ You're never fully dressed without a smile! ♫
> _______________________________________________
> Omaha Python Users Group mailing list
> Omaha at python.org
> http://mail.python.org/mailman/listinfo/omaha
> http://www.OmahaPython.org


--
^[:wq^M


More information about the Omaha mailing list