- Scaffold (programming)
Scaffolding is a
meta-programming method of buildingdatabase -backedsoftware application s. It is a technique supported by some model-view-controllerframework s, in which the programmer may write a specification that describes how the application database may be used. Thecompiler uses this specification to generate code that the application can use tocreate, read, update and delete database entries, effectively treating the template as a "scaffold" on which to build a more powerful application.Scaffolding was popularized by the
Ruby on Rails framework. It has been adapted to other software frameworks, includingMonorail (.Net) ,CodeIgniter ,Symfony ,CakePHP ,Model-Glue , Grails,Gaia Flash Framework andASP.NET 3.5 Framework .caffolding in Ruby on Rails
There are two ways to produce a scaffold in Ruby on Rails: "dynamic scaffolding" and "scaffold generation."
Dynamic scaffolding
When the line
scaffold :"model_name"
is added to a controller, Ruby will automatically generate all of the appropriate data interfaces at run time. Since the API is generated on the fly, the programmer cannot easily modify the interfaces generated this way. Such a simple scaffold is often used forprototyping applications and entering test data into a database.caffold generation
The programmer may also run an external command to generate Ruby code for the scaffold in advance:
script/generate scaffold "model_name"
. Thegenerate
script will produce files of Ruby code that the application can use to interact with the database. It is somewhat less convenient than dynamic scaffolding, but gives the programmer the flexibility of modifying and customizing the generated APIs.ee also
*
Ruby on Rails
*CakePHP
*Monorail_(.Net)
*CodeIgniter External links
* [http://rails.rubyonrails.com/classes/ActionController/Scaffolding/ClassMethods.html Scaffolding Method Reference (From rubyonrails.org)]
* [http://wiki.rubyonrails.org/rails/pages/Scaffold Scaffold in Ruby on Rails (From rubyonrails.org)]
* [http://www.cakephp.org The CakePHP Framework]
* [http://www.symfony-project.com/ The symfony Framework]
* [http://www.akelos.org/ Akelos PHP Framework]
* [http://www.model-glue.com/ The Model-Glue Framework]
* [http://www.phpscaffold.com/ Simple CRUD page maker for PHP/MySQL]
* [http://www.gaiaflashframework.com/ The Gaia Flash Framework]
* [http://www.castleproject.org Castle Monorail]
* [http://www.asp.net/DynamicData Asp.Net Dynamic Data]
Wikimedia Foundation. 2010.