Hacker News new | past | comments | ask | show | jobs | submit login
Ask YC: Django vs Ruby on Rails
70 points by notdarkyet on May 20, 2008 | hide | past | web | favorite | 112 comments
I have recently finished the design work for a project I am going to be working on this summer and I was having a hard time deciding which framework to implement the project in. A lot of the articles written out there seem to either be dated (so some of the qualms may have been changed in newer versions) or biased. I have no experience in Python or Ruby, so I am completely open to either, I just want to make sure the investment in the time spent learning is worth it not just for this project but also for future ones (and for potential jobs). I also am curious as to which hosting service you all use and how easy it is to implement that framework with it. I had bought my domain name with GoDaddy.com along time ago, but I am open to switching to something reliable (and cheap I am still a student). Thanks for any input!

EDIT (To elaborate a little on my project, without giving details):

The project is relatively simple and provides a service to an area for a small fee. For now, the area would be specific to one geographic location. As the site grows and progresses, the site will need to scale by adding more locations (organized similar to how craiglist is specific to each location).

You have two things to consider: Python vs. Ruby and Rails vs. Django.

Steve Yegge has made a good write-up on languages: http://steve.yegge.googlepages.com/tour-de-babel. Steve is a top notch programmer with brains and eloquence. He was one of the first hackers at Amazon. Now he works at Google, and Google has chosen Python and JavaScript as company languages. Which has pissed off Steve quite a bit, because he has firmly decided that Ruby is more powerful and rewarding than Python. But he's not allowed to program in Ruby at work.

So, Steve has engineered a kind of 'JavaScript on Rails' in order to fit into Google. All to avoid programming in Python. JavaScript is more powerful and elegant than Python, as he sees it.

This gives you two clues. One about Ruby and second about the Rails. To be brutally honest, Lisp is the most powerful and beautiful language to approach a programming problem. But List is not the most practical choice because of lack of libraries and dialect balkanisation. Ruby is considered to be an 'acceptable Lisp'. Almost as powerful and much more practical. And very very elegant. You may hear a lot about Ruby being slow. That is true, but that is also changing fast. Make your own research. You'll hear some interesting thoughts about what 'programmers' time' is worth vs. 'processor time' etc.

Finally, the frameworks. Rails has been mercilessly hyped, but the fact remains -- it is a framework for programmers. It has digested lots of 'theorizing' from Java and Smalltalk space. It tried to answer the question: "What an ideal MVC framework would be?" The answer turned out to be surprisingly good.

Django is a clever framework, but it has arisen from a particular website (Lawrence Journal-World) and it still has roots in website page design. Nothing wrong with that, but programmers talk less about Django (just check IBM tech articles), there is less programming 'meat' in there. There are also much lesser number of plugins and hacks for Django. You do not have the same amount of books and general enthusiasm about Django platform, comparing to Rails. Not by any objective measure.

Now let Python fanboys kill me, but I went through the same analysis a couple of years ago and I came firmly in favour of Ruby and later in favour of Rails. And I have not been disappointed a bit ever since.

Here's my take, after working in Ruby/Rails for a year, and coming from a background in C++ and Perl (with a tiny bit of Lisp in my distant past): Ruby is nothing like Lisp. It has some metaprogramming features that make you think (vaguely) of Lisp, but fundamentally, it's more like the bastard child of a torrid, three-way affair between Lisp, Python and Perl -- the genetic heritage was passed on, but poor baby Ruby got little of the careful childhood upbringing.

The result? Ruby has the syntactical consistency and beauty of Perl, and the blazing speed and low overhead of Lisp. There are roughly six dozen different ways of doing everything (including really simple things, like delimiting blocks), and bizarre inconsistencies in basic use cases (e.g. most String functions return copies, whereas nearly everything else works by reference), and plenty of long-term code maintainability nightmares lurking in the corners.

It can be fun to code in Ruby, and it's certainly a language you should check out someday, but I'm still not sure it's the language you want to choose for a project involving a team of programmers or long-term project maintenance. My advice, if you know neither Ruby nor Python, is to learn Python, unless you've got some particular reason (i.e. a job) to learn Ruby first. Rails is an okay framework, but Django is okay too, and Python is the more elegant language.

(Now...if you'll excuse me, I'm going to go put on my asbestos underwear....)

I was about to post a comment about you being insane when I read 'syntactical consistency and beauty of Perl', but then I re-read what you wrote and my Sarcasm-O-Meter started beeping.

I'm not sure your argument about Python/Django being better for long-term use really holds muster. There are a lot of very passionate Rails hackers, and I can see Rails taking over the web application development sphere over the next few years. This isn't because it's necessarily better, mind you, but because Rails has a hell of a lot of mindshare.

So, you should be as worried about finding competent Rails hackers as you should be about finding competent Python/Django hackers. Or should you?

Rails is the web development framework for Ruby. There are probably others, but nobody has ever heard of them, so they don't matter. Python has Django, and Pylons, and TurboGears, and so on. Your hypothetical future Python web developer, then, has a lower chance of being an expert in The Best Web Framework than does the Ruby hacker, because with Ruby, you only have one choice.

"you should be as worried about finding competent Rails hackers as you should be about finding competent Python/Django hackers."

It's not finding the coders that's hard (any smart coder can pick up Ruby quickly); it's the quality of the code that any new person will inherit. My experience is that the syntactical looseness of Ruby leads to write-only code. Lots of people complain about the readability of Perl, but Ruby is really only nominally better. In Python, readable code is the rule, not the exception.

"any smart coder can pick up Ruby quickly"

True, but can they pick up ruby quickly, and rails (rails is non trivial these days), and rspec, and rake, etc. I'm guessing it would take at least 6 months to become merely comfortable with all of these. This is far different than having a proficient coder walk in the door.

You'll have much better luck getting a proficient rails coder than a proficient django coder. On the flip side I'm starting to get a lot of rails candidates that aren't really interested in rails, but used it at their previous job. For while if someone had rails on their resume it meant they took the time to learn it on their own (which is a good sign). Those days are gone.

You're missing my point: finding a good Blub coder, however hard, is a constant-time problem. The polynomial-time problem is maintaining/reading/understanding an established code base in Blub.

If Blub is an order of magnitude more difficult to maintain/read/understand than Foo, then even if it's far more difficult to find a Foo coder today, it makes more sense for me to use Foo for my new project.

I think code maintainability has less to do with the language than with the architecture chosen by the developers.

Try to explore (save alone, maintain) a complex Python application like Plone with its multiple inheritance. And then read the code of a modern MVC Rails application. You'll see what I mean.

And your statement that Ruby is only marginally more readable than Perl is very surprising. Ruby is a vast improvement in terms of clarity over Perl and is on par with Python there.

the idea that ruby is a blub language while python is a foo language is laughable. Python has it's issues as well. New style classes vs old style classes. These types are treated differently than those types in terms of default behaviour. Decorators are not the easiest thing in the world to read. Metaclasses are another example.

In my opinion ruby's syntax is simpler from a users point of view and equally as powerful. This may be my bias, but a fair assessment is that they are fairly equal

Speaking from experience: I coded many thousands lines of Ruby code for my startup all alone. Then we raised seed, and hired a few additional developers. Two of them joined my project and took over the development from me. They're both very experienced programmers, but had no prior Ruby experience. It took them less than a month to become productive. Srsly. In short, if you write good code and bring in good developers, Ruby probably isn't going to be a problem.

I'd be really worried if I hired someone that took 6 months to become comfortable with the ruby/rails (and rspec, rake, capistrano, etc). Now it might take way longer than 6 months to fully master everything, but if you already have a good quality code base to learn from and a team of experts any smart developer should have no problem picking things up quickly.

"True, but can they pick up ruby quickly, and rails (rails is non trivial these days), and rspec, and rake, etc."

2 Weeks for Ruby & Rails. 1 to 2 weeks for Rspec & rake... especially if you're learning using Peepcode videos and a real project. Those numbers are from personal experience. Your learning curve may vary.

This is simply personal preference; I have no problem reading Ruby code. Perhaps this is because I spent a very, very long time with Perl, but other Ruby hackers seem to feel the same way. On the contrary, I don't much care for looking at Python code, because half of it seems to consist of the word 'self'.

So, 'readability' in this case isn't a very valid argument, because anyone who codes in language X is going to find X to be highly readable.

"This is simply personal preference"

Well, yeah. That's why I said it was my experience.

I think the point is, I code in Ruby and in Perl, and my opinion is that neither language is particularly readable or maintainable. Meanwhile, I have less experience with Python than either Perl or Ruby, yet I find it to be a consistently readable language.

Those are all opinions, but they're informed opinions (and I'm not simply advocating for the language with which I am most familiar).

Rails does have a lot more mindshare than Django right now, but notice Rails had a 2.0 release in December, while Django still hasn't even reached 1.0. I'm not sure about the relative histories of the projects, but it looks like Django is still in the pre-buzz phase. (Meaning, projects tend to start publishing books, holding conferences, etc. after the big 1.0 release, not in the incubation/unstable-API phase.)

Version numbers don't measure age. Django and Rails are roughly the same age, having had their first public releases around the same time.

Yeah, exactly. The two projects have a completely different dynamic. Like Python, Django development is cautious, minimal and relatively slow-moving compared to Ruby and Rails.

Rails burst onto the scene, brought everyone on board with a 1.0, published books, and already decided enough design elements needed to change to warrant a 2.0 release. Django, despite having the BDFL's semi-official endorsement, has crept along, nitpicking at its own API, cranking out beautiful versioned documentation and tutorials, and writing and editing the official Django Book in a wiki. And only now are they feeling confident enough to consider the 1.0 label and even publish their precious gem of a book.

Same timeframe, completely different personalities. This played out somewhat similarly with Python and Perl a decade ago, which leads me to believe that Django's time in the spotlight is still ahead of it.

A lot of Python projects seem reluctant to announce a 1.0 release. For example Pylons and Django are both in 0.9 range, SQLAlchemy is 0.4, Genshi is 0.4 (just some of the projects I've used in a commercial setting).

" There are probably others, but nobody has ever heard of them, so they don't matter. "

Simply untrue. You, and your opinion, are grossly misinformed.

with Ruby, you only have one choice.

I disagree vehemently. I myself have started using Ramaze, and like it better than Rails. In any case, it's more important to me to know Ruby well than a particular framework.

Upvoted for Ramaze and do try to use the Sequel ORM library. It's sweeeeeeeeeeeeet. None of that ActiveRecord magic for me.

I am using Sequel.

You sir have good taste.

>...the blazing speed and low overhead of Lisp...

Actually, there are some Lisp implementations that leave Ruby in the dust. (Not saying much, I'll grant you that.) There are some Lisp implementations that let you compile code to machine language.

sigh yet another clueless spreader of programming urban legend and old prejudice!

"Ruby has. . .the blazing speed and low overhead of Lisp."

How did you conclude this?

With a smirk, most likely.

Granted the OP was being facetious in claiming the beauty of Perl or blazing speed of Lisp, but he was sincere in analogizing Ruby to Perl and Lisp. In that sense, he was wrong. Ruby is nowhere near the speed of Lisp. Peter Norvig claims Lisp is "about 1 to 2 times slower than C++" (http://norvig.com/python-lisp.html), and I don't think anyone would sensibly equate the speeds of Ruby and Lisp.

Well on a related note, when you become really comfortable with ruby, it's incredibly fast to write scripts and one-liners to do really complex stuff. Especially with the ruby shell as help.

Interesting. I went through the same analysis a couple years ago and concluded that Ruby had the hype but Python had the goods. Was skeptical of Django for a long time, but finally warmed up to it last December and haven't looked back.

In all honesty, I think both are perfectly fine web languages, and it doesn't really matter which you choose. Pick one and get good at it. Either will be light-years better than, say, Java or PHP.

I couldn't agree more. Pick the one you like and run with it. Which you choose isn't going to make or break your business or career.

"Steve has engineered a kind of 'JavaScript on Rails' in order to fit into Google. All to avoid programming in Python."

If only it were true.

Steve wrote Rhino on Rails while working on a project that requires the JVM. At Google this infers a choice of Java, Python (Jython) or Javascript (Rhino).

Steve chose Rhino over Jython for reasons you can read about here: http://steve-yegge.blogspot.com/2007/06/rhino-on-rails.html

+1 Obviously haven't read much Yegge when making statements like that. Ontop of the above defense, there's a video on Youtube...


My fault, Steve has indeed explicitly said he could not use Python for that project.

But I somehow feel I'm not far from the truth, knowing his history of gentle Python bashing. After all, he chose not to make 'Django on Rhino'.

You really haven't read much Steve Yegge have you? He has his gripes (some of which have been recanted, mind), but he explicitly states he likes Python.

I'd say you're far from the truth.

I find it unfair to invoke Steve Yegge too often, since he's just a guy with an opinion. I have read a fair amount of his rants, of varying quality. His language comparative analysis is interesting because it is informed, argumented and ...well, funny. Read this passage, for example:

>Well, they're just like the Smalltalk folks, who waited forever to replace C++, and then Java came along and screwed them royally, and permanently. Oops. Ruby's doing exactly that to Python, right now, today. Practically overnight.

He just points out at some major architectural flaws in Python (like the scoping issues leading to selfSelfself and unreadable code, and then the whitespace...) and argues that Ruby has superseded both Perl and Python in many ways. That does not mean he does not LIKE Python. His is just an engineer's analysis, not an emotional judgement.


I -- on the other hand -- am emotionally scarred by Python having tried to take it into my system over a couple of years and having failed to love it. Then Ruby came along... ;)

What is the selfSelfself issue?

>Python's author, Guido Van Rossum, also made some boneheaded technical blunders early on — none quite as extravagant as Larry's blunders, but a few were real doozies nonetheless. For instance, Python originally had no lexical scoping. But it didn't have dynamic scoping either, and dynamic scoping may have its share of problems, but it at least sort of works. Python had NOTHING except for global and local (function) scope, so even though it had a "real" OO system, classes couldn't even access their own damned instance variables. You have to pass a "self" parameter to EVERY instance method and then get to your instance data by accessing it through self. So everything in Python is self, selfself, selfselfself, selfSELFselfSELF__SELF__, and it drives you frigging nuts, even if you don't mind the whitespace thing.


Thanks. I read the page and I still don't get it. You might use self.my_function() or self.my_variable. When would you see selfSelfself? Or is Yegge being a poet here?

Poetic license, yes.

And I have felt the same way, seeing "self" everywhere.

The best answer you will ever recieve on this question is, "it depends" -- no one can make the right choice for you.

It depends on what your experience you have. If you know Python, use Django. If you know Ruby, use Rails. I know Python, so I use Django. Since you have no experience with either, this one is moot.

It depends on what you're building. A lot of people on the net seem to take the position of "Django is good for content publishing sites, and Rails is good for web apps", but that has more to do with the applications the two frameworks were derived from than the frameworks capabilities. Realistically, anything you can build in Rails you can build in Django, and vice-versa.

Personally, I love Django. It lets me develop quickly and I know how to deploy it properly. I tried setting up Rails no more then three days ago (on Ubuntu), and it wasn't as much fun. I had issues installing the correct version of Ruby, and then Gems didn't want to work.

As for you, I'd recommend spending a few days with each framework. Get them both installed and just tinker around. Build a quick CRUD app. After that, you'll have a pretty good idea of which one suits you (and your needs) better

for some odd reason, the ubuntu packages for ruby/rails are setup in an overly complex way.

Yeah, I noticed. I'm tempted to try compiling from source, but chances are I'll end up in a worse hell.

Or maybe I'll setup a new debian slice to toy around with.

Thanks, I have followed the first few sections of each tutorial but really found it difficult to differentiate as to why one would benefit me over the other, but I guess the answer there might not be a reason, just preference.

So I can't really comment about Django. I have some Python experience and very extensive Ruby and Rails experience. My advice: choose based on language not on framework.

It's fair to say that Python is a more "general purpose" language in that it has more extensive libraries and is faster.

It's also fair to say that for people who are language nerds, those who enjoy the power and elegance of particular languages, the kind of people who dick around in Scheme, Haskell, Factor, etc., Ruby is the better language. It has more interesting ideas (expressional syntax, open classes, the best case statement of any language ever) and significantly more powerful metaprogramming and DSL capabilities.

Both languages have blemishes, let's call that a wash.

There are certain features, that really come down to personal preference. Ruby has mutable strings, python doesn't. Ruby has a complex grammar, and there are usually several (readable) ways to express the same thing: for exmaple:

  unless smelly?
and also,

  eat! unless smelly?
Python is very minimalist grammatically. Python has significant whitespace, Ruby doesn't. The grammatical maximalism/minimalism is the most contentious issue. I used to be a minimalist and I feel like I have seen the light, but I respect those who disagree.

Now when it comes down to web frameworks, I don't think it matters so much... What is Rails? It's an ORM, a powerful Routing layer, a bunch of helper libraries for doing views, and a mostly useless controller layer. As a very advanced Rails user, I use very few of the view helpers anymore. I kinda like the way Django does forms better than Rails, though I've never really used it. Rails does REST really well. To be honest, the best framework out there right now is Merb.

"I used to be a minimalist and I feel like I have seen the light, but I respect those who disagree."

so youa re not a minimalist now you mean?

If it were me, I'd say take a look at the Django stuff at http://www.7days7apps.com and then try and make one or two of them with Rails. Then take a look at one of the simple apps at http://raa.ruby-lang.org/ and try and do it with Django. Then go with whatever one makes you more productive.

What languages do you know now?

I like Python because it forces people to write code that is relatively easy to follow. Hell is other people's code. Python will help get rid of some bad habits you may have picked up from PHP (though Ruby might do this as well). As far as jobs go, I've seen far more Ruby web development jobs than Python ones, especially among startups, so it's definitely a language I'll be learning soon, but I think I'll still prefer Python.

Another plus for Python is that Django's documentation is excellent and free. From what I've heard, you have to pay for all the good Ruby books, and printed documentation ages poorly. Django's documentation is religiously updated to reflect new changes.

I host my sites on a Linode VPS. They did obliterate my VPS when my credit card expired which would normally make me never use them again, but I didn't actually lose any data and they're cheap. You get what you pay for. For DNS, which you'll need if you host off of GoDaddy, I use ZoneEdit, which is free for your first five domains. I've used up my five free ones, and when I removed one domain so I could add a new one, they told me that technically, only the first five domains are free, but they let it slide anyway. I'll definitely be sticking with them.

Java, C++, COBOL :(, and started teaching myself PHP to work on this site before I decided it would be in my best interest to implement it and learn with a framework instead.

Try CodeIgniter (PHP framework) then.

I love CodeIgniter but it seems development for it is quite slow (I don't know about now) which is the reason why I decided to fork it in the first place. Still I find the code quite elegant except for it's hackish workaround found in the core engine.

There are very few people out there who can offer objective advice based on experience with both frameworks. Most people can (at best) give biased advice based on experience with one of the frameworks.

That said, I've been doing all of my work in RoR and I'm very satisfied. The end-to-end toolset for Rails is pretty hard to beat.

The differences between the two are not important for most web applications. Python has been in style since google app engine came out - especially on HN; before that Ruby was more fashionable. Your question is basically "Which hammer should I use to drive a nail - claw or ball pein?" Either would work fine.

You're posting this problem to the wrong place. There are too many enthusiasts in the Ruby/Rails and Django camps for you to get a reasonably straight answer.

Instead of asking here, I suggest that you pick a subset of your project that can be put together as one program and try to write it in both Ruby on Rails and Django. When you've seen what's required for either, you'll then be able to go back and build the rest of the system in your framework of choice.

Being a Ruby / Rails guy - the job market for that talent is hot. Good Rubyists easily get jobs in the six digits.

That aside, this debate is like emacs vs vi. Get good at one, because in terms of productivity and getting things done it makes no difference.

There is no debate between ViM and emacs. Only one between emacs and disfigured fingers+convoluted thinking. ;)

go through the tutorial for both django and RoR and see how you feel about each one.

I have done that and for some reason the structure of Django seemed more logical and appealing for me, but I had hoped that there were bigger reasons/features/libs to push me into one direction rather than simply preference.

I will be using a hosting service so the ease of use in implementation is also a big issue, not just the framework itself.

I think you'll get more options for hosting with "claimed" support for Rails. Hell, you could even use http://heroku.com/

Personally, I chose django, but only because I was a python programmer before ror and django took off. If I were to do it again, I might look seriously at Pylons, as I consistently read good things about it.

Well both Python and Ruby can be easily hosted without ANY need for specialized hosting. Heroku isnt just a host. Neither is GooglesAppEngine or AWS.

True, but this wasn't really the case before mod_rails (Passenger) made it relatively painless to host rails apps on a shared server.

I deployed a smallish rails app on Dreamhost in about 5 minutes last night. My previous attempt to deploy on a stock SuSE/apache2 server took a few days of fairly dedicated prodding.

This is exactly what I did, and I strongly recommend it.

I learned more from launching a demo application in both (I used a blog and a poll as an example) than I could have by asking other people. I found what suited my tastes.

This is great from a beginner's stand-point, but might seem to realize that all web frameworks are basically code generators with a bunch of glue. Which, for 90% of the useless crap out there on the internet, is fine.

EDIT #2 DOWN BELOW: sorry for responding to the first comment but I ran out of edits for the submission and I wanted readers to know I made a comment for Edit #2 down below

I sick and tired of people not willing to give out more information for their apps, honestly is all likely-hood someone has either thought of it and did it or passed on it. And this especially goes for (web) apps that are for specific areas, unless you're planning on expanding your service for everywhere I doubt you're going to have a problem.

If your first impression with Python was good then why force yourself to something else? In my opinion Ruby on Rails is better, completely object-oriented, fast, and there are lots of documentation out there as well.

I am sorry that I do not want to give out specifics, but is there a certain issue that specifics would make that dramatic of a difference in? I know that no one has thought of this idea and ideally I would like to expand it into all areas and that is why I chose to refrain from giving details.

I should say that I have more concern over the framework itself rather than the language. It would probably be expected that Python would give off a good first impression because of its syntax.

There's a lot of momentum in parts of the Rails community away from Rails and towards Merb. Perhaps this is a factor you want to consider. Maybe you could gain some insights about Rails by learning how Merb is distinguishing itself.

Sorry to add an option.

One more thing to consider: Google App Engine is a nice platform that you can play with (for free!) and it's currently only available for Python.

Thanks, this is a good suggestion that I did not think of. It is nice to know that I can try working with Django without making a commitment to a hosting service

you may not get a full feel for django doing this. while you can use django on appengine, you dont get all of the features. for example, you don't get to use with django's orm, a pretty great feature.

its also worth mentioning that django has a development (wsgi) server thats simple to run and great for working locally, deploying globally:


At the risk of repeating, well, every other comment, I would suggest that you develop using whichever platform you enjoy. Hell, if you really love working in APL, you should do your application in APL. Because at the end of the day, you will be a happy and productive programmer. Which is far, far better than merely being a productive programmer.

I've tried both Django and Rails.

I tried Rails first as Ruby is a lot closer to lisp than Python. Personally I find Python a bit restrictive, but fairly easy to read.

If you don't have a lot of experience with Rails/Ruby, Django is the clear choice. It's very well documented and it just works.

I was able to get Django in the first 10 minutes of using it and after that over the next day most of the concepts became clearer.

I found with Rails, the lack of familiarity with some of the advanced Ruby features made it very difficult for me to read the code. So I was coding blind a bit.

Someone's done this already:


That link is a bad one but I found one that has all of the articles listed, http://www.vaporbase.com/rails-django

Thanks that is a great resource and will definitely read it to help with my decision, but after skimming he only speaks of installing on his iMac, and one of my main concerns is usage with a hosting service.

The main reason I asked this question is because I have more trust in hearing as many diverse opinions from this community as possible rather than a reliance on what a few individuals wrote on the topic. This community helped me so much on my last question and I hoped I could get a definitive result again.

I will make your decision very easy. I come from a long Java background and just start using RoR a few months ago. And guess what? I am hooked. Every feature and functionality that I want to put in there is already a plugin for it. If not, I can write one quite easily. The documentation could be better but there are plenty of books out there. I am not saying Rails is the ideal web framework but it comes darn close. If you want to get to market soon. I would say RoR is the way to go. Finally, if you are a stickler about writing test cases as us then the good news is that RoR comes with rich testing support.

As for hosting, Heroku is a good start.

I don't think it really matters that much. Both are solid platforms and either could be argued in favour of the other reasonably.

Rather than spending time on both though as some have stated, I think you're much better off just flipping a coin and digging in head first, fully commited, and concentrating on the more important thing... your app design.

One of the great things about full-stack frameworks like Rails and Django is that you don't have to agonize over all of the components, so why agonize over the framework itself?

Just do it. Switch for your next webapp if you feel like it.

Without specifics with respect to what you are trying to build we really can't give a very good answer.

Really answering this question comes down to what your application needs are and what you and others working on this application is most comfortable in. I prefer RoR, I can develop quickly in it - I've got experience with that technology but it doesn't mean it will be the best solution for you.

I'd take a look at slicehost for hosting, I think for something like this having full control of a (virtual) server is a benefit and a great learning experience.

The only reason I refrain from actually stating what the project details are specifically is because the idea itself is relatively simple, but part of an untapped market. I was hoping for more a pro/con type analysis. I am sorry for that, I was just hoping I could get some better indicators as to why I would choose one over the other without revealing what I am actually doing.

you don't necesarily have to describe the exact purpose of your site, just the technical details of what problems you need to solve and we can give you some details on the pros and cons of each.

I've been considering the same thing as you and I haven't reached any decision, but maybe I can add my impressions.

Ruby and Rails does seem to be better targeted for web development, both because (as some here have said) Rails is more meaty than Django and because there seem to be many more web development jobs out there requiring RoR.

Python on the other hand seems like a much better general purpose programming language, with a far richer set of libraries (ScyPy and NumPy on which Sage Math is based, bindings for wxWidgets and other toolkits etc)

How about Catalyst? Ruby and Python are nice, but sooner or later you're going to end up reinventing the wheel because there's no culture of writing libraries in those languages. Perl's syntax may not be perfect, but it's a wonderful language with all the features of Ruby and Python, but with 10000s of libraries and tons of production testing.

Catalyst is a framework that does what you want instead of telling you what you want. This means a steep learning curve, but more productivity in the end.

Regardless, it's a shame to ignore Perl.

Perl was the first programming language I really loved to work in, but I wouldn't consider writing something new in it today. I feel 80% more productive in ruby, and the code I write in ruby is much more readable.

One reason to choose Rails is that there are many excellent libraries. Want to have tags on your models? Just install acts_as_taggable_on_steroids... Though there's something to be said about the rails plugin & gem landscape being in very rapid development. (acts_as_taggable doesn't do proper caching so you have to dig around to find the better version etc.etc.) On the whole I think that there are really kick ass plugins for rails available.

no culture of librraries, your kidding right?

Sure, there are some libraries for Ruby or Python, but there's not the obsessive "i have to write a library omg" mentality like Perl's CPAN.

Like I said, Perl is far from a perfect programming language, but the community and CPAN make it all worthwhile.

EDIT #2 (Sorry I can't post above, I have used all of my edits)

I must say that I am pretty new to web development, so it is somewhat hard for me to determine both the feasibility and what will be needed to perform certain tasks, but people have asked if I could elaborate on what issues I will need to tackle, but please excuse me if these are unrealistic demands.

These are some of the things that I need to accomplish:

-Manage a numerous amount of small credit card transactions

-Create an algorithm that would self manage the database for certain areas based on date (delete data past a certain date or data that has expired)

-Allow the uploading of images, but also create thumbnails for those images

With regards to size, the application would focus on the area specific to where I live (so that I could market it easily with normal advertising methods), but scale simply by adding a new location (simply by cloning the first site and changing the location) similar to craigslist like I said previously.

Sorry if anything I had said does not make much sense or is unrealistic. I am new to web development and am trying to approach this in a very logical manner without wasting too much time.

transactions and db joins are easy with activerecord/rails, you do not have to know sql to get it to work.

background tasks are easy, you can use activerecord outside of rails in your data warehouse scripts.

image upload with thumbnails is trivial with attachment_fu plugin for rails.

You can also check out http://heroku.com for free RoR hosting and great new experience.

I personally have noticed more job ads for rails developers than django developers. Actually none so far.

http://djangogigs.com/ currently lists 90 jobs in the US and 34 in the UK.

Awesome, just awesome, thanks for the resource

not really django-specific but you can check


Yeah that was one driving factor, I am graduating soon and because RoR demand was high I figured that if this fails I could use the knowledge from RoR to get in with another start-up.

I am a designer and front end person and I have recently been jumping back and forth between Ruby on Rails and Django trying to figure out which is a) easiest for me to learn and b) works best in my projects.

Django seems easiest for me to learn in terms of general theory (the Model, View, Template makes more sense than Model, View, Controller in my head for some reason).

Both have a good number of resources, both are being updated very quickly. A lot of the issues I had with Ruby on Rails a year ago (hard to deploy) are disappearing now that it has matured a bit.

I haven't looked at Django, so I can't compare. I've used Rails on a few projects and I like it. I've coded for decades and Ruby is the most programmer-friendly language I've found.

For the amateur, it is easier to approach PHP and start banging around than to learn Ruby and Rails.

The Rails free docs just aren't as good as say, the free MySQL or the free Postgresql docs. Or as good as the MS .NET docs. But there are several good books. And both Ruby and Rails work as advertised, they aren't bug-laden.

Decide which fits more to your life philosophy: A framework that creates about 10 files and folders and wants you to change them to fit you needs, or a framework that creates 3 files with minimal code and you write the website using the provided libraries.

RoR functions like a skeleton you fill in. Django functions like a supporting pole on which you build on top of.

One is more flexible than the other, but the other constrains you less.

so which is which?

and how samething be more flexible and more constraining at the same time?

On the other hand, my use of Ruby on Windows/Linux at work have given me a quite different opinion. Especially if you are using Linux, I think Python/Django support is better than Ruby/Rails support. Of course, if you are using Windows, the support for both is quite frankly abyssmal, and you'd probably be better off going with a java-based (ick!) stack.

I written sites in both, and I think that you'll find that Django is easier to get started with, but Rails is ultimately a more powerful and flexible option.

I have a huge problem with the lack of focus on testing in the Django community though, so I'm somewhat biased.

Again, as many here have mentioned, we need to know more about your problem in order to offer an appropriate solution.

As to hosting -- try openhosting.com. $20 per month for a virtual server with root access. I've been a happy customer for the past 4 years. By the way, their founder is the guy who wrote 'mod_python'. They know a few things about open source and about servers.

Thanks, VPS service is obviously going to be a need, but is $20 somewhat pricey or normal for such service?

Cheaper than most for such quality.

I normally don't push products, but I can't say enough about slicehost.

It is very reliable, a great simple admin for adding dns entries, setting up backups for your VPS, etc.

Just another good quality option. Similar price I believe.

If you are going to use django, then you have the option of hosting at google app engine - apart from the bad side of becoming googles b*tch, it could potentially really save a lot of time and money for you managing a server setup.

One other thing. A lot of comments here seem to be trying to say that Ruby's syntax is hard to read. I don't know, but every time I see a real world app written in Ruby, I find it to be succinct and beautiful, and most importantly, easy to read/understand.

In my experience, for a typical website with a database backend, Rails is better. For more serious engineering where you do things yourself, Python is better than Ruby (in this case the framework is not that essential).

They are both great choices. Basically, it doesn't matter.

If you already know Python - maybe Django would be better.

Also, Django has geo-django, if you think you might be geo-coding things - this is great, and built right in.

I expect that ruby has something similar??

Check out acts_as_mappable aka GeoKit.

One of the reasons we're happy with choosing Ruby/Rails is rspec, as far as I know there is no equivalent for Python.

The way I see it -

1. Ease of use - Both are close but Python is just a wee bit ahead because its beautiful.

2.Libraries - Python wins

3.Frameworks - Its a draw if you have use for Django and RoR type frameworks. Python clearly wins if you need Pylons type stuff.

4.Scalability - Python wins.

5.Popularity - In sheer numbers Python is clearly ahead.

I would suggest Python but I don't give a rats ass if you went with Ruby.

Just remembered, Python benefits from the WSGI 'standard'.

Both web frameworks will help you rapidly create a web site, so they are approximately equivalent (though not exactly, of course.) So also consider the language you'd be using. Look at Ruby and Python, and see which you prefer.

I personally prefer Python's syntax and style, Python has many more libraries and it's been around longer than Ruby, and I've noticed that among "top" tier coders they tend to prefer it over Ruby. (Not all, but most.) But Ruby has many strengths, and can do a few tricks that Python can't, to it's credit. Python apps tend to execute faster than Ruby apps. It appears to be easier to scale up Django/Python apps than Ruby/Rails apps, though a lot of the same techniques can be used for both since they're language/framework agnostic (using a clustered architecture with a scalable number of server nodes, caching aggressively, choosing good algorithms, etc.)

I was at the same decision point over a year ago, did both tutorials, and decided I needed to focus more on the languages to help break what might otherwise have been a tie. With either framework you'll be a lot better off than the typical "web COBOL" stack: Java + Servlet/JSP + XML.

Main differences:

Django doesn't have good support for testing. Rails does.

Django doesn't allow clean separation between business logic and presentation logic, forcing both into its "views". Rails does.

Django doesn't have migration and deployment system. Rails does.

Rails is stable 2.0. With Django you have to use SVN+QuerySetRefactor+NewFormsAdmin+YourOwnHacks branch to get anything done. It's not documented anywhere (and not using svn+qsr+nfa+yoh is highly discouraged by django devs).

For me Python vs Ruby was really a tiny issue compared to these four. I like Ruby marginally more but Python was never painful to me, Django is.


"Django doesn't have good support for testing. Rails does."

You use the same standard doctest & unittest framework that any Python app would. Django even provides built-in support for dedicated test databases (autogenerated, and auto-cleaned-up after a test run) and a simulated web browser. Starting a Django project creates a dedicated 'test' directory that the Django testrunner looks in for test discovery. What more are you looking for?


"Django doesn't allow clean separation between business logic and presentation logic, forcing both into its "views". Rails does."

If you're doing it right, you should never be putting business logic into views. It should go in your model classes, as instance methods (for more global functionality, you can define a custom Manager and put your methods there). Django models are more than just dumb containers for database fields: you can add whatever intelligence you want to them.

"Django doesn't have migration and deployment system. Rails does."

I'll grant you that. There've been a bunch of 3rd-party efforts and some interest within the core Django team, but it's still nowhere near as mature as Rails Migrations & Capistrano.


"Rails is stable 2.0. With Django you have to use SVN+QuerySetRefactor+NewFormsAdmin+YourOwnHacks branch to get anything done."

QuerySetRefactor was merged on Apr 26.


I've heard NewformsAdmin is supposed to be merged soon (before 1.0) though I don't know of a target date.

This is unfortunately one of the problems with using pre-1.0 software, and if it's important that your software doesn't change, Django may not be for you. I've had very good luck simply avoiding the functionality that's under heavy development though, and the Django devs are very good at specifying what that is. I don't need the customizability of NewFormsAdmin, and QuerySetRefactor was largely an extension to existing methods.

> Django doesn't allow clean separation between business logic and presentation logic, forcing both into its "views". Rails does.

Django isn't a traditional "MVC," so "views" in Django have a different meaning. In all reality a Django "view" is the "C" in "MVC," and the template is the "V." I'm afraid I fail to see that point.

I also fail to see your point about SVN+QuerySetRefactor... as I've never used either branch and have gotten everything done that I've needed to. There will come a time when that stuff gets merged back into trunk and I'll have to do some conversion, but traditionally it has been very minimal (see: old school MagicRemovalBranch).

Please do a similar comparison between Pylons and RoR. And you will see the light. :)

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact