Is Ruby on Rails a Crown Jewel?
Ruby on Rails has established itself as one of the favorite development environments for Web developers. As it expands into the universe of mobile devices, tablets and other platforms, the question arises whether Ruby will displace other development languages and environments. We spoke with Ruby on Rails founder and CEO, David Heinemeier Hansson, to examine its cross-platform prospects.
Q: With tons of options for Web development, why is Ruby on Rails so much more popular than Java or Python?
David Heinemeier Hansson: I think Ruby on Rails struck a chord with lots of developers for a number of reasons. One, we started from day one with the concept of a full-stack framework. You don’t need to go through a long evaluation process of dozens of different frameworks to figure out which database mapper to use, which template language, etc. It’s all in the box.
Two, Ruby is a big step forward in terms of pleasurable development compared with Java, PHP and many other old-school platforms. The language itself is simply a joy to use, and it didn’t take long for people to recognize that. You simply have more fun and you’re able to be more productive using Ruby than most other mainstream programming languages.
Three, we have critical mass. The Ruby on Rails communities took a while to grow, but now that they’re here and in great numbers, it’s a self-accelerating process. People pick Ruby on Rails because other smart developers have picked it. Thus, you attract more and more people.
When you combine those three factors, you get something that’s a material step forward compared to other mainstream platforms -- and very appealing.
Q: Each of these platforms has its own unique set of requirements for memory footprint, performance, form factor, security and so on: embedded devices, mobile devices, multicore, parallel programming, high-performance computing and cloud. How suitable could Ruby on Rails be for each of these?
D.H.H.: I deal mostly with Web programming, which spans mobile, multicore, high performance, and cloud, and I believe it’s a fantastic fit for that. A few years ago, before people were educated on the alternatives, there was a big hoopla around Ruby’s then lack of green threads. It turned out to be largely a nonissue as Web applications work great running as separate processes instead of threads. So we’re able to take advantage of all the cores you can throw at it for concurrency, which in turn gives you access to basically unlimited throughput.
Yes, there are still hotspots in certain applications where it can make sense to use something else. But 99.9 percent of all applications written will never arrive to that point. It is far more important that you spend your time creating a desirable application as fast as possible than trying to preemptively worry about what will happen if you’re in the 0.1 percent.
Q: Is the Ruby on Rails runtime performance and memory footprint competitive with development in languages such as C++?
D.H.H.: Definitely not, but for a very large class of problems, that doesn’t matter. Most applications fail or succeed not on the basis of how much memory they use, but on whether users are interested. It’s far easier to iterate your way from early prototype to something users are interested in if you’re using a platform like Ruby on Rails. The fruit of progress is that we can choose to talk about more important things than memory pointers .