Why do Ruby on Rails professionals NOT use Scaffolding?

Viewed 30248

I read sometimes from people that seem to be working with rails since longer, that one important lesson they learnt would be "Don't use scaffolding". Also on irc I read commonly hints from this direction. My question is why, what is the bad thing about it? And is nifty_scaffolding bad as well?

My guess would be it is bad because it generates by default an xml version of your controller action, which would expose the field names of our application to anybody and make it more vulnerable for attacks, so maybe it's this?

What are your reasons to not do scaffolding?

8 Answers

I am professional Rails developer and I use scaffolding all the time, in fact I can make a pretty decent argument that reproducibility and predictability of scaffolding can make the whole process of learning rails and using rails easier.

The approach we use is to always start with scaffolding and then as time goes along and we see patterns customise the scaffolding for the project.

This approach means that we have an approach when we learn we bake knowledge back into the project and when we find issues we fix them in one place and all subsequent uses of the scaffold have that learning instead of constantly having to explain, justify and educate different developers at different skill levels.

In my experience the biggest issue with rails is its greatest strength! It is the malleability of a rails project is what causes it to be hard to maintain. Lots of ways to achieve the same-thing which is not wrong but does make it hard to pick up from somebody else who has started the project.

Is our approach fUN , debatable! Is it reproducible, effective, efficient while leaning on rails instead of fighting it , 100% yes!

Related