Scaffolding, as used in
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, hardware and softw ...
, refers to one of two techniques:
*Code generation:
It is a 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 divides the related program logic into three interconnected elements. These elements are:
* the model, the internal representat ...
frameworks.
*Project generation:
It is a technique supported by various programming tools.
Code generation
Scaffolding in software development refers to automated code generation techniques that quickly produce the fundamental structure of software applications. Typically employed within
Model–view–controller
Model–view–controller (MVC) is a software architectural pattern commonly used for developing user interfaces that divides the related program logic into three interconnected elements. These elements are:
* the model, the internal representat ...
(MVC) and similar architectural patterns, scaffolding helps developers rapidly create code for common application functions and data interactions, particularly
CRUD operations.
Scaffolding evolved from earlier software development tools such as Oracle's CASE Generator and various other
4GL tools, designed to simplify the creation of robust database-driven applications.
Applications and frameworks
The concept gained widespread popularity through frameworks like
Ruby on Rails, known for its efficient generation of MVC structures and CRUD operations. Scaffolding is now supported by a wide range of development frameworks across different programming languages, including:
Ruby on Rails – Popularized scaffolding for MVC structures.
Django – Offers built-in admin interface and model-based scaffolding.
Express Framework (JavaScript) – Scaffolding for rapid REST API development.
Play Framework (Java/Scala) – Facilitates quick project setup and MVC scaffolding.
Laravel
Laravel is a open-source software, free and open-source PHP-based web framework for building web applications. It was created by Taylor Otwell and intended for the development of web applications following the model–view–controller (MVC) ar ...
(PHP) – Uses Artisan CLI for generating MVC components.
Symfony (PHP) – Provides flexible scaffolding options via maker bundles.
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 engin ...
(PHP) – Offers extensive scaffolding capabilities for MVC.
ASP.NET MVC (.NET) – Includes built-in scaffolding tools for controllers and views.
Spring Roo (Java) – Rapid development through extensive scaffolding.
Grails (Groovy) – Dynamic scaffolding and rapid prototyping.
Angular (JavaScript) – Utilizes Angular CLI for scaffolding components and services.
React.js (JavaScript) – Supports scaffolding through tools like Create React App.
Run-time vs. design-time scaffolding
Scaffolding can occur at two distinct phases of software development:
Design-time scaffolding: This occurs during the development phase, generating files and code structures that can be customized and maintained by the developer. Although highly customizable, extensive scaffolding at design-time may introduce complexity due to a large number of generated files, which developers need to manage and maintain manually.
Run-time scaffolding: This method dynamically generates and handles operations at run-time, minimizing manual file generation. Run-time scaffolding simplifies management but offers fewer customization options and may impact application performance.
Benefits and limitations
Scaffolding presents several advantages and disadvantages:
Benefits:
Accelerates development cycles.
Standardizes coding practices and promotes consistency.
Enhances rapid prototyping and iterative development.
Limitations:
Generated code may require extensive customization.
Can introduce unnecessary complexity for smaller or simpler applications.
May reduce developers' understanding of underlying code structures.
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 or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer.
Since a computer, at base, only ...
,
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 files ...
and
code tests, as well as files containing
license agreement
A license (American English) or licence (Commonwealth English) 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 part ...
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 Serfdom, servants in an Peerage of England, English royal or noble household. The term was first documented in Kingdom of England, mid-1 ...
,
Cargo
In transportation, cargo refers to goods transported by land, water or air, while freight refers to its conveyance. In economics, freight refers to goods transported at a freight rate for commercial gain. The term cargo is also used in cas ...
and Ritchie CLI. For
.NET
The .NET platform (pronounced as "''dot net"'') is a free and open-source, managed code, managed computer software framework for Microsoft Windows, Windows, Linux, and macOS operating systems. The project is mainly developed by Microsoft emplo ...
projects,
dotnet
, the command-line tool included with the .NET SDK, can be used to scaffold new projects.
See also
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
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