Introduction
When object-oriented programming was introduced, the developers noticed that there were some objects or classes that were programmed following the same philosophy.
Xerox labs, for example, introduced the Model-View-Controller pattern in the 70s to develop programs using SmallTalk. A few other patterns were introduced by Xerox, but they were not called this.
When a book called Design Patterns was released in 1994, written by the Gang of Four, it brought solutions for common engineering problems. It demonstrated that the main problem with software development costs was maintenance; the usage of design patterns would cause a high cost in the first phase of software development but it would significantly reduce the maintenance costs.
Nowadays, design patterns are so important that it is very common to talk about them in job interviews. If you are experienced in Swift or Objective-C, you've already used some of these patterns without realizing.
In this chapter, we will cover a...