Django is far better thought out, and can be deployed in a very sane manner. A fleet of Mongrels is just an embarrassingly bad way to handle concurrency. "I know, let's write a crappy barely functional web server, spawn a metric ass ton of them, and then balance between them with a proxy. It'll be most leet and super fast! We'll call it a Best Practice. It'll be awesome." In fact, it's fragile, doesn't scale very well, and is complicated to configure. It's also a huge distraction from solving the problem in a sane way--people seem to think "deploying Rails" is solved by this and Capistrano, when really, it's just a new stack of problems.
Otherwise Rails kicks ass, and I like Ruby better than Python (but I'm a perl monger, so I might be brain-damaged into not seeing the beauty of Python). But I do tend to feel like Django is being written by grownups who've got years of development experience, while the Rails folks are making it up as they go along...sometimes going down really poorly chosen paths (I believe Mongrel is an example of this, but I'm no expert).
Then again, I think if I were starting an app from scratch I'd pick Catalyst. But I haven't spent enough time with any of them to know which one is really most productive for the way I work. I think you'll want to try them out, and not take advice from random dudes at news.yc.
I went for rails myself, and agree about Mongrel. It seems like the Rails guys are all anxious to throw the Apache baby out with the bathwater, and spend a lot of time fooling around with dodgy ways of doing things.
For now, I use the mod_fcgid Apache module, and it seems to work ok for what I need.
i heard through the grapevine that zed shaw, the dude who wrote mongrel, is down on it and isn't actively developing it anymore. hopefully someone else will pick up the slack, but i'm afraid that 95% of the folks using ruby+rails are know-nothing newbies (like me). =P
I'm not sure why they think "assload of processes + proxy" is so good either, but deploying an assload of mongrels behind the "pound" load balancer is damn easy. Plus, pound is light-weight, fast, and designed to be small so that it can be easily security audited.
All you have to do is install pound, edit the pound config file to tell it how many mongrels you have and what port range they live at (easy), do a "gem install mongrel_cluster", then a "mongrel_rails cluster::configure" and a "mongrel_rails cluster::start".
I know this sounds like a lot of steps, but if you've ever built and configured apache from source you know this is cake in comparison.
Having come from a rails background and later switching to django I think it comes down to a matter of preference. Django's ORM gets the job done but leaves something to be desired (ugly syntax, no multiple database support, also watch out for implicit cascading deletes!). Conversion to using SQLAlchemy was supposed to address the gaps, but the branch for the upgrade seems pretty dead... But overall I'm pretty happy due to the transparency of django's framework code. I've implemented some customizations that would have been a lot harder to pull off in rails.
If you had to choose a python web framework, I'd suggest taking a look at pylons which is more flexible (also, by default it uses mako templating which > django's templating and supports SQLAlchemy).
I've been learning it recently and I'm not sure what to make of it, specifically the ORM component. It certainly has a good reputation as far as ORM's go, but I'm not sure if even a good ORM fits a large, popular, or complex app, or is perhaps more suitable for protoyping and low-traffic uses.
But since SQL is pretty necessary for most web apps, it makes sense to pick some abstraction layer, and as far as I can tell SQLA is best of breed for scripting languages, so I'm trying to work out how to apply it most effectively.
Oh yeah...One more thing. The good reputation of SQLAlchemy - is unfounded. Let me explain.
See it does all the basic stuff and so do the others.
Then some relatively famous programmer who is also a blogger wants to do something esoteric so they evaluate all wrappers and eventually find that SQLAlchemy can do it if you are willing to write brain damaging code.
Then because after many many hours of head banging they finally make it work they can't wait to gloat over the sustained brain damage and how SQL Alchemy rocks, so they write it up in a blog.
Then guess what, simpletons like me read the famous peoples blogs, get suitably impressed and sustain permanent brain damage, if we survive we join the bandwagon and gloat too - with good reason, this thing is impossible for humans to use. If we fail, we do what we should have done in the first place, look for alternatives.
PS: Now that I read it again it sounds like I am talking about Ruby on Rails!!
2. If you are going to use SQL, Find a wrapper that is minimalistic for your current needs. Work with lesser and you will work more but you will also work with more freedom and sanity.
Thanks for your thought-provoking comments, actually I had quite forgotten that I didn't necessarily need SQL (despite reading all the threads about that here)!
Trouble is, I understand the theory of in-memory data logged to disk, but as I'm just a humble hacker (self-taught amateur) there seem a lot of unknowns in such an approach. SQL, though a pain, is at least familiar and abundantly documented.
Guess I'll do a little more research, and a little more hacking, since I would be quite happy to drop SQL entirely!
Actually, I am self taught too and most hackers here are probably much better than me. I use python, if you do the same then try out Zope DB and schevo.org. These are Object based DBMS - non SQL. The problem like someone pointed out is that such systems are not language agnostic.
I know nothing about sql wrappers but I do know whenever I have a scaling problem it is ALWAYS the sql. I doubt if any wrapper will save me from this. As your database grows larger you need to fine tune your sql, indexes, and so on.
I'm playing around with Pylons and have been impressed so far. The whole approach strikes me as more of a hackers framework; less magic, more flexible, extensible. Though the docs need a little work, and the community isn't as big as Django yet, Pylons seems to be blossoming into quite an excellent framework.
1) Pick a very easy tutorial for both of them
2) Do them
3) Choose
Framework will only get better each day so if today Rails deployment sucks, tomorrow it'll become better unless the growth is stagnant. Same case with Pylons or Django or the 100000000000000001 python frameworks out there.
Now if you're looking for a job, Rails would be a better choice because the hype marketing has converted a lot of people (they drink the kool-aid straight from the hose).
You need to love the platform you're going to develop on top of. Guys like him, that ask which one is better, needs to at least give both of them a try and see which one he likes it the most.
Just like the most common comments from the Rails vs Django: it's up to which one you're comfortable/love.
I tried Rails, Django, TurboGears and I ended up with ASP.NET.
Django is far better thought out, and can be deployed in a very sane manner. A fleet of Mongrels is just an embarrassingly bad way to handle concurrency. "I know, let's write a crappy barely functional web server, spawn a metric ass ton of them, and then balance between them with a proxy. It'll be most leet and super fast! We'll call it a Best Practice. It'll be awesome." In fact, it's fragile, doesn't scale very well, and is complicated to configure. It's also a huge distraction from solving the problem in a sane way--people seem to think "deploying Rails" is solved by this and Capistrano, when really, it's just a new stack of problems.
Otherwise Rails kicks ass, and I like Ruby better than Python (but I'm a perl monger, so I might be brain-damaged into not seeing the beauty of Python). But I do tend to feel like Django is being written by grownups who've got years of development experience, while the Rails folks are making it up as they go along...sometimes going down really poorly chosen paths (I believe Mongrel is an example of this, but I'm no expert).
Then again, I think if I were starting an app from scratch I'd pick Catalyst. But I haven't spent enough time with any of them to know which one is really most productive for the way I work. I think you'll want to try them out, and not take advice from random dudes at news.yc.