Scaffolding

We have seen the temporary structure that is built outside the main building using bamboo or iron rods. This structure, known as scaffolding, is useful during construction of the main structure as well as during the maintenance of the building. This term was made popular by Ruby On Rails in the context of programming. And since then several other languages/frameworks support scaffolding in some or the other form.

What is Scaffolding?

Scaffolding is a technique used by some frameworks to create the basic structure of database using pre-defined templates and DB specifications. Primarily used by MVC frameworks, it generates final code for basic database operations such as CRUD (Create, Read, Update, and Delete). Thus the framework uses the specifications as a scaffold to generate basic code, on top of which additional functionality can be built.

Scaffolding
Scaffolding

Types of Scaffolding

  • Design Time
  • Run Time
  • Server Side
  • Client Side

In design time scaffolding, the code is generated during design time, is customized further to suit the application needs and the modified code is used when the application runs. Whereas in run-time scaffolding case, the final code is generated when the application runs. The developers can control the code generation using the templates.

Languages or Frameworks that support Scaffolding:

  • Ruby on Rails
  • Laravel
  • Spring Roo
  • Symfony
  • Apache Tapestry
  • More

Node.JS also has a separate scaffolding framework known as Yeoman which is very popular.

An important thing to note about scaffolding is that the code generated is usually only to speed up your initial setup. In almost every use case, you will be required to modify the generated code to make the application more meaningful and powerful.

Related Links

Related Keywords,

Laravel, Spring Roo, Symfony, Generators, Node.js

 

A Term A Day is an initiative to keep you updated with various technology terms – primarily in the software field. We present one term every day on this website. If you subscribe, you will get the new term delivered to your mailbox every day. Rest assured, we don’t spam 🙂 If you are already a subscriber and appreciate the value that this initiative brings in, please share this with your teams, colleagues and friends. Encourage them to subscribe.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.