O'Reilly logo

Design Patterns Explained: A New Perspective on Object-Oriented Design, Second Edition by Alan Shalloway, James R. Trott

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Part VIIFactories

Part Overview

Factory patterns help with the creation of objects. But that may not be their most important use. Seen from the new perspective, they are much more.

Chapter

Discusses These Topics

20

Lessons from Design Patterns Factories

I describe how following the principles and practices of patterns implies we have to separate the use of objects from the construction/management of objects, hence factories.

21

Singleton and Double-Checked Locking Pattern

I describe a couple of simple factories that ensure only one object of a type exists.

22

The Object Pool Pattern

I relate a past project I was on in which I derived the Object-Pool pattern from the practices I learned from patterns. This ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required