Hacker News new | ask | show | jobs
by flosim 2855 days ago
I work in a small full-stack JS/TS shop, and we've inherited a RoR application lately.

I see a lot of criticism against the Javascript ecosystem. Let me tell you why I prefer working in Javascript rather than with RoR.

It all boils down to the magic Rails advocates rave about, which is precisely what made my life a nightmare while working on that Rails project. Conventions over configuration is fine when you know those conventions. When all you have to do is work on the frontend part and rebuild an app, then you don't really care all that much about what an asset pipeline might be, or how you're supposed to use it. All those abstractions slow me down. At the end of the day, your run-of-the-mill CRUD apps are all structured kind of the same, and calling a cat a cat instead of inventing non-obvious abstractions is detrimental to speed of dev.

I prefer having `package.json` explicitly listing all the commands I might possibly need than having to memorize what does what with Rails. We've had absolute noobs work on both JS and Rails project and they seem to move much faster and be stuck less on the JS project than with the magic Rails provides. The fact that JS is more imperative helps linking parts of the source code intuitively, compared to Rails having standard classes and hooks and whatnot.

I'm very grateful for what Rails brought to Webdev in general, but I do think that monolithic framework are on their way out. I kind of appreciate being able to follow non-smart code when things go south, and being able to understand what is wrong by just reading the code. I've spent waaay too much time skimming through outdated documentation pages about things that were so clever that they were changed in ulterior versions.

I had the same problems when dealing with Symfony (which still angers me to this day), or Angular.js, or just anything that pretends to know better than me how I should write code. It's kind of a recurring pattern with frameworks that makes me increasingly wary of all of them.

Working with much smaller libraries that you can hope to grasp fully has proven to be much less frustrating personally.

Another advantage is that I can write code once for both the frontend and the backend, which helps me move a lot faster than writing the code + tests in 2 languages.

I know this is not a proof by any means, but I felt that having the point of view of a non-believer would be interesting to you guys.

1 comments

I think a lot of devs are over the asset pipeline. Recently I built a small app where front-end performance really wasn't a concern. I stuck all of the assets in /public and called it a day. I also think you'll see more Rails apps using package.json and webpack for assets management.

As for the scripts section of package.json, that's typically managed via rake tasks, that can be listed via rake -T.