Live data from Hacker News

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

unlimitednovelty.com

1–10 of 127 posts

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

#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 complaints.

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

#4
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 api, you just don't.

Worrying about Rails' future and if it's still "winning"(for some definition of winning?) compared to node.js is silly and reminds me of how many Java devs had an existential crisis about the future of Java since Java 7 took a few too many years to ship.

Rails is a web MVC framework, that's it. It's not even the only or best web framework in ruby. Rails is not ruby. It is not designed to compete with node. Node is a totally different thing.

Compare node and ruby and that's a more interesting and correct comparison, but I've happily used both and neither one is going to "kill" the other any more than Rails killed PHP or Java killed C++.

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

#5
"Rails is great for JSON APIs"

Rails is good for simple APIs (especially adding an API to an existing HTML site).

However, if you want to do more than that, elegantly - it isn't great yet. You quickly end up with some fairly messy serialization hacks and confusion between what should sit in the controller and the model.

The active_model_serializers gem is a really good start, but there is a way to go to get to the level of convention the rest of Rails provides.

Soon it will be great I have no doubt and the convention/stability of Rails will lead a lot of businesses to start using it.

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

#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.

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

#7
> Edit: Contrary to what I said here, José Valim is not stepping down from Rails core, he is merely on sabbatical. My bad.

And then later in the article...

> Jose Valim, (now former) Rails core member,

When you have to issue a retraction, you should update the article. The way the Times does it is to make the edit and then put a small note at the end of the article recording the original error. Like so: http://well.blogs.nytimes.com/2012/09/10/early-music-lessons....

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

#8
> Meanwhile, Node.js is the new hotness, and many in the Node community have sought to build Node up by bringing Ruby and Rails down.

And this post attempts to return the favor?

> Node is three years old now. Where are the Node.js success stories? Who's built a brand on top of Node?

> Meanwhile code quality is de-emphasized and large Node programs degrade into incomprehensible, byzantine structures of callbacks and flow-control libraries

Edit: added examples. The whole post is as much an attack on Node as it is a defense of Rails.

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

#9
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 one? I think that this method is either just too difficult for some people to wrap their heads around or it offends their sensibilities as a programmer.

I've had too many personal Sinatra projects that have bogged down when I started reimplenting Railslike functionality.

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

#10
post #5

"Rails is great for JSON APIs" Rails is good for simple APIs (especially adding an API to an existing HTML site). However, if you want to do more than that, elegantly - it isn't great yet. You quickly end up with some fairly messy serialization hacks and confusion between what should sit in the controller and the model. The active_model_serializers gem is a really good start, but there is a way to go to get to the le…

Why not use a format-specific DSL, like DHH does with jbuilder?

That's not messy at all, it's basically just another TemplateHandler.

Post reply on HN