OO design patterns
Object-oriented design patterns solve many common software design problems, as follows, that architects come across every day:
- Finding appropriate objects
- Determining object granularity
- Specifying object interfaces
- Specifying object implementations
- Programming to an interface, not an implementation
- Putting the reuse mechanism to work
We will touch upon some of the common problems and how design patterns solve the mentioned glitches in this section and cover OO design patterns in detail.
We can categorize the patterns into three types: creational, structural, and behavioral. Refer to the table at the end of this chapter, which depicts the patterns and its categories as a simple reference before we move ahead with the details.
Creational design patterns
The creational patterns intend to advocate a better way of creating objects or classes, and its primary focuses are as follows:
- Abstracting the class instantiation process
- Defining ways to create, compose, and represent objects and hide...