Skip to main content

Creational Patterns: Singleton, Factory Method, and Prototype

  • Chapter
  • First Online:
Book cover Beginning SOLID Principles and Design Patterns for ASP.NET Developers
  • 1998 Accesses

Abstract

Gang of Four (GoF) patterns are classified into three categories: creational, structural, and behavioral. In this chapter, you will begin by dissecting a few creational patterns. As the name suggests, creational patterns are design patterns that deal with creation of objects, or object instantiation. The C# language uses the new keyword to instantiate an object of a class. Typically, you use the new keyword wherever that object is being utilized. However, this means you must specify a concrete type name at that location. In certain real-world scenarios, as you will learn in this and the next chapter, it becomes necessary to isolate the object instantiation logic and code from the class that utilizes the object. That’s where creational patterns come into the picture.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 89.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Bipin Joshi

About this chapter

Cite this chapter

Joshi, B. (2016). Creational Patterns: Singleton, Factory Method, and Prototype. In: Beginning SOLID Principles and Design Patterns for ASP.NET Developers. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-1848-8_3

Download citation

Publish with us

Policies and ethics