Hacker News new | ask | show | jobs
by headcanon 3437 days ago
> As to why... it's anyone's guess.

I think its because recreating rails in javascript just doesn't make sense in the current ecosystem. Either you are rewriting stuff like express from scratch (and why are you doing that?), or you're building on top of those modules and adding configuration conventions and scripts, in which case, congratulations, you've just written Sails.

When Rails first got started, ruby didn't have anything close to the ecosystem that JS enjoys today, so DHH et al. had to write most of the individual components themselves, with the intention of making them all work together.

So in my view, its similar to how Humans and Gorillas evolved from a common ancestor, but you won't see Gorillas becoming Human anytime soon.

2 comments

I think you're right that Rails basically built up the Ruby ecosystem around itself, whereas most of the JS libraries are just riding the wave started by... Node and NPM, I guess? It's much more fragmented.

> ...or you're building on top of those modules and adding configuration conventions and scripts, in which case, congratulations, you've just written Sails.

This doesn't jive with a lot of what's been done in the JS community, at least frontend anyway. There are a TON of libraries that already had perfectly good implementations, where people just decided to reinvent the wheel because they "couldn't find any X library that did what they needed." (see: anything to do with forms)

Backend too, though. There's Express, Koa, Hapi, and more. They all basically do the same thing.

Maybe it's just a difference in mindsets -- maybe JS devs prefer light libraries they can cobble together vs. kitchen-sink frameworks? But then there's the counter-example of the popular frontend frameworks (Angular 1/2, Ember), so I'm not so sure that applies universally either.

Personally I think Sails is pretty cool in it's own right. As far as websockets go I feel like that is one area where Sails makes things dead simple and I've not been amazed by the overcomplicated Rails 5 implementation of websockets.

That said, I don't see Sails gaining a ton of traction even though it's been around for quite some time yet, and with it's security settings and beta status I don't feel great about building production apps with it yet.

I certainly like sails, and can't levy too much criticism against it (except its ORM left quite a bit to be desired, although I haven't looked at it recently). I'm only asserting that it will never be Rails, partially because of how and when each respective framework came to be.