Still though, it seems that most people tend to go for the full-stack frameworks. Anyone here using Pylons?
Still though, it seems that most people tend to go for the full-stack frameworks. Anyone here using Pylons?
1. It's a little tougher to get working "out-of-the-box"
2. It's documentation is not as "centralized" - meaning because you can use whatever template engine you want (jinja, mako, etc) and whatever db backend you want (sqlalchemy, elixir - a nice overlay on top of sqlalchemy, django ORM, etc) the docs for a particular module may or may not be in pylons docs
3. It's waaayyyy more flexible - I can't praise SQLAlchemy enough, it's freaking amazing!
I used SQLAlchemy breifly, but found myself drawn back to the Django ORM (even for non-web based projects) - can someone explain to me why they think SA is better than the Django ORM - I find the latter to be much better.
- The support for various class inheritance hierarchies is much more powerful than Django's inheritance.
- You can customize the default JOINs between object relationships very easily.
- You can map objects against arbitrary select statements.
- It has supported multiple databases for a long time now (which only just got added in Django 1.2)
- It supports composite primary keys.
- It implements the unit of work pattern, so you can save entire object graphs without having to explicitly save each individual node. This is a lot more intuitive, IMO.
- It uses an identity map to maintain object consistency. So if you query for the same object in two different queries, the same object is returned (at the Python level).
- The docs are excellent.
I think Django's ORM is fine for simple web apps where the model objects are just used to shuffle data in and out of the database. If you've got complex domain models, or specific database requirements, though, then you'll probably hit a wall where Django won't do what you need, whereas SQLAlchemy probably does.
That may have changed recently (I don't know, I'm not familiar with Pylons), but it gave Django a head-start with people who didn't want to have to dig through the source to figure out how to do things.
Setting any one of them for development is easy: just install them in a virtualenv using pip. Can't say how they fare in production setups. I'm not there yet :p
It removes the need for writing my own MVC which I would have needed anyways, and doesn't force me to use anything I don't want to. It's just Python, but neatly separates the files in logical places.
Thus far, Pylons has met every single need so far outside of async I/O, for which I've turned to node.js.
Contrary to popular belief, Pylons is not for intermediate Python users. I've taught web development in Python to beginners using Pylons and it's not hard at all to pick up for them.