Deprecate dynamic scaffolding

I want to raise some discussion on whether dynamic scaffolding should be deprecated or not?

I don't think it has any real production value. I've seen examples of improving dynamic scaffolding to work better with resources, but I don't think they belong in core. If anything, dynamic scaffolding would serve better as a plugin.

Anyone agree?

How about getting rid of scaffolding altogether? Narr... they're good as an example of how to use the framework, that is, assuming they're updated as the framework gets updated and best practices evolve.

If scaffolding's purpose is for learning purposes only, maybe is should be stated as such:

./script/generate example_controller

?

-- tim

It can be useful for the maintenance of things like lookup tables, particularly during development.

Dave

I agree. Scaffolding is about having something to learn from. If you're learning from it, you need the code. If you're building from it, you should have the code. Dynamic scaffolding is just for flash.

+1 for deprecation

agreed, however, when the goal is to expose a resource, then dynamic scaffolding may be good enough.

+1 This should be in a plugin, it only adds extra code to rails.

   ~Wayne

True, but this can just as easily be facilitated as a plugin.

   ~Wayne

Yet another +1. I'd like it deprecated within the framework, it's much better suited as a plugin.

Tom

Yet another +1. I’d like it deprecated within the framework, it’s much better suited as a plugin.

+1

And if you need something quick and [not quite as] dirty for an admin interface, streamlined [http://www.streamlinedframework.org/pages/about ] does a much better job than dynamic scaffolding.

Alex

Tom Ward wrote:

Josh Peek wrote:

I want to raise some discussion on whether dynamic scaffolding should be deprecated or not?

I don't think it has any real production value. I've seen examples of improving dynamic scaffolding to work better with resources, but I don't think they belong in core. If anything, dynamic scaffolding would serve better as a plugin.

Anyone agree?

I see that lots of people are agreeing, but please bear in mind that the second edition of AWDR starts work on the Depot application by using dynamic scaffolding. The first edition did not.

Deprecating dynamic scaffolding will give the impression to AWDR2 readers, just when they are starting to work with Rails against a database, that Rails is not stable.

regards

   Justin Forder

I want to raise some discussion on whether dynamic scaffolding should be deprecated or not?

This is already on the agenda for Rails 2.0. I fully agree that this would make a great plugin, though. Even better, it'd make a great 5 plugins. Each targeted at different uses of it.

Excellent point. Perhaps this should be kept in the current core and be pulled for 2.0 which the next book (?) will address.

   ~Wayne

What was meant by 'dynamic' scaffolding? If we're talking about removing the scaffold generator, then I'm against it. Many people learn a lot from generating the scaffolding for a controller and then reading the generated code. I'd hate to make them learn how to install plugins first.

If you're instead referring to the 'scaffold' class method that can be used in a controller, then I'm all for removing it :slight_smile:

Jeff softiesonrails.com

Deprecating dynamic scaffolding will give the impression to AWDR2 readers, just when they are starting to work with Rails against a database, that Rails is not stable.

Any major changes will be held back till 2.0. There's definitely no intention of breaking people's scaffolds in 1.2.3.

While I'm probably the most paranoid core-team member when it comes to backwards compatibility, I'd still rather see the framework continue to evolve, rather than stagnate indefinitely to satisfy some people's fear of change :). Eventually that feature will be pulled out to a plugin, but for this release stream, it's fine where it is.

Shall I put in a patch/ticket to add a deprecation warning to "scaffold"?

Big plus +1 here. Dynamic scaffold == bad. Static == very good for newbies and learning.

- rob

+1, with the recent ReSTfullization I've also found that many controllers look the same and the static scaffolding has found it's place again.

Manfred

See ticket #7700 (http://dev.rubyonrails.org/ticket/7700).

Shall I put in a patch/ticket to add a deprecation warning to "scaffold"?

When something's deprecated, there's generally got to be something quick and easy the user can do about it. Change @flash to flash, etc. No point shouting at the user if the action they have to take is long and laborious.

We should mark it is deprecated in the documentation, then make sure that come 2.0 there's a plugin they can install for the same functionality.