Re:An Ode to Ruby
by charcircuit on Monday January 10, 2022 @10:45AM
(#29876548)
Having tried both Node and Rails, Rails was a horrible experience. I hated every minute of it and will ignore any job listings including it. Your whole project is in a billion files and everything works by "magic." There is so much complexity and different flies that it sucks to work with. Meanwhile with Node you can start with a simple index.js and work your way up.
[ Parent
| on HN ]
Node and Rails aren't close to the same thing. I would think a better comparison would be Node - Sinatra.
Even that's a bit apples to oranges. Raw Node is very low level so comparable to Rack in Ruby.
Re:An Ode to Ruby
by fourseventy on Monday January 10, 2022 @12:04PM
(#29877851)
So you come from the Node ecosystem and your main complain about Rails is that the project has a lot of dependencies and files? lol
Re:An Ode to Ruby
by charcircuit on Monday January 10, 2022 @03:19PM
(#29881593)
When you create a project it makes like 100 files that are all automatically executed somehow. Nothing really includes them, but you know it works. These files arp part of your project, but they is also a bunch of rails stuff so it blurs what is and isn't a dependency for your project.
With node projects they typically keep all of their dependency neatly under node_modules/ and you can clearly see how things are included and how things work.
Re:An Ode to Ruby
by NoSorryCannot on Monday January 10, 2022 @12:49PM
(#29878571)
I hear your point but the quantity of files produced by initializing a new rails project is very large, larger than an equivalent node project with server and framework. These aren't transient build artifacts either, they will live in the repo and may occasionally need attention.
Except with node you have to roll everything yourself, so jumping between different projects is a nightmare (each one a snowflake)
Roll your own session management, auth, ORM, db migrations, html templating, CORS, cross site scripting protection, the list goes on and on.
Rails is doing a lot for you. There's no point in comparing it to something lean like Express. If you want that in Ruby use Sinatra, not Rails.
FWIW It seems to me your comment about Rails is a more general comment re: frameworks.
Learning a language/runtime takes some effort but much less, IMHO, than learning a framework. Doesn't matter if that is Rails, Django, Ember, Angular, iOS SDK, Android SDK, React+Redux+???, and so on.
Re:An Ode to Ruby
by charcircuit on Monday January 10, 2022 @03:27PM
(#29881749)
I don't think so out of your list I've used the Android SDK along with a react and redux stack and I didn't get the name kind of feeling. With those you start out with a mainly clean project and everything makes more sense to me how it works.
The Android SDK is huge. If you view learning that framework as significantly easier than learning Rails, you're a better programmer than I.
Re:An Ode to Ruby
by charcircuit on Tuesday January 11, 2022 @01:42AM
(#29888355)
I never said it was quick or easy. It just makes more intuitive sense in how it works. Rails has a lot of "invisible" that is stored in libraries which obscrues how it works.