Creating More Using Less Effort with Ruby on Rails

by Michael Slater

25 Reader Comments

Back to the Article
  1. Rails articles constantly make this mistake: they tell you how great Rails (framework) is by comparing it to PHP (language). This article seems to be no exception.

    All though I agree that Ruby is an awesome language and that Rails is a pretty cool framework (they are my preferred tools), I think alot of developers who already know PHP would probably be just as well off with something like Symfony, which is basically Rails for PHP (or CakePHP as you mentioned, haven’t used it).

    Same thing for other languages: MVC frameworks Rails-style is popping up all over, and even though Ruby brings alot to the table, you can be very efficient with these kinds of frameworks for other languages as well.

    Copy & paste the code below to embed this comment.
  2. I did quite a bit of RoR research for a website intended for a client.  I found the language’s elegance and simplicity very refreshing, and once I’d got my head around the Ruby language, I found things to be quite natural.

    It was good to see that this article contained some of the negatives of the framework.  Many people point to the performance argument, stating that it is too slow for larger sites, but there are many examples where it has worked.  I was also interested to hear of the some of the big names on the web (Amazon, eBay for example) taking a large interest too.

    Copy & paste the code below to embed this comment.
  3. Might as well go the whole way and get continuations going! www.seaside.st

    Copy & paste the code below to embed this comment.
  4. I’ve been looking for more information on RoR and these two articles provided me with exactly what I was looking for. I was deciding whether to expand my PHP knowledge or delve into Rails.  I have already started to increase my understanding of PHP, however, after reading this, I will certainly start to learn rails sooner rather than later.

    Copy & paste the code below to embed this comment.
  5. Really awesome introduction into what RoR really is. I’ve been struggling these past few weeks trying to learn more and more about CakePHP, and this article definitely cleared a few things up pertaining to the MVC methodology of web development.

    I wish to pick up RoR soon, but probably will stick with a PHP framework for now.

    Copy & paste the code below to embed this comment.
  6. I’m ecstatic to see the negatives presented. I haven’t deployed any RoR personally, but I’ve worked on several sites, and found it to be a real mess. Requiring 200 mb of Ram to simply run a small site for a small audience is not appropriate, and the vast majority of articles I have read on RoR gloss over this.

    The size & scope of my work means I probably won’t ever use RoR: it’s not worth learning it, to me, because my average client isn’t going to spend the money on the VPS required to run it.

    It’s still a nice, elegant framework, and I wouldn’t complain if I ended up working in it, but right now it just doesn’t seem feasible.

    Copy & paste the code below to embed this comment.
  7. One on the things I love about Rails is how it has popularised well structured code for the web developer community.

    PHP, much like HTML, can be written as shambolic or as elegant as you wish, with the latter becoming more prevalent—following the same cleanup crusdade that the “web standards” movement had on HTML.

    I really like Rails although I think there’s a missed opportunity with it currently: the ability to have a set of well structured, inter-locking modules (content updating interfaces, blog, shop, etc) so that each project done by the millions of people out there doesn’t duplicate a lot of their work.

    SilverStripe solves that issue, and is written in the easy-to-host language of PHP5.
    See http://www.viddler.com/siggy/videos/1/ and http://www.silverstripe.com

    Copy & paste the code below to embed this comment.
  8. I’ll be brief Ruby has nice features.

    Mongrel ( the de facto Ruby on Rails Application server) does not The link below is from the head Mongrel developer.

    IMHO he must be smoking some serious stuff to even think this is worth using in production.

    http://www.zedshaw.com/rants/rails_is_a_ghetto.html

    Outside of that perl is better suited and more mature for general purpose coding. Stay far away from RoR unless you are willing to deal with a new language and a new framework.

    Copy & paste the code below to embed this comment.
  9. In my humble opinion, Ruby on Rails is not quite 100% there yet.  It’s best-suited for that “sweet spot” mentioned in this article, but even then there are drawbacks and complications, such as hosting, that come into play.  And this type of problem is dramatically magnified if YOU are the one maintaining the Web server.  :)

    The constant comparison of Rails to PHP is also getting old; it’s like Hilary vs. Obama.  If Rails could stand on its own without having to try to downplay PHP’s “less elegant” ways, it would spread much faster.

    Anyway, I built a few Rails applications for a few clients.  I really like Ruby on Rails (it’s some of the most fun I’ve had coding), but PHP, for now, is just the better solution for 99% of the tasks out there, so I’ll stick with it.

    Let Rails take a few more steps, and we’ll start seeing it become more prominent.

    Copy & paste the code below to embed this comment.
  10. Christian, I appreciate the difference between languages and frameworks, and I’ve tried in this article to be clear about this. Most PHP apps are built without a framework, so there is some meaning to comparing a PHP app to a RoR app. As I noted in the article, there are indeed MVC frameworks for PHP, and they are far better than using PHP without a framework.

    But I don’t think PHP is as good a language for writing object-oriented programs, and it just isn’t possible to build a framework that fully matches Rails without the metaprogramming and object features that Ruby has. The differences probably aren’t consequential for small apps, but as apps grow in size, they become more important.

    If you want to leverage your PHP skills, frameworks such as CakePHP are a good solution. But I believe that Rails is even better, once you invest in climbing the learning curve.

    Copy & paste the code below to embed this comment.
  11. Micheal, i’m interested in your thoughts about DHH’s comment other platform/languages.

    http://www.codinghorror.com/blog/archives/001065.html

    i can’t comment on RoR simply because i’ve only used php/asp.net. however, i’m not quite sure if RoR is a fad or it’s going to stay here for the long term. DHH’s tone certainly didn’t help.

    Copy & paste the code below to embed this comment.
  12. Mark S., I don’t know what the issues are you have with Mongrel. It is by far the most widely used app server for Rails, and is used in sites that deliver hundreds of millions of page views a month. Do you have any specific criticism to make?

    Zed’s rant is amusing, but I’m not sure it’s relevant. Zed wrote Mongrel, and he’s a fine programmer. Clearly he has become angry and feels alienated from the Rails community. I don’t know what all was behind that, but I’m pretty confident it has more to do with interpersonal issues than with technology.

    (To those of you who have no idea what this is about, read the article linked in Mark’s post and make your own assessment.)

    As for Perl, it is a fine language in the hands of skilled programmer for system hacking, but I don’t think you’d find many people recommending it for building substantial web sites. If you don’t like Ruby, Python is probably the best alternative.

    Copy & paste the code below to embed this comment.
  13. JY, David (DHH = David Heinemeier Hansson, the original developer of Rails) is an opinionated guy, and he can undoubtedly piss off people who don’t like his views.

    The article you point to is mostly about Windows vs. Mac as a development platform. I think David overstates his points, but I have to agree that the Mac makes a better development platform. Ironically, this has little to do with the Mac’s vaunted usability, and everything to do with the fact that underneath the skin, the Mac is Unix.

    Because Unix lies just below the Mac skin, it’s a lot more compatible with the software that runs on most Web servers. Most Ruby developers use Macs or Linux, so everything works on those platforms, but there are things around the edges that no one has bothered to make work on Windows. You can make (almost) everything work on Windows, but it’s more trouble.

    I’ve used both platforms extensively. I was on Windows for most of the past decade, but switched back to the Mac early this year. There’s “lots of good things”:http://blog.buildingwebapps.com/2008/1/31/back-to-the-mac and some “not so good things”:http://blog.buildingwebapps.com/2008/4/12/macbook-pro-frustrations about the Mac.

    In any case, all the stuff about Mac vs. Windows really has nothing to do with Ruby on Rails. And David doesn’t act like an evangelist, because that’s not a role he wants. He built this technology for himself, and for others who share his views. If you like it, great. If not, he’s happy for you to use something else.

    Copy & paste the code below to embed this comment.
  14. Recently there was an Apache module released called “mod_rails”:http://modrails.com/ that makes it very simple to deploy Rails applications. It’s a great alternative to Mongrel.

    Copy & paste the code below to embed this comment.
  15. Coming as I do from a Java background to web design and development I have found that the Grails framework (http://grails.org) is more natural fit for me than RoR. The advantages to me are that I can re-use all of my existing Java knowledge.

    The more general advantages are that Grails leverages a lot of existing infrastructure and frameworks in the Java space. It is suitable for projects with existing databases due to its support for the Hibernate OR mapping framework. It also leverages many existing Java application servers meaning better relability and up time for customers.

    Copy & paste the code below to embed this comment.
  16. “The complexity of Rails can make it hard for a beginner to get started.”

    So it’s not like PHP which is very easy to start coding small scripts with? Isn’t the whole idea of RoR its simplicity, not complexity? Or is it only simpler once you have mastered the whole package?

    I love PHP as I can only learn what I need to get a task done, and the syntax is easy to learn.

    Copy & paste the code below to embed this comment.
  17. The comparison is fair, I think. PHP is essentially a templating language, and you won’t find many people writing Ruby web apps from scratch. But PHP gets the benefit of the doubt initially since it can be further extended with the many available frameworks. Clearly, Symfony, CakePHP, etc. are closer to Rails for comparison’s sake.

    For those who haven’t, I recommend this article: http://terrychay.com/blog/article/php-ruby-evil-good.shtml

    From the article:
    “I used to tell people that Ruby is where Java developers went to lick their wounds after getting schooled in the first boom by an ugly POS language like PHP. They had dreams of Ruby on Rails rising up like a phoenix from the ashes of J2EE and teaching these (often) drunk PHP developers that Web Development can be just like the Ivory Tower that taught them Java (or Ruby)”¦and justify their overpriced salaries.

    Oh yes, I’m on to you. If Derek had written this article two months earlier there would have been nary a peep out of you.

    Why?

    Because I was wrong. The J2EE developers are still around; We’ve just added a bunch of high school “entrepreneurs”? to the mix. And they’re finally back from summer camp to lecture us on how to run a “real-world”? website.”

    For the record, I don’t think Rails is particularly viable for any but a small group of developers. Its stack is far too large for small projects, let alone on shared hosts. Its scalability issues make it unfavorable for large projects as well. So Rails really only fits well for developers who want to build a medium-size project with the associated overhead of a large project, but who don’t expect stupendous growth.

    Copy & paste the code below to embed this comment.
  18. By the way, my last post may have been unclear. The final paragraph is my own opinion, and the second to last paragraph is the last one that I included from the linked article.

    Copy & paste the code below to embed this comment.
  19. Thanks ALA. I have read both articles today and will definently be giving ruby a bash. But as i’m also learning PHP, it makes sense to keep an open mind and give both a try. I have the time to learn both, so why not. The only concern i have with ruby is the restrictive hosting.

    Copy & paste the code below to embed this comment.
  20. Mongrel

    1. The restart issues are real I have seen them first hand. No reasonable application frame-work should have to be restarted this often. Look on rubyforge for monitoring apps. if ROR was so well written why the hell are there like 20 some odd monitoring apps for ROR and Mongrel.

    2. The idea of running a cluster of mongrel instances on on a single host, is garbage. If Mongrel_cluster was designed to be setup this way they there should be a simple way to restart each instance and not the entire cluster. This is not the case.

    3. Your comments on Zed’s rant “. Clearly he has become angry and feels alienated from the Rails community.” Last time I check Mongrel biggest consumer/abuser is the ROR community.  What will you all do when he decides to stop coding in Ruby ?

    4. Ruby the language, has issues. Its a fork of perl and still has major issues with threading support like perl. Any no running it on OS X vs Linux vs FreeBSD makes no difference .

    5. I think web developers should stop looking for “Magic Beans”. While ROR has a great rapid application development framework for people who have not coded before; it will not prevent you from making very crappy code. It in my head is like writing banking software in LOGO

    6. Why not look at Apache Struts , Cocoon or MyFaces
    http://wiki.apache.org/myfaces/FrontPage
    http://struts.apache.org/kickstart.html
    http://cocoon.apache.org/
     

     

    Copy & paste the code below to embed this comment.
  21. Chris, when comparing PHP and Rails, remember that PHP is a language, while Rails is a framework. So there is a lot more to learn with Rails. It is a complex framework, whose goal is to make it simpler to create significant web sites, but you do have to climb the learning curve. If you just want to add some small dynamic capabilities to an otherwise static site, PHP is a better choice.

    Copy & paste the code below to embed this comment.
  22. Thomas, I agree that Rails is best suited to a “middle range” of sites, but perhaps we disagree on how wide that range is. The scaling issues have been overblown, and there are some quite sizable Rails sites. YellowPages.com does more than 170 million page views per month; the Facebook app Friends for Sale is doing more than 300 million page views per month. RevolutionHealth.com gives an example of a quite complex site with moderately high traffic.

    I recently posted a article on “how Friends for Sale has handled the scaling challenges”:http://www.buildingwebapps.com/articles/23-selling-friends-scaling-a-high-traffic-rails.

    Copy & paste the code below to embed this comment.
  23. Hey A List Aparters,

    I’m an Interaction Designer at ThoughtWorks and we’ve been working with Ruby on Rails A TON lately. The developers here love it, and they’ve worked hard to help it scale to our enterprise clients’ needs.

    As a designer, it has been fabulous. Never before have I had so much control over the end product we create. I don’t have to worry about breaking back-end code, and have almost full control over the view. I’ve enjoyed it a lot.

    Thanks for the great article, and best of luck to everyone out there.

    Copy & paste the code below to embed this comment.
  24. Great introduction to an important concept. I will check out more to see if it is worth the switch.

    Copy & paste the code below to embed this comment.
  25. I don’t know whether it’s just me or if perhaps everybody else encountering issues with your website. It appears as if some of the text on your posts are running off the screen.http://www.xtremewalls.com

    Copy & paste the code below to embed this comment.