From the course: iOS Development: Architecture

Introduction to the SOLID principles

From the course: iOS Development: Architecture

Start my 1-month free trial

Introduction to the SOLID principles

- [Instructor] If the software works as expected, that doesn't necessarily mean that it has a good design. What's good design, by the way? While there's no one precise answer to this question, there are specific criteria that help us identify a bad design. Rigidity, a single code change starts a cascade of changes in other parts of the system. The impact and the cost of a change are impossible to predict. Such software is hard to modify or enhance. Fragility, changes to one part lead to failures in unrelated parts of the system. Fixing the new problems create even more bugs which eventually leads to what we know as maintenance hell. Immobility, it's hard to reuse in another application because of the tight coupling between the components. Extracting the parts that we want to reuse implies high development efforts. The cost of re-implementing the functionality may be lower than separating the required parts from the existing system. SOLID is an acronym for five fundamental object-oriented design principles that try to address these traits. SOLID stands for single responsibility, open/closed principle, Liskov substitution principle, interface segregation and dependency inversion. These are the pillars of well-written, object-oriented systems. By adopting the SOLID design principles, we ensure that we build software systems that are flexible, robust and reusable. Let's dive into each of these concept.

Contents