Questions tagged [scaffolding]

Scaffolding is a meta-programming method of building database-backend software applications.

Scaffolding is a meta-programming method of building database-backend software applications. It is a technique supported by some model-view-controller frameworks (like Ruby on Rails, CodeIgniter, Spring Roo among many others) in which the programmer may write a specification that describes how the application database may be used. Some tool uses this specification to generate code to cover basic CRUD (Cread Read, Update, Delete) functionality, effectively treating the template as a scaffold on which to build a more powerful application. (View Wikipedia definition)

In many cases this scaffold can and has to be modified if we want to achieve more complex functionality and it's a reason why this feature is not recommended in complex sites.

Recently the term scaffolding has also been used for the use of pre-defined layouts or grids in CSS frameworks like Twitter-Bootstrap.

977 questions
500
votes
24 answers

Undo scaffolding in Rails

Is there any way to 'undo' the effects of a scaffold command in Rails?
Daniel
  • 15,492
  • 18
  • 62
  • 83
112
votes
7 answers

What is scaffolding? Is it a term for a particular platform?

Scaffolding, what is it? Is it a Rails-only thing?
AnonymousAnonymous
64
votes
8 answers

Why do Ruby on Rails professionals NOT use Scaffolding?

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…
tmaximini
  • 8,174
  • 5
  • 44
  • 68
52
votes
22 answers

Is there a CRUD generator utility in Java(any framework) like Scaffolding in Rails?

Is there a CRUD generator utility in Java like Scaffolding in Rails? Can be in any framework or even plain servlets. Must generate controllers + views in jsp, not just DAO code...
Sathish
  • 19,050
  • 22
  • 57
  • 69
38
votes
3 answers

Create relationships when scaffolding

Hi I am new to Ruby on Rails. I am trying to create a small blog site. I have two tables Posts and Comments. Each Post will have many comments. I generate the tables using these commands. rails g scaffold Post title:string body:text…
Stefan Bossbaly
  • 6,294
  • 9
  • 49
  • 80
34
votes
5 answers

Entity Framework Core creating model from existing database

With Entity Framework Core, how do you generate the EF model and the entities? According to ASP.NET Core - Existing Database Microsoft article you need to run a command like this one in the Package Manager Console: Scaffold-DbContext…
Dean Kuga
  • 11,160
  • 7
  • 52
  • 102
31
votes
8 answers

How to avoid Rails scaffold to place model into namespace

Rails 3 scaffold generator places model classes inside namespace. Example: rails generate scaffold admin/portfolio But I want only controllers and views to be placed inside admin namespace. How can I avoid that?
Alexey Zakharov
  • 23,564
  • 38
  • 122
  • 190
30
votes
6 answers

Is there any adequate scaffolding for Django? (à la Ruby on Rails)

Is there any adequate scaffolding for Django? It may be in the newly released 1.3 version, but I haven't found it yet.
sultan
  • 5,468
  • 12
  • 55
  • 101
30
votes
6 answers

How to complete the rspec put controller test from scaffold

I'm using scaffolding to generate rspec controller tests. By default, it creates the test as: let(:valid_attributes) { skip("Add a hash of attributes valid for your model") } describe "PUT update" do describe "with valid params" do …
Dan Kohn
  • 31,010
  • 8
  • 77
  • 99
29
votes
0 answers

ASP.NET MVCScaffolding is very slow

We try to use ASP.NET MVC Scaffolding ( http://blog.stevensanderson.com/2011/01/13/scaffold-your-aspnet-mvc-3-project-with-the-mvcscaffolding-package , http://mvcscaffolding.codeplex.com/). Great tool, but please any advice why is it so slow? The…
28
votes
4 answers

Backend administration in Ruby on Rails

I'd like to build a real quick and dirty administrative backend for a Ruby on Rails application I have been attached to at the last minute. I've looked at activescaffold and streamlined and think they are both very attractive and they should be…
srboisvert
  • 12,479
  • 15
  • 61
  • 85
26
votes
7 answers

There are no scaffolders supported for this item Visual Studio 2019

I'm using Visual Studio 2019 version 16.0.4, and I tried to create a view or a partial one on asp.net core 2.1 (in views folder) but I get an error There are no scaffolders supported for this item Then I realized this problem happens when you…
26
votes
3 answers

How can I make scaffold only for controller and views if model already exists?

I already have set up Devise to My App. So User model is already generated, and exists by installing Devise Now I'd like to add my own controller users_controller.rb and its views index and show. How can I make scaffold without affecting to User…
MKK
  • 2,663
  • 4
  • 28
  • 49
25
votes
17 answers

MVC4 Scaffolding Add Controller gives error "Unable to retrieve metadata..."

I'm using RTM version of Windows 8 and VS 2012 Ultimate. I have a MVC4 project using SqlCe 4.0 with a code first entity framework model. Model is very simple: public class MyThing { public int MyThingId { get; set; } public…
Jack Ukleja
  • 12,190
  • 10
  • 65
  • 101
24
votes
3 answers

Scaffolding ActiveRecord: two columns of the same data type

Another basic Rails question: I have a database table that needs to contain references to exactly two different records of a specific data type. Hypothetical example: I'm making a video game database. I have a table for "Companies." I want to have…
Adam Rezich
  • 2,972
  • 5
  • 28
  • 39
1
2 3
65 66