Why do Ruby on Rails professionals NOT use Scaffolding?

I believe most professionals avoid scaffolding because they prefer a test driven development approach to writing production code. This means they want to write a failing test first and then write the code that makes the test pass. This is a great way of producing strong code, but it works best at a very granular level. Scaffolding seems to do too much at one time and so it disrupts a tight loop of writing a failing test for a specific features then writing the code that makes that particular feature pass. It may be more important to get into that habit above and beyond the ease of use of scaffolding.

That said scaffolding can be pretty powerful in its own right.


I'm experienced with rails and I rarely use scaffolding simply because my end goal is far from simple CRUD actions. However, there's no strict rule to not use scaffolding. Some coders frown on it because it is actually scaffolding, literally. It's not a finished product. Scaffolding supports you as you build the actual product. Search google images for "scaffolding" and you should get the idea.

Keep in mind scaffold is just one of many built-in generators in Rails. A Rails generator is simply a script that outputs some generic code. Generators are very useful time-savers, and you'll quickly find yourself writing generators for your own custom needs.