3 ms·
I remember trying to learn Ruby on Rails. I read all the books and started playing around with scaffolding. It was giving me problems and I was talking to a sen
by anonreeeeplor 4y ago
I remember trying to learn Ruby on Rails. I read all the books and started playing around with scaffolding. It was giving me problems and I was talking to a senior developer from the community about it and he said: “Everyone knows you don’t use scaffolding, no one does that.”
It was super confusing because ALL of the documentation EVERYWHERE said to do it that way, but in the community of pro developers, they all knew it was just a stunt feature to make it easy to onboard.
I think perhaps it is rooted in the nature of how Ruby was created, more of a an amorphous mob of hobbyist hipster pot smoking ultra laid back creative engineers who dropped out of high school versus “.NET” or Java which are backed by major enterprises.
- graypegg 4y agoAll scaffolding does is sets up a controller and views with some basic forms, and generates a model and migration like you would’ve generated anyway. It’s not like there’s anything unique or difficult to refactor about the ~6 files it generates, it’s just a basic CRUD entity to start building from. (Which , if you’re building a rails app, is probably going to involve lots of CRUD forms) Anyone telling you that’s bad is doing a tiny bit more work than they need to! As someone that enjoys a fair amount of pot, I’m ultra-laid-back enough to favour letting the machine do a tiny bit more of the work.
- baremetal 4y agolaziness is a virtue.
- troysk 4y agoOne can customize the scaffolding generators to output layouts/pages in the designs which one prefers. This supercharges your development especially if most of the work is CRUD like apps. https://github.com/rails/rails/tree/main/railties/lib/rails/generators/erb/scaffold/templates https://github.com/rails/rails/tree/main/railties/lib/rails/...
- herbst 4y agoI've worked with a rails core developer while I learned rails and while he likely never used scaffolding (he might had a Emacs routine setup doing more or less the same) it was definitely ok to use scaffolding. I am lazy I still use scaffold these days, but then I also take 5 minutes to reiterate over the created files to get them the way I want them.