Scaffold (programming)

Scaffold (programming)

Scaffolding is a meta-programming method of building database-backed software applications. It is a technique supported by some model-view-controller frameworks, in which the programmer may write a specification that describes how the application database may be used. The compiler uses this specification to generate code that the application can use to create, 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, including Monorail (.Net), CodeIgniter, Symfony, CakePHP, Model-Glue, Grails, Gaia Flash Framework and ASP.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 for prototyping 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". The generate 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.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • Scaffold (disambiguation) — Scaffold and scaffolding may refer to:*Instructional scaffolding, the provision of sufficient supports to promote learning when concepts and skills are being first introduced to students *Scaffolding, in construction, a temporary structure that… …   Wikipedia

  • Nerve guidance conduit — A nerve guidance conduit (also referred to as an artificial nerve conduit or artificial nerve graft, as opposed to an autograft) is an artificial means of guiding axonal regrowth to facilitate nerve regeneration and is one of several clinical… …   Wikipedia

  • DNA nanotechnology — seeks to make artificial, designed nanostructures out of nucleic acids, such as this DNA tetrahedron.[1] Each edge of the tetrahedron is a 20 base pair DNA double helix, and each vertex is a three arm junction. DNA n …   Wikipedia

  • RNA structure — The functional form of single stranded RNA molecules frequently requires a specific tertiary structure. The scaffold for this structure is provided by secondary structural elements which are hydrogen bonds within the molecule. This leads to… …   Wikipedia

  • nervous system, human — ▪ anatomy Introduction       system that conducts stimuli from sensory receptors to the brain and spinal cord and that conducts impulses back to other parts of the body. As with other higher vertebrates, the human nervous system has two main… …   Universalium

  • Michael Crichton — at Harvard University (April 18, 2002) Born John Michael Crichton October 23, 1942(1942 10 23) Chicago, Illinois, U.S …   Wikipedia

  • Stone Cold Steve Austin — Born Steven James Anderson December 18, 1964 (1964 12 18) (age 46) Victoria, Texas, U.S …   Wikipedia

  • Glade Interface Designer — Infobox Software name = Glade caption = Designing a preferences dialog in Glade released = April 18, 1998 latest release version = 3.4.5 latest release date = release date and age|2008|5|5 latest preview version = 3.5.2 latest preview date =… …   Wikipedia

  • Fle3 — Infobox Software name = Fle3 Future Learning Environment developer = Fle3 Team latest release version = 1.5 latest release date = April 2005 operating system = Cross platform genre = Collaborative software for learning license = GPL website =… …   Wikipedia

  • Grails (framework) — Infobox Software name = Grails caption = author = developer = released = latest release version = 1.0.3 latest release date = release date|2008|6|6 operating system = Cross platform platform = Cross platform (JVM) language = programming language …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”