Jump to content

Scaffold (programming)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by JumpMast3r (talk | contribs) at 08:15, 1 August 2006. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

What is Scaffolding:
Scaffolding is a function providedd by the RoR framework that allows a base for quickly entering data into the model.

Usage:
Scaffolding comes in two forms: either by adding the line "scaffold :model_name" to a controller, or by generating a scaffold with "script/generate scaffold model_name"

The first method creates a simple inteface for creation, reading(viewing), updating and deletion (known as CRUD). Simple scaffolding is commonly used for quickly entering test data into a database to facilitate developement. The advantage to this method is that is is extremely quick to activate. Even better simply removing the line from the controller will erase all trace of the scaffold.

The second method uses the generate script to create a complete set of views for each of the CRUD methods. This method is beneficial as a quckstart for creation of web applications. The script generated files which contain all the view and controller code. The code can be quickly edited and customized both in appearance and function.