Chapter 18: Other Creational Patterns
In the previous chapter, we covered a third creational pattern, builder, which offers a nice way of creating the various parts of a complex object. Apart from the factory method, the abstract factory, and the builder patterns covered so far, other creational patterns are interesting to discuss, such as the prototype pattern and the singleton pattern.
In this chapter, we will discuss the following topics:
- Implementing the prototype pattern
- Implementing the singleton pattern
These topics will complete our discussions on creational patterns and help cover the use cases where the design patterns we have seen so far are not appropriate. By the end of the chapter, we will have an overall understanding of creational patterns and the use cases of each one.