Live data from Hacker News

Why critics of Rails have it all wrong (and Ruby's bright multicore future)

unlimitednovelty.com

11–20 of 127 posts

Re: Why critics of Rails have it all wrong (and Ruby's bright multicore future)

#11
post #3

This is a classic problem among engineers. The notion of bloat and cruft that goes unsubstantiated, and is really code for 'new and shiny'. Older software projects offer more features, but that doesn't mean they're materially slower or worse in any objective way. We use Rails at Pose to deliver JSON to over 1M users on either Android, iPhone, or our Backbone Web UI. It works well, it scales, and it's clean. No compla…

I have no complaints about Rails.

What you said about bloat and cruft is partly true. But there are other things which sometimes substantiate it - boilerplate and cognitive overhead, for example; sometimes older things have more of these than necessary, and are kept anyway because of their maturity and usefulness (and because a community has already developed which fit its brain to the project and has memorized the quirks already).

That is a good reason to keep the old thing, but it does not mean that the older thing is always optimal or even better than a newer thing.

Re: Why critics of Rails have it all wrong (and Ruby's bright multicore future)

#12
post #3

This is a classic problem among engineers. The notion of bloat and cruft that goes unsubstantiated, and is really code for 'new and shiny'. Older software projects offer more features, but that doesn't mean they're materially slower or worse in any objective way. We use Rails at Pose to deliver JSON to over 1M users on either Android, iPhone, or our Backbone Web UI. It works well, it scales, and it's clean. No compla…

Yeah. Just read the top comment (as I write this): "You don't need all the ceremony and structure of Rails and MVC." I think the problem with this outlook is that you don't need it...until you, you know, need it. Rails has a lot of niceties that you lose with Sinatra. Why not start from a superlight Rails app (using any of the many gems or ActionController::Metal options) and then add on bits and pieces when you need…

To solve this problem is why Padrino was created. Padrino is a collection of "Railslike" functionality for Sinatra. So either start with a Sinatra project and then pick stuff from Padrino or start with Padrino in the first place. Padrino is highly modular.

Re: Why critics of Rails have it all wrong (and Ruby's bright multicore future)

#13
I agree a lot with this but it contains its own absolutely huge non-sequitur: How on earth is Cramp an example of damn simple websockets in Rails? It's Ruby, not Rails.

It's also probably worth mentioning that it literally only works with Thin, is unmaintained, largely undocumented, and that the latest master on GitHub doesn't actually work. Not really the best example to pick!

Re: Why critics of Rails have it all wrong (and Ruby's bright multicore future)

#14
As far as using websockets with Rails goes, I just wanted to mention that I've been having a really good experience using the websocket-rails gem (https://github.com/DanKnox/websocket-rails) in a text game (MUD) I'm working on as a Rails 3 app.

Re: Why critics of Rails have it all wrong (and Ruby's bright multicore future)

#15
post #13

I agree a lot with this but it contains its own absolutely huge non-sequitur: How on earth is Cramp an example of damn simple websockets in Rails? It's Ruby, not Rails. It's also probably worth mentioning that it literally only works with Thin, is unmaintained, largely undocumented, and that the latest master on GitHub doesn't actually work. Not really the best example to pick!

There's also faye with faye-rails

https://github.com/faye/faye

http://faye-rails.sociable.co.nz/

https://github.com/jamesotron/faye-rails

Re: Why critics of Rails have it all wrong (and Ruby's bright multicore future)

#16

No other programming community on the planet cares so much about how they're perceived. I suspect there's a silent majority...

Any new and active programming community should be vocal, and node is no different. In fact, both node and rails have very loud supporters and detractors (IE, you).

Re: Why critics of Rails have it all wrong (and Ruby's bright multicore future)

#17
post #6

I love Ruby, but I have no love for Rails. Want to write a nice JSON API using something light and nice? Use Sinatra, pick your favorite ORM (even ActiveRecord) and go to town. Why mess with all the other Rails junk when you can have a simple app.rb for your sinatra app and just write simple little controller actions and you're good to go? You don't need all the ceremony and structure of Rails and MVC to write a JSON…

Agreed, when you want to build an API use Sinatra, and when you want to do web MVC there is Padrino which turns Sinatra into a very competent MVC framework.

I really enjoy Sinatra and am indeed using it for REST style API hosting, but the counter argument might be all the security stuff that is built into the Rails routes/controllers. this might be a great case for a stripped down rails app as opposed to a Sinatra app.

Re: Why critics of Rails have it all wrong (and Ruby's bright multicore future)

#18

I love Ruby, but I have no love for Rails. Want to write a nice JSON API using something light and nice? Use Sinatra, pick your favorite ORM (even ActiveRecord) and go to town. Why mess with all the other Rails junk when you can have a simple app.rb for your sinatra app and just write simple little controller actions and you're good to go? You don't need all the ceremony and structure of Rails and MVC to write a JSON…

FTA: https://gist.github.com/1942658

Why wouldn't you just do a 50-line Rails app instead, and slot in any other Rails niceties when you feel like you need them?

Re: Why critics of Rails have it all wrong (and Ruby's bright multicore future)

#19

As far as using websockets with Rails goes, I just wanted to mention that I've been having a really good experience using the websocket-rails gem ( https://github.com/DanKnox/websocket-rails ) in a text game (MUD) I'm working on as a Rails 3 app.

A Rails-powered MUD? You're doing God's work, son.

Re: Why critics of Rails have it all wrong (and Ruby's bright multicore future)

#20

I love Ruby, but I have no love for Rails. Want to write a nice JSON API using something light and nice? Use Sinatra, pick your favorite ORM (even ActiveRecord) and go to town. Why mess with all the other Rails junk when you can have a simple app.rb for your sinatra app and just write simple little controller actions and you're good to go? You don't need all the ceremony and structure of Rails and MVC to write a JSON…

"Rails" is a collection of libraries and conventions, just as "Sinatra + ActiveRecord" is. There's nothing inherent in it that makes it "worse" than Sinatra (which I love, by the way) for JSON APIs.

Use Rack, pick your favorite gems, and go to town. Why mess with all the other Sinatra junk when you can have a simple config.ru for your app and just write a simple call method and you're good to go?

You don't need all the ceremony and structure of Sinatra to write a JSON API, you just don't.

Post reply on HN