Login or Register

Forgot?
I'm new, register me!

What is OmniNerd?

100% of OmniNerd's content is generated by you, the reader. OmniNerd allows content of all sorts and highlights the nerdiest of what's around.

Want to know more? Check out our welcome page, or simply register and have a first-hand look.

Submit New Content

Voting Booth

Been a victim of a violent crime?

60 votes, 4 comments
6
Nerd-Its
+ -

A Cloudy Future for Ruby on Rails

Newspaper current event by VnutZ on 11 January 2008, tagged as ruby on rails, ror, programming, computing, internet, and web development

Rails 2.0 was released to the web development community last month. The features and improvements list is long, but developers have highlighted the basics, such as faster performance, better XML and more feature laden action packs. Despite the Rails upgrade, many key figures have blasted Ruby on Rails as a failing technology. Zed Shaw, the creator of Mongrel, was one of the most outspoken when he called Rails itself "Ghetto" - amongst equally colorful descriptions of the development community. Some claim Rails peaked in 2007, with declining deployment statistics henceforth. Things are not entirely gloomy for Ruby on Rails, however, as Tim Brey, the director of web technologies at Sun, waxes positively on a Rails boom in 2008.

Favorite
[Show/Hide] [Reply]   4 Nerd-Its - + Favorite
I disagree (surprised?) by scottb :: NR7 :: on 11 January 2008

I think that the long term (read, ten year) future of RoR is cloudy, but the near term is likely to be quite good.

First, while Rails might have some scaling and performance issues for really big sites, there really aren't that many really big sites out there. For the really fat "long tail", where sites (like Omninerd) have much more typical traffic loads, the scaling and performance issues are moot. A much more important factor is the ease with which one can implement and deploy new features.

I've been messing around with RoR for a few months, now, and have started deploying some real-world applications. The combination of Ruby and the Rails library are a vast improvement on earlier technologies.

One of the major new trends I see happening in the industry is the idea of "domain specific languages". It's still just beginning to pick up traction, but I think it's ultimately going to have a big impact. There are two approaches to DSLs - you either end up writing your own compiler or interpreter for it, or you build what's called an "embedded DSL". It's far less work to do an eDSL, since the basic framework of computation (loops, expressions, branches, and so on) are provided by the host language. But a lot of popular languages are rather weak for doing eDSLs, because their syntax is a bit too rigid. EDSLs in Java, for example, are much less satisfying than eDSLs in Ruby or Haskell. Ruby's syntax is very friendly for eDSL-like extensions.

Ruby has also borrowed some important ideas from the functional programming paradigms. I've already mentioned elsewhere on the site that I'm a huge fan of functional programming.

The most noticeable feature Ruby has borrowed from the functional paradigm is the "closure" - what Ruby calls a "block". The basic idea is to be able to describe a piece of computation that can be then passed around and manipulated as if it were an ordinary value, like a number or a string. Rails makes very heavy use of closures in creating an eDSL for building web sites.

The result, together with the Rails philosophy of "programming by default", allows one to put together relatively simple web sites in very short times. Where the typical tutorials for putting together a small e-commerce or blog site using JSP or ASP or even PHP normally require several sessions of work, the equivalent tutorials using RoR typically have a working, usable site up in a single session.

Zed Shaw's complaints weren't actually against Rails. If you read his rant, he's mostly complaining about the Rails community, who he feels didn't give him the respect he deserved. Some of his technical complaints are valid, though, and if Rails is going to have long-term viability, the community will have to address them. That they end up solving them differently than Shaw would have them do it isn't nearly as important as actually solving them.

[Show/Hide] [Reply]   1 Nerd-It - + Favorite
Rails Locks The Framework by VnutZ :: NR8 :: on 14 January 2008

I have to agree that Ruby on Rails definitely makes things a lot easier. Now, I'll be the first to admit I contributed next to nothing (other than the bug system) in terms of code used to run OmniNerd. However, from that experience, it is very easy to go from idea to concept to production when using the Rails motif.

I think one of the big hesitations on converting has to do with how big a shift it can be for an existing webpage. Say you were a PHP programmer and had to change some material into a new language, fundamentally, it's an exercise of converting syntax. Most of your actual logic and layout really does remain the same. Ruby on Rails requires an overhaul of structure to fit into the framework. And that locks you in unless you find an alternative Language on Rails. I think that committal step is what keeps Rails from getting as adapted as it could be. Existing sites don't want to change and newcoming sites question what happens if Rails goes away.

[Show/Hide] [Reply]   0 Nerd-Its - + Favorite
RE: Rails Locks The Framework by scottb :: NR7 :: on 14 January 2008

Ruby on Rails requires an overhaul of structure to fit into the framework.

That's not strictly true. It's fairly easy to ignore the Rails controller/view separation if you want. If your old code is written in a fully embedded scripting/templating language, like JSP or ASP, then you can get a similar effect by putting all of the logic in the Rails view.

If the old code is written in a code-only style, like a CGI script or a Java servlet, then you can put the whole thing in the Rails controller.

Neither of those is recommended, but they'll get you switched over to running under Rails rapidly, so you can take your time in refactoring it into a "proper" MVC style.