What's the difference between Ruby on Rails and Python?
March 2, 2009 1:22 PM   Subscribe

What's the difference between Ruby on Rails and Python from a non-programmer's perspective? Are there advantages or disadvantages I should be aware of? I'm working on a project that needs web dev help, but I'm just a designer with no clue between the two.
posted by ckohrman to Computers & Internet (10 answers total) 5 users marked this as a favorite
Ruby on Rails requires more server overhead - in fact, if you're using 3rd-party web hosting, you should be aware that not all web hosts have it. Python is more universally available.
posted by amtho at 1:32 PM on March 2, 2009

Well, the surface-level difference is that Python and Ruby are programming languages, while Ruby on Rails is a framework for creating web applications in the Ruby language. Some frameworks for Python are Django, TurboGears, and Pylons. That probably doesn't help you that much.

If this is going to be a long-lived project, you will probably be interested in how easy it will be to find replacements for whoever you hire/recruit (I can't tell whether this is a commercial or volunteer project from your question). To answer that, in turn, you'll need to know whether you want someone local, in which case it depends on where you are, or whether you're going to farm this out over the internet, in which case you can get people to program in any language, to variable standards of quality.

So, it depends.

As far as technical differences go... eh. Competent programmers can build good web sites in Python, Ruby, PHP, Java, etc. Incompetent programmers can build bad web sites in Python, Ruby, PHP, Java, etc. If you are not familiar with the tech side and are not going to be learning programming for this project (i.e. you are getting someone else to do the programming) concentrate on finding someone competent, trustworthy and professional, and get them to develop the technical specs for you.

If this is a very small project and you want to pick up just enough web programming to do it yourself, then I misunderstood your question.
posted by pengale at 1:36 PM on March 2, 2009 [2 favorites]

Both Ruby and Python are programming/scripting languages. Python has been around longer than Ruby, but they're both capable languages.

Ruby on Rails is a web framework, which uses Ruby as its language. Rails is pretty much the web frame work for Ruby, but there are several built on Python. Django is one popular Python framework.

If your project calls for a web framework, probably Django or Rails would work. Rails has a lot of momentum and mind share at the moment, so—technical merits aside—you may have an easier time finding Rails developers.
posted by paulg at 1:38 PM on March 2, 2009

As a designer, you may be more interested in the way the selection of language (and of developer, which is a more important selection as pengale points out above) impacts your design work. Pylons and Django are mentioned above; for both Ruby and Python there are many HTML and CSS templating systems. When you're talking to a developer, ask about preferred templating tools, and then go look them up and evaluate them on your own. If this is a database-driven project that you intend to maintain without the developer in question over a longer period of time, you're going to need to learn whatever ORM tools are used.
posted by doteatop at 1:41 PM on March 2, 2009

Rails can be compared with another web framework, like Django for python. Here is a series comparing Rails and Django.

Assuming you want to do this yourself, I'd recommand Django for a non-programmer because of its "no magic" design philosophy. Most things that your app do are spelled out in your code. Rails, by contrast, is "convention over configuration", and encodes these conventions in file names and method names. Both frameworks should be self-contained, unlike others like TurboGears that are stacks of interchangeable components.
posted by Tobu at 1:58 PM on March 2, 2009 [1 favorite]

As folks above have said, Ruby-on-Rails and Python-with-Django are two very similar things. They're both scripting languages with web programming frameworks. You could ignite a nerdcore war debating which of the two is better, but honestly either is probably an OK choice right now. Rails is more popular at the moment. You should pick the developer you really like.

If you're building a high traffic website, one that's handling 500,000+ requests a day, you should also consider a more robust platform like Java or .NET. Django and Rails both benefit from being quicker and more fun to work with.
posted by Nelson at 2:17 PM on March 2, 2009

Can I ask the basis for the question?

Really in the hands of a skilled user both RoR and Python/(You pick the framework) and PHP (unmentioned but relevant) are excellent tools for building a website. All of these are also relatively ubiquitous so finding developers for them would be fairly easy. Each have tradeoffs with respect to speed of development/ease of knowledge transfer/site scalability but they are relatively minor (unless you're building a massive user driven site where scalability issues would be magnified)

If your question is really "which type of developer should I look for" I'd make looking for someone you think you can work the best with and with top-notch references is a much more relevant factor then the language they choose.

A few caveats - with a PHP or Python developer force them to use an established framework, this eases transfer if you need to find a new developer.

* CakePHP
* Symphony
* Code Igniter
are all good for PHP

For Python
* Django
* Turbo Gears
* Pylons

finally; "Ruby on Rails requires more server overhead" Mod_rails has pretty much made this statement obsolete.
posted by bitdamaged at 2:48 PM on March 2, 2009

Response by poster: What I gather so far, then, is that while Rails is more popular right now, both Rails and Python (Django, etc) are reliable frameworks to work with. In response to requests for clarification, the project will be a long term, high traffic site. I want to plan for scalability now. The project is commercial, and I will initially be hosting the site on a third party server.

PHP was mentioned. I have some familiarity with that working with Wordpress... Is it realistic to create a high traffic site just with PHP, or should a framework still be used for performance / development benefits?

Thanks for the answers so far. I think I'm getting a much better understanding.
posted by ckohrman at 5:53 PM on March 2, 2009

All of these have difficulties with massive scale, but Facebook was originally, and still uses extensively PHP. Twitter was originally RoR - but I think little of it is now. Really RoR (or any framework designed for building a traditional website) was actually a very bad choice for that site. All of these frameworks have high traffic sites using them but at some point you just reach a point where it becomes difficult.

Don't worry too much about scaling these now - make sure your developer has some experience scaling sites in whatever language he/she uses and that should be enough.

Frameworks don't bring performance improvements generally - in fact they may add overhead that negatively effect performance. What frameworks bring is a lot of code that can be used "out of the box" or plugged in. They speed development (leaving more time to deal with scaling issues!) and make it much easier to bring new developers up to speed. My primary experience is with RoR and it's got huge chunks of functionality that can be added via plugins very quickly and easily - rarely do you have to write something from scratch, most of your work is making use of code other people have written.
posted by bitdamaged at 8:19 PM on March 2, 2009

As a programmer and architect for large scalable web applications, I've worked reasonably extensively with ruby and python. They are similar only at the most superficial levels (they're both sort of objecty interpreted languages and they're both turing-complete), but once you get into the details, there are actually a large number of differences. It's true that a good programmer can learn to use both of them, but someone who's great at python will just sit down and try to write python code in ruby. They'll be able to make it work, but it won't take advantage of the strengths of the language in the same way.

The more I do so on both sides, the more I like ruby and loathe python, but pretty much all of the reasons why are things that only a programmer would care about, so find a programmer who cares and take their opinion about it. If you don't know enough to make this decision on your own and don't have someone else who can (i.e.: an opinionated developer/architect with experience scaling large web applications) who's working directly with you, you're in for a world of hurt anyway and it won't matter which way you go.
posted by Caviar at 8:03 AM on March 3, 2009

« Older Name this nordic ski binding system   |   Are freight trains replacing long haul trucks? Newer »
This thread is closed to new comments.