Episode #312

Open Closed Principle

Series: S.O.L.I.D.

13 minutes
Published on November 21, 2017

This video is only available to subscribers. Get access to this video and 506 others.

The Open Closed Principle (or OCP) states that a class should be open for extension, but closed for modification. The goal is to write classes that are more stable, and don't require constant changes themselves to support every scenario the software encounters. Instead, having a stable class to inherit from can provide a nice extension point for our software to customize it for other needs.

This episode uses Xcode 9.1-beta1, Swift 4.