Jolie Rouge


all ur parentheses Я belong to me


Backbone.js + Rails

You all know that my opinion of Ruby On Rails couldn’t be any lower if it was under the basement carpet of a Pompeii1 house, so this post won’t be very suprising.

So, awhile back I was having a discussion with a  friend about how, as a general rule, about 90% of a web app should really be taking place on the browser, and this was vindicated in my opinion with several other developers coming to much the same conclusion and releasing some very interesting application frameworks for javascript Single Page Applications. Of course this conversation took place when jQuery was just really starting to take off. The problem at that time was that no one was really talking about a client side application in javascript methodology, how such a thing could or would work.

In hindsight it all seems obvious, but actually, Backbone and other such frameworks represent some really great out of the box creativity. Anyway, after my last Rails project, I more or less swore I would never work with that ass backwards platform ever again. I decided to revisit this idea of Single Page Applications and low and behold I stumble onto Backbone.js, and I decide I am going to learn to use this tool. While looking around for some books on the topics of jQuery and Backbone (I’ve more or less decided to give up the ghost and use jQuery ui elements in all future applications cause rolling your own is just too much work.) low an behold I find a link to this: https://www.backbonerails.com. I thought to myself, you have to be shitting me. Mixing Backbone.js and Ruby on Rails is like taking a sexy girl back to your apartment and making her diddle herself across the room while you try to solve a Rubik’s Cube with your toes.

Rails is the big shining Mecca of Shit2 that passes for a software platform these days, so I understand that all the new kids want to make use of cool by association until graduation is over, and everyone realizes that the flashy douche bag will end up a used car salesman, slowly killing his soul, beating his wife and kids, and crying himself to sleep in a second hand recliner while he reminisces about the glory days over a bottle of cheap scotch.

Normally I would find such an ironic situation truly sad, but must admit the idea of a pot-bellied DHH sobbing like a little girl into a dixie cup filled with Tambowie is strangely satisfying.

The whole idea of Rails, the fundamental flaw of Rails can be summed up by drawing you a nice little picture.backbonevsrails

Using Rails on the Server side of a Backbone Application is like putting on astroglide3 before attempting to service4 a meat grinder. Deploying Rails Applications is actually MORE difficult than deploying a Java Application (go figure). Any and all time and money saved during development of a Rails application will quickly be consumed in the cost of server and the hours of headaches of deployment. It’s such a headache that tools have been created to automate the deployment of Rails Applications, and those tools themselves are a Headache to use, with confusing pointless options and defaults that would only work on trivially simple applications.

Backbone and Ruby aren’t just apples and oranges, they are Apples and a Pile of Steaming Dog Poo (PSDP).

This is because MVC was a stupid stupid idea for web applications on the server. MVC in the browser is right inline with the kinds of issues it was meant to solve.  The extent of the code on your server should be: 1) can you do this, and 2) here’s a collection object of what you asked for and 3) What you asked me to save has been saved.

The webserver should become nothing more than a database layer.

  1. a famous city that was buried.
  2. Everyone has to try it out for themselves, most of the people who do have their beliefs reaffirmed. “…for wide is the gate, and broad is the way, that leads to destruction, and many there be who go in there.” Matthew 7:13
  3. a well known lubricant for sex
  4. Sexually Service™
  • obviously you have misunderstood the role of Rails in a Rails-Backbone combination; and your shit-tasking Rails is quite relevant

    • jasonrouge

      I guess you mean irrelevant? Perhaps. I would point out that using Rails with Backbone is like swatting a mosquito with a sledgehammer. There are way too many layers between you and your data, and a whole lot of bloat for what you are trying to accomplish. A thinner/smaller framework that provides an ORM, like Sequel would be better.

      The problem is rails is too much for what it is good for, and to slow for what it is made for.