Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I sometimes see the term "Bootstrapper". I saw it last when creating some learning exercises for Prism. I stumbled upon UnityBootstrapper class. My question is: when would you call a class a "Bootstrapper"? Why? What does it say about the class?

share|improve this question
3  
Check out the Wikipedia article –  ChrisF Jul 27 '11 at 15:37
    

4 Answers 4

up vote 16 down vote accepted

In your specific example you're talking about a Dependency Injection Container Bootstrapper. This is where you configure all of your instances and generally prepare the container for use.

It also ends up being where most of the coupling in your application resides (it has to reside somewhere), but this is a side effect, not the purpose.

In more general terms, a bootstrapper is just a class or method which prepares/configures a group of classes/objects or an entire API for your specific needs and use.

share|improve this answer

In the general sense, there is an excellent answer over at EL&U.SE to the question What's the meaning of “bootstrap”?:

Bootstrap refers to a process that is akin to picking oneself up by the bootstraps. The idea is that it is physically impossible to lift yourself by bending over and trying to "lift".

Bootstrapping refers to doing exactly that but in a way analogous to physics. Computing is the most common area I hear the term. A program that bootstraps itself is one that begins with an extremely trivial operation and then uses that to continue the startup process internally. In a strict sense, the program does need help for the very first step but once that happens it doesn't need any external help.

As such, the UnityBootstrapper would logically be a class that allows your application to pick itself up by it's bootstraps, an assertion confirmed by the MSDN page for the class.

Base class that provides a basic bootstrapping sequence that registers most of the Composite Application Library assets in a IUnityContainer.

Remarks: This class must be overriden to provide application specific configuration.

share|improve this answer

Usually it means something which, given a minimal set of data, builds a complete object. For example a YieldCurveBootstrapper takes market quotes (deposit rates, swap rates, etc.) and builds a calibrated yield curve.

share|improve this answer

In low level terminology, a bootstrapper is a piece of code loaded on bootup which configures memory and the environment before triggering the operating system's entry point.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.