HOME

TheInfoList



OR:

Scaffolding, as used in computing, refers to one of two techniques: The first is a code generation technique related to database access in some
model–view–controller Model–view–controller (MVC) is a software architectural pattern commonly used for developing user interfaces that divide the related program logic into three interconnected elements. This is done to separate internal representations of info ...
framework A framework is a generic term commonly referring to an essential supporting structure which other things are built on top of. Framework may refer to: Computing * Application framework, used to implement the structure of an application for an op ...
s; the second is a project generation technique supported by various tools.


Code generation

Scaffolding is a technique supported by some
model–view–controller Model–view–controller (MVC) is a software architectural pattern commonly used for developing user interfaces that divide the related program logic into three interconnected elements. This is done to separate internal representations of info ...
framework A framework is a generic term commonly referring to an essential supporting structure which other things are built on top of. Framework may refer to: Computing * Application framework, used to implement the structure of an application for an op ...
s, in which the programmer can specify how the application database may be used. The
compiler In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs tha ...
or framework uses this specification, together with pre-defined code templates, to generate the final code that the application can use to
create, read, update and delete In computer programming, create, read, update, and delete (CRUD) are the four basic operations of persistent storage. CRUD is also sometimes used to describe user interface conventions that facilitate viewing, searching, and changing information ...
database entries, effectively treating the templates as a "
scaffold Scaffolding, also called scaffold or staging, is a temporary structure used to support a work crew and materials to aid in the construction, maintenance and repair of buildings, bridges and all other man-made structures. Scaffolds are widely used ...
" 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 A fourth-generation programming language (4GL) is any computer programming language that belongs to a class of languages envisioned as an advancement upon third-generation programming languages (3GL). Each of the programming language generation ...
client-server software development products. Scaffolding was made popular by the
Ruby on Rails Ruby on Rails (simplified as Rails) is a server-side web application framework written in Ruby under the MIT License. Rails is a model–view–controller (MVC) framework, providing default structures for a database, a web service, and we ...
framework. It has been adapted to other software frameworks, including OutSystems Platform, Express Framework, Blitz.js, Play framework, Django,
web2py Web2py is an open-source web application framework written in the Python programming language. Web2py allows web developers to program dynamic web content using Python. Web2py is designed to help reduce tedious web development tasks, such a ...
,
MonoRail A monorail (from "mono", meaning "one", and " rail") is a railway in which the track consists of a single rail or a beam. Colloquially, the term "monorail" is often used to describe any form of elevated rail or people mover. More accurat ...
, Brail,
Symfony Symfony is a free and open-source PHP web application framework and a set of reusable PHP component libraries. It was published as free software on October 18, 2005, and released under the MIT license. Goal Symfony aims to speed up the cre ...
,
Laravel Laravel is a free and open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the model–view–controller (MVC) architectural pattern and based on Symfony. Some of the features o ...
,
CodeIgniter CodeIgniter is an open-source software rapid development web framework, for use in building dynamic web sites with PHP. Popularity CodeIgniter is loosely based on the popular model–view–controller (MVC) development pattern. While controller c ...
,
Yii Yii is an open source, object-oriented, component-based MVC PHP web application framework. Yii is pronounced as "Yee" or i:and in Chinese it means "simple and evolutionary" and it can be an acronym for "Yes It Is!". History Yii started a ...
,
CakePHP CakePHP is an open-source web framework. It follows the model–view–controller (MVC) approach and is written in PHP, modeled after the concepts of Ruby on Rails, and distributed under the MIT License. CakePHP uses well-known software engineer ...
, Phalcon PHP, Model-Glue,
PRADO The Prado Museum ( ; ), officially known as Museo Nacional del Prado, is the main Spanish national art museum, located in central Madrid. It is widely considered to house one of the world's finest collections of European art, dating from the ...
, Grails,
Catalyst Catalysis () is the process of increasing the rate of a chemical reaction by adding a substance known as a catalyst (). Catalysts are not consumed in the reaction and remain unchanged after it. If the reaction is rapid and the catalyst recyc ...
,
Mojolicious Mojolicious is a real-time web application framework, written by Sebastian Riedel, creator of the web application framework Catalyst. Licensed as free software under the Artistic License v 2.0, it is written in the Perl programming language, and is ...
, Seam Framework,
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 Fr ...
,
JHipster JHipster is a free and open-source application generator used to quickly develop modern web applications and Microservices using Angular or React (JavaScript library) and the Spring Framework. Overview JHipster provides tools to generate a p ...
, ASP.NET Dynamic Data, KumbiaPHP and
ASP.NET MVC ASP.NET MVC is a web application framework developed by Microsoft that implements the model–view–controller (MVC) pattern. It is no longer in active development. It is open-source software, apart from the ASP.NET Web Forms component, which ...
framework's Metadata Template Helpers.


Run-time vs. design-time scaffolding

Scaffolding can occur at two different phases of the program lifecycle:
design time {{about, a technical topic, project management, software development process Program lifecycle phases are the stages a computer program undergoes, from initial creation to deployment and execution. The phases are edit time, compile time, link tim ...
and
run time Run(s) or RUN may refer to: Places * Run (island), one of the Banda Islands in Indonesia * Run (stream), a stream in the Dutch province of North Brabant People * Run (rapper), Joseph Simmons, now known as "Reverend Run", from the hip-hop group ...
. Design time scaffolding produces files of code that can later be modified by the programmer to customize the way the application database is used. However, for large-scale applications this approach may be difficult to maintain due to the sheer number of files produced, and the fact that the design of the files was largely fixed when they were generated or copied from the original templates. Alternatively, run time scaffolding produces code on the fly. It allows changes to the design of the templates to be immediately reflected throughout the application. But modifying the design of the templates may be more difficult or impractical in the case of run time scaffolding.


Scaffolding in Ruby on Rails

When the line scaffold :''model_name'' is added to a
controller Controller may refer to: Occupations * Controller or financial controller, or in government accounting comptroller, a senior accounting position * Controller, someone who performs agent handling in espionage * Air traffic controller, a person w ...
, 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 A prototype is an early sample, model, or release of a product built to test a concept or process. It is a term used in a variety of contexts, including semantics, design, electronics, and software programming. A prototype is generally used to ...
applications and entering test data into a database. 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. Note: As of Rails 2.0, dynamic scaffolding is no longer stored.


Server side vs Client side Scaffolding

Scaffolding techniques based on the application database typically involve
Server side In the client–server model, server-side refers to programs and operations that run on the server. This is in contrast to client-side programs and operations which run on the client. General concepts Typically, a server is a computer applicatio ...
frameworks. Server side web frameworks commonly perform operations directly against database entries, and code generation for these operations may be considered Server side Scaffolding. Alternatively,
Client side Client-side refers to operations that are performed by the client in a client–server relationship in a computer network. General concepts Typically, a client is a computer application, such as a web browser, that runs on a user's local comput ...
development often uses
frameworks A framework is a generic term commonly referring to an essential supporting structure which other things are built on top of. Framework may refer to: Computing * Application framework, used to implement the structure of an application for an op ...
that perform data transport operations instead of directly accessing the database. The focus of Client side Scaffolding is thus more on generating a starter template for the application as a whole, rather than generating code to access a database. Some Client side web frameworks, such as
Meteor A meteoroid () is a small rocky or metallic body in outer space. Meteoroids are defined as objects significantly smaller than asteroids, ranging in size from grains to objects up to a meter wide. Objects smaller than this are classified as mi ...
, allow the client to perform database operations in a manner similar to Server side frameworks. In this case, Scaffolding techniques can go beyond merely generating a starter template. They can perform
run time Run(s) or RUN may refer to: Places * Run (island), one of the Banda Islands in Indonesia * Run (stream), a stream in the Dutch province of North Brabant People * Run (rapper), Joseph Simmons, now known as "Reverend Run", from the hip-hop group ...
scaffolding of web forms on the
Client side Client-side refers to operations that are performed by the client in a client–server relationship in a computer network. General concepts Typically, a client is a computer application, such as a web browser, that runs on a user's local comput ...
to
create, read, update and delete In computer programming, create, read, update, and delete (CRUD) are the four basic operations of persistent storage. CRUD is also sometimes used to describe user interface conventions that facilitate viewing, searching, and changing information ...
database entries. One example of this is provided by an add-on to
Meteor A meteoroid () is a small rocky or metallic body in outer space. Meteoroids are defined as objects significantly smaller than asteroids, ranging in size from grains to objects up to a meter wide. Objects smaller than this are classified as mi ...
called aldeed:autoform.


Project generation

Complicated software projects often share certain conventions on project structure and requirements. For example, they often have separate folders for
source code In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the ...
,
binaries A binary file is a computer file that is not a text file. The term "binary file" is often used as a term meaning "non-text file". Many binary file formats contain parts that can be interpreted as text; for example, some computer document fil ...
and code tests, as well as files containing
license agreement A license (or licence) is an official permission or permit to do, use, or own something (as well as the document of that permission or permit). A license is granted by a party (licensor) to another party (licensee) as an element of an agreeme ...
s, release notes and contact information. To simplify the creation of projects following those conventions, "scaffolding" tools can automatically generate them at the beginning of each project. Such tools include
Yeoman Yeoman is a noun originally referring either to one who owns and cultivates land or to the middle ranks of servants in an English royal or noble household. The term was first documented in mid-14th-century England. The 14th century also witn ...
,
Cargo Cargo consists of bulk goods conveyed by water, air, or land. In economics, freight is cargo that is transported at a freight rate for commercial gain. ''Cargo'' was originally a shipload but now covers all types of freight, including tra ...
and Ritchie CLI.


See also

* (Productivity) * * * * * * * * * * * * * * * * * * *


References


External links


Getting Up and Running Quickly with Scaffolding
(From rubyonrails.org)
Rails Scaffolder's Toolbox - A GUI for the Rails Scaffolder Generators
(Mac only application, from the Mac App Store) {{DEFAULTSORT:Scaffold (Programming) Software architecture Computer programming Types of tools used in software development