OCP — The Open-Closed Principle

The Open-Closed principle is a part of SOLID, a mnemonic acronym that bundles a total of 5 design principles.

It is often associated with clean code.

But what exactly is it, is it important to you, should you even care?

What does it state?

The statement it sets is pretty straight-forward:

--

--

--

Software Engineer - Content Creator

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

AV Ecosystem Review: Adding NodeJS Tests

Designing DB models

Combat Improvements

Is the Cloud Solving Your Microsoft License Compliance Headaches?

Things you should know about Kerberos in Hadoop Clusters

Summary of Django Tutorial by Net Ninja (Part 1 of 3)

SQL Databases — Injection Attack Series

When to test

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Oliver Jumpertz

Oliver Jumpertz

Software Engineer - Content Creator

More from Medium

3 Scenarios Where You Shouldn’t Use Arrow Functions

I re-wrote Array in JavaScript

You Can Master Async/Await with 7 Diagrams

When is it okay to duplicate code?