4 ms·
There really isn't a Rails vs Node dichotomy, though. More like Sinatra vs Express -- you can write glue code in the Ruby ecosystem as well if that's what you w
by danneu 15y ago
There really isn't a Rails vs Node dichotomy, though. More like Sinatra vs Express -- you can write glue code in the Ruby ecosystem as well if that's what you want to do.
You use Rails because you want and understand the magic, not because it's magical. You might be initially allured by the terseness of Rails, but the learning curve of what Rails is doing is why you use robust frameworks in the first place -- because you want shortcuts and optimize away from trivial things like form parameter passing and route generation. Learning what `resources :topics` does is "tedious" in a much different way than the tedium of scoping out:
app.get '/topics'
app.get /topics/:id'
app.del ...
...
Because then you see an npm package like `express-namespaces` that lets you do this:
app.namespace '/topics', ->
app.get '/', ->
app.get '/:id', ->
And after a while, some people agree to consolidate this into:
app.resources 'topics'
And soon a part of the community decides that they might prefer these sort of conventions and it becomes the seed that blooms into a robust framework.
...And then another part of the community will complain that it's "too magical" while I do the Jackie Chan 'wtf' gesture because there's a crystal clear API and they'd rather form a Cloud Chorus against alleged "magic" than humbly accept that they might not appreciate the same things that other people appreciate.