From the course: Practical Design Patterns in Swift

What’s a software design pattern? - Swift Tutorial

From the course: Practical Design Patterns in Swift

Start my 1-month free trial

What’s a software design pattern?

- [Narrator] Software developers need to solve various problems. Many times, these problems are the same, or similar, to the ones they've already encountered in other projects. Wouldn't it be great to apply the solution you found instead of reinventing the wheel over and over again? That's precisely the reason why software design patterns exist. A design pattern is a standardized way to address a recurring problem. Relying on a proven strategy will not only save you time, but you can rest assured that it's indeed the right choice. Design patterns are the result of a long evolution process. It all started with a book published in 1994 called Design Patterns: Elements of Reusable Object-Oriented Software. That's quite a long title so we usually refer to it as the book by the Gang of Four. The Gang of Four consists of four renowned software engineers: Erich Gamma, Ralph Johnson, Richard Helm, and Jon Vlissides. They identified the most significant common issues that occurred in multiple projects and developed best practices to solve them. The best part, the solutions are programming language agnostic. You can use the design patterns with any object-oriented programming language. Moreover, many modern programming languages and frameworks have integrated the Gang of Four patterns. You don't have to write additional code to support, say, the iterator or the observer. Swift is no exception. Actually, it provides many advanced language features and constructs such as, type extensions, lazy initialization, and predefined protocols. These let you adopt and integrate the design patterns into our projects easily. We're going to talk about these and many more later in this course.

Contents