small medium large xlarge

Altosh_pragsmall
11 Apr 2016, 03:12
Askarbek Karasaev (45 posts)

Hello!

I just start reading the book and see the example with using a scaffold feature.

I used to hear that using scaffold feature leads to a bad practice and habit.

What’s your thought on this? :)

Samr_small_pragsmall
11 Apr 2016, 03:43
Sam Ruby (634 posts)

There are indeed a lot of opinionated people providing contrary advice to pretty much everything Rails choses as a default. That’s fine. This book takes the approach that it is best to learn the defaults as provided by Rails before you branch out.

Scaffolding both makes it easy to get started, and ensures that your project is using the current best practices. If you look at the scaffolding generated by Rails 4.2 and compare it to the scaffolding generated by Rails 5.0 you will see a lot of differences.

Altosh_pragsmall
11 Apr 2016, 04:04
Askarbek Karasaev (45 posts)

Thanks for reply, Sam.

Doesn’t using scaffolding mean one will not try to code by himself as he’ll rely on automatic code generation? My understanding was that scaffolding is good for fast prototyping and scaffolding generates (it might be different with Rails5 now) a lost of redundant code that you wouldn’t have if you’d code manually. I’m not going to argue more, just wanted share with my thoughts.

Regards.

Samr_small_pragsmall
11 Apr 2016, 04:09
Sam Ruby (634 posts)

What you are saying was definitely true for Rails 2, but considerably less so for Rails 3, 4, and 5.

You must be logged in to comment