Difference between revisions of "Boilerplate code"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(Created page with "In computer programming, '''boilerplate code''' (or '''boilerplate''') is the sections of code that have to be included in many places with little or no alteration. == De...")
 
(External links)
 
Line 20: Line 20:
  
 
* [https://en.wikipedia.org/wiki/Boilerplate_code Boilerplate code] @ Wikipedia
 
* [https://en.wikipedia.org/wiki/Boilerplate_code Boilerplate code] @ Wikipedia
 +
 +
[[Category:Computer programming]]
 +
[[Category:Software]]
 +
[[Category:Software development]]

Latest revision as of 19:20, 21 April 2016

In computer programming, boilerplate code (or boilerplate) is the sections of code that have to be included in many places with little or no alteration.

Description

Boilerplate code is often used when referring to languages that are considered verbose, i.e. the programmer must write a lot of code to do minimal jobs.

The need for boilerplate can be reduced through high-level mechanisms such as:

  • Metaprogramming (which has the computer automatically write the needed boilerplate text)
  • Convention over configuration (which provides good default values, reducing the need to specify program details in every project)
  • Model-driven engineering (which uses models and model-to-code generators, eliminating the need for boilerplate manual code)

A related term is bookkeeping code, referring to code that is not part of the business logic but is interleaved with it in order to keep data structures updated or handle secondary aspects of the program.

See also

External links