Scaffold (programming)
Encyclopedia
Scaffolding is a meta-programming method of building database
Database
A database is an organized collection of data for one or more purposes, usually in digital form. The data are typically organized to model relevant aspects of reality , in a way that supports processes requiring this information...

-backend software applications. It is a technique supported by some model-view-controller
Model-view-controller
Model–view–controller is a software architecture, currently considered an architectural pattern used in software engineering. The pattern isolates "domain logic" from the user interface , permitting independent development, testing and maintenance of each .Model View Controller...

 framework
Software framework
In computer programming, a software framework is an abstraction in which software providing generic functionality can be selectively changed by user code, thus providing application specific software...

s, in which the programmer may write a specification that describes how the application database may be used. The compiler
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...

 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
Scaffolding
Scaffolding is a temporary structure used to support people and material in the construction or repair of buildings and other large structures. It is usually a modular system of metal pipes or tubes, although it can be from other materials...

" on which to build a more powerful application.

Scaffolding is an evolution of database code generators from earlier development environments, such as Oracle's CASE Generator, and many other 4GL
Fourth-generation programming language
A fourth-generation programming language is a programming language or programming environment designed with a specific purpose in mind, such as the development of commercial business software. In the history of computer science, the 4GL followed the 3GL in an upward trend toward higher...

 client-server software development products.

Scaffolding was popularized by the Ruby on Rails
Ruby on Rails
Ruby on Rails, often shortened to Rails or RoR, is an open source web application framework for the Ruby programming language.-History:...

 framework. It has been adapted to other software frameworks, including Django, Monorail (.Net)
Monorail (.Net)
MonoRail , a component of the Castle Project, is an open source web application framework built on top of the ASP.NET platform. Inspired by Ruby on Rails Action Pack, MonoRail differs from standard ASP.NET Web Forms development by enforcing separation of concerns using a model-view-controller ...

, Symfony
Symfony
Symfony is a web application framework written in PHP which follows the model-view-controller paradigm. Released under the MIT license, Symfony is free software...

, CodeIgniter, Yii
Yii
Yii is an open source, object-oriented, high-performance component-based PHP web application framework. Yii is pronounced as "Yee" or [ji:] and it's an acronym for "Yes It Is!".- History :...

, CakePHP
CakePHP
CakePHP is an open source web application framework for producing web applications. It is written in PHP, modeled after the concepts of Ruby on Rails, and distributed under the MIT License.-History:...

, Model-Glue
Model-Glue
Model-Glue is an OO web application framework based on the MVC design pattern. Its goal is to simplify development of OO ColdFusion applications...

, Grails
Grails (Framework)
Grails is an open source web application framework which uses the Groovy programming language . It is intended to be a high-productivity framework by following the "coding by convention" paradigm, providing a stand-alone development environment and hiding much of the configuration detail from the...

, Catalyst
Catalyst (software)
Catalyst is an open source web application framework written in Perl, that closely follows the model–view–controller architecture, and supports a number of experimental web patterns. It is written using Moose, a modern object system for Perl...

, Seam Framework
JBoss Seam
Seam is a web application framework developed by JBoss, a division of Red Hat.- Seam 3 :Seam 3 is very active project consisting of over 50 developers and engineers, which provides a modular set of extensions to the CDI programming model...

, Spring Roo
Spring Roo
Spring Roo is an open source software tool that uses convention-over-configuration principles to provide rapid application development of Java-based enterprise software. The resulting applications use common Java technologies such as Spring Framework, Java Persistence API, Java Server Pages, Apache...

, ASP.NET Dynamic Data
ASP.NET Dynamic Data
ASP.NET Dynamic Data is a Ruby on Rails-inspired web application scaffolding framework from Microsoft, shipped as an extension to ASP.NET, that can be used to build data driven web applications. It exposes tables in a database by encoding it in the URI of the ASP.NET web service, and the data in...

 and ASP.NET MVC
ASP.NET MVC Framework
The ASP.NET MVC Framework is a web application framework that implements the model-view-controller pattern. Based on ASP.NET, it allows software developers to build a Web application as a composition of three roles: Model, View and Controller. A model represents the state of a particular aspect of...

 Framework's Metadata Template Helpers.

Scaffolding in Ruby on Rails

When the line scaffold :model_name is added to a controller, Rails 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.
Note, as of Rails2.0, dynamic scaffolding is no longer stored

Scaffold generation

The programmer may also run an external command to generate Ruby code for the scaffold in advance: rails 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.

See also

  • ASP.NET MVC Scaffolding
  • ASP.NET Dynamic Data
    ASP.NET Dynamic Data
    ASP.NET Dynamic Data is a Ruby on Rails-inspired web application scaffolding framework from Microsoft, shipped as an extension to ASP.NET, that can be used to build data driven web applications. It exposes tables in a database by encoding it in the URI of the ASP.NET web service, and the data in...

  • Ruby on Rails
    Ruby on Rails
    Ruby on Rails, often shortened to Rails or RoR, is an open source web application framework for the Ruby programming language.-History:...

  • CodeIgniter
  • CakePHP
    CakePHP
    CakePHP is an open source web application framework for producing web applications. It is written in PHP, modeled after the concepts of Ruby on Rails, and distributed under the MIT License.-History:...

  • Monorail (.Net)
    Monorail (.Net)
    MonoRail , a component of the Castle Project, is an open source web application framework built on top of the ASP.NET platform. Inspired by Ruby on Rails Action Pack, MonoRail differs from standard ASP.NET Web Forms development by enforcing separation of concerns using a model-view-controller ...


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK