Evil Scaffold

I read the Amy Hoy's presentation on why scaffold is not a good thing for beginners. For admin application, is it ok to use scaffold?

Maybe. My biggest problem with scaffolding isn't that it exists but that it does so very little. I'm in the process of converting a PHP tool of mine for Rails. It's basically dynamic and ultra-configurable scaffolding. Scaffolding on crack, if you will. It's designed for people who get sick of writing CRUD but aren't satisfied with the lack of validation, presentation, etc. etc. of scaffolding. And it's built on plugins, so you can actually do more than the basic CRUD (mass edit/update/delete anyone? Import/Export from CSV?). Designing for people who don't know and won't learn Ruby or Rails is the farthest thing from my mind.

Bala Paranj wrote:

Sounds like Streamlined to me. Streamlined does not have any tests and I don't want to depend on something which does not have tests.

Um... Dont' know what you consider tests... but... this appears to be a couple of tests:

http://collaboa.streamlinedframework.org/repository/file/test/unit/streamlined_generator_test.rb

And following the lead of Rails itself... here is the directory of templates for generating tests:

http://collaboa.streamlinedframework.org/repository/browse/generator/templates/relevance_extensions/test

What more do you want?

Yeah, I took a look at Streamlined a bit back. Didn't dig too deeply, but it appeared to have a lot of similar functionality and goals but with a different approach.

Bala Paranj wrote:

Sorry, back to your main question. Scaffold is a great place to start. And honestly, the scaffold for REST is pretty great.

script/generate scaffold_resource Building name:string floors:integer build_date:date

More info here:

http://david.goodlad.ca/articles/2006/08/02/simply_restful-in-rails-core If you want to watch a great video: http://peepcode.com/articles/2006/10/08/restful-rails But definitely check out the cheat sheet on the page above as well.

Carl

I was at the Nova RUG presentation given by the developer of Streamlined, he said that they don't have tests in place.

I watched the peepcode screencast on RESTful Rails. The scaffold code looks clean but he recommends not to use scaffold if you are going to do TDD. For beginners it looks ok.