Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Do professional developers use scaffolds?

I have read that some developers do not use scaffolds, and believe that an application should be coded from the ground up. I was just trying to see if anyone had any insight.

2 Answers

The dev team here at Treehouse doesn't use scaffolding, but we do use many of the other Rails generators to ease development such as model and controller generators. As your project or company grows, you will decide upon common patterns that your application uses, and there is a 99% chance that pattern is not what scaffolding provides.

Personally, I write code in Macvim and use the rails.vim plugin to create files for a resource as I need them.

Are there any tutorials that build sample project using methods more along the lines that you mentioned instead of using the scaffolding. Thank you for your insight.

Try Railscast lots of free videos with examples of lots of things like this or try the Rails guide

Scaffolds give you a lot of additional stuff that you don't necessarily need and follow a default pattern of how the app is built. Not all apps that you make will follow this template. But if your app follows this standard pattern, I suppose it's OK to use scaffolds. I'd probably use rails generate resource instead of scaffolds to get only some of the stuff done for me and take control of the rest by building it from ground up. When I first saw scaffolds, I thought it had too much 'magic'. I like knowing what goes on under the hood.

I truly agree with your 'magic' statement along with the desire to know what is going on entirely. My thing is that if this is not how people develop then I don't want to be pigeon holed into this being the only way I know how to develop anything.