views:

590

answers:

10

Ruby on Rails has made a rapid rise as decent language for webdevelopment. How does it compare to other languages in that area (PHP, Perl, Java, VB.NET, ...) from a webdevelopment perspective? Will the number of sites programmed with Ruby keep rising or has its popularity brought up issues that may keep it from becoming a keeper (eg speed, scaling ability).

Please no flame-war. I'm interested in hearing opinions on why Ruby would be a good language of choice to learn for a webdeveloper or why other languages are a better option.

If Ruby vs ROR makes for different arguments, I'm interested in hearing them as well.

edit: Thanks for all answers. Topic seems to be closed. The references are useful. Also some interesting personal experiences from that specify why they think Ruby will keep growing.

+1  A: 

I think it will continue to do very well in the smaller companies, but I don't see it breaking out of that circle for a while. The enterprise is pretty locked into solutions that have strong vendor support. .NET has Microsoft, Java has Sun Microsystems, etc.

It's certainly a good language, but I don't see any Fortune 500s using Ruby on Rails any time in the near future.

Andy_Vulhop
+1  A: 

These kinds of questions tend not to go well...

As a Rails developer, I sure hope it's here to stay. I also believe it will stay, based on the growing strength of its open source community.

cgyDeveloper
As Ruby is already 13-14 years old, I don't think you need to worry about Ruby itself.
bart
Good point, I need to stop interchanging the term Ruby with RoR. I took the question to mean is RoR here to stay, which is what I believe he meant.
cgyDeveloper
+1  A: 

I think it is here to stay, it has been around for a couple of years, but is now becoming very mature as the most common issues we used to have are being solved. The upcoming version, 3.0, will have much better threading support and performance. And the IDE problem has recently been solved with rubyMine which is at least as good as IDEs for java or .NET.

To me, the main advantage over for instance PHP is the much cleaner syntax and real OOP. Hosting used to be a bit tricky, but there are lots good shared hosting solutions, just google rails hosting.

Arthur
+7  A: 

Probably 80% of the Java Web applications could have been built more efficiently in Ruby on Rails. The other 20% wouldn't have worked in Ruby on Rails at all. Probably 90% of the PHP applications I've worked on would have been better had they been built in Ruby on Rails. Maybe 100%.

Now that the Ruby on Rails hosting situation is becoming significantly less cloudy, the number one barrier to entry for Rails has been removed (at the low end). The only two things to keep Ruby on Rails from taking some bites out of the PHP market are knowledge of Ruby and inability to grasp the MVC architecture.

Ruby on Rails may make some incursions into the enterprise (as PHP has), but its primary area of growth will continue to be cutting into PHP's market share.

Rafe
Can you elaborate on your claim that a lot of Java and PHP applications could have been built more efficiently in RoR? What exactly would have made it more efficient in RoR?
koen
Just because a web app is written in straight PHP does not mean it would be better written in Ruby on Rails. Sometimes PHP is so darn ugly because the language inherently is, yes, but sometimes the PHP apps you find would be much improved if some PHP framework was used, and not necessarily if it were converted to a RoR app.
Sarah Vessels
PHP still suffers in terms of elegant ORM implementations. Also, the flexibility of Ruby compared to PHP makes it easier to write a cleaner framework with fewer sharp edges in Ruby than with PHP. I like some PHP frameworks fine, but they still get in your way compared to Rails.
Rafe
+16  A: 

I'm interested in hearing opinions on why Ruby would be a good language of choice to learn for a webdeveloper or why other languages are a better option.

Ruby is not a web development oriented language but it is a full programming language. This is an important difference to keep in mind because, this details can lead to major confusion.

Under this point of view, it's hard to compare Ruby with other web-centric languages such as PHP. If you want to learn a web programming language, PHP is probably the best choice available right now.

If you want to lear a full programming language that can be easily ported on the web, then Ruby has some interesting features. Last but not least, the Rails framework is well known to be the most important MVC web framework. Learning Ruby to use it withing the web boundaries it's (IMHO) a waste of time.

Ruby such as Python or Java, is an excellent choice when you need the power of a full programming language in conjunction with an easy to use web portability.

I don't want to tell you Ruby is better than X or Y. I don't think this is the best approach. Instead, you should ask yourself: is Ruby what I need? Here's some interesting resources that can help you to find the answer:

Martin Fowler's article is probably the resource that most answer your question. Here's a remarkable paragraph:

Was Ruby the Right Choice?

When looking back on our 41 projects, perhaps the most important question to ask is whether the Ruby platform was the correct choice. One way to approach that question is to ask technical leads on the project whether, in hindsight, they think the choice was correct.

As Figure 4 indicates, the vote was a very positive 36 to 5 support of the choice. As a group our technical leads are usually not shy of indicating if they are unhappy with a technological choice. So I see this as a firm statement of the viability of the Ruby platform as a reasonable choice.

I dug a little more into the five regretful projects. The first thing that stood out was that in four of the five cases, the leads felt that using Ruby wasn't a worse choice than the alternatives. Ruby's relative unusualness means that we feel that using Ruby has to come with a benefit over alternatives, if Ruby is the same as a more widely used option, then it isn't worth introducing the unusual technology. Four of the five also reported problems due to integration with other technologies that Ruby isn't as well suited for. .NET tools tend to integrate better with .NET technologies, for example. Another theme that two of the projects reported was social issues - that people in the client organization were opposed to Ruby or other dynamic languages. The one worse-off project showed these social problems - an IT organization that resisted Ruby tooth and nail (the business sponsor in this case was a Ruby fan).

Indeed when I asked further about red flags for using Ruby in software project, the only clear answer was around social issues. Ruby was generally accepted or encouraged for our software development work, but the biggest sign to avoid it was a social resistance from the client.

Talking about Rails, there's an interesting article called Why Ruby on Rails won't become mainstream, written in 2006. Two years later the same author wrote a follow-up called Has Ruby on Rails become mainstream? Both the articles provide some interesting details about the evolution of Ruby on Rails, analyzed in two different time-period under the same point of view.

Simone Carletti
+1  A: 

It has an awesome learning guide, Why's (Poignant) Guide to Ruby, and that's enough for me. I would have never given Ruby a chance if it weren't for that guide. So amazing.

Sneakyness
+4  A: 

In my opinion Ruby on Rails (because I guess you're talking about rails) is here to stay, here's why :

  • The project is moving forward with the merge of Merb and Rails into Rails 3.

  • The community is active.

  • It's MVC, meaning applications are easier to maintain.

  • Rails becomes faster and more scallable as time pass.

  • Rails becomes easier to deploy thanks to projects like mod_rails.

  • It starts being used a bit more in companies.

But I'm also thinking that people that will try rails will have trouble going back to another way of doing things (aside from Rails-like frameworks such a Django or CakePHP). It just changes the way you see programming.

Personally since I started working with rails in 2004, it changed everything. I discovered that web development could be fun, fast and awesome. All the people that I introduced to rails (and it's a lot of people now) all reacted the same : "Wow, why can't {technology they were using} be more like this? When I try to do {simple rails function} it usually take me a day and you did it in 5 minutes !".

So to answer your question, I do think that it's here to stay, at least for a few years (every technology will be deprecated at some point). But I don't think that it will be widespread because it is too complex for some developers (creating a basic PHP app can be done by anyone, understanding the rails MVC logic takes more time) and because companies are afraid of change.

EDIT: Regarding just Ruby, it's been around since 1995, so I think it's pretty solid by now

marcgg
+1  A: 

Ruby on Rails isn't a language, it's a framework. So is RoR going to stay ? Well I think so, I'v got no proof, but I'm pretty sure it will stay as reference. It might not be used by big companies but it's still used by Web and small company.

Now for Ruby, no need to either ask the question it's here since some years and a lot of people use it, and not only for RoR (where PHP is almost only Web Development).

Ruby stands equal to python (almost, because the Python community is still bigger).

Yoann Le Touche
+2  A: 

Ruby (the language) has been around for over a decade. I don't think that the "staying power" of the language itself is in doubt at all.

As for Ruby's use as a language for web development... That's a different question. There are many different language choices for web development, and which ones are options that are available to you will vary by the companies that you choose to work for. There are also multiple different choices for web development frameworks for each and every language, and the frameworks seem to wax and wane in popularity much more than the languages themselves.

As a Java developer turned Ruby on Rails developer (almost 4 years ago now), I can safely say that I would NEVER choose Java as the primary language for developing a web application at this point. It is just too painful in comparison. Does Java still have stuff to offer? Absolutely. There is some stuff you just can't do with Ruby/Rails. If I needed to interoperate, JRuby is a great choice.

IronRuby in the .NET world is coming along, but is not at the "industrial strength ready" stage that JRuby has reached.

You should also take care not to read the arguments about speed and scalability too literally. Most of what you hear is FUD spreading. Rails will scale one hell of a long way before you start running into issues. And it will do so in a manner than is insanely simpler to deploy/manage than your average Java app. In the Rails app I have been building, I have serious latency issues (remote DB), and yet still people comment on how fast it is, all the time. Speed is relative, and a well-crafted user interface will trump a few extra micro-seconds every time.

In the end, it's going to be a subjective choice. Just make certain that you carefully consider both what YOU WANT, and what you are likely to get paid to do.

wndxlori
+1  A: 

All languages and frameworks have growing pains. A lot of the knocks against Ruby and RoR in particular is scaling and speed. As the popularity grows these issues will be dealt with (they already have been in many cases).

As a longtime Java developer, RoR is a breath of fresh air when it comes to doing easy and medium-difficulty webapps and that alone will ensure its continued success. I haven't used it for anything really large and sprawling but I know it is being used in that arena and like everything else, people are finding issues and solving them as time goes on.

The TL;DR answer is: Yes.

MattC