This is the presentation I gave last night to the GTAPHP Meetup Group about the Open/Closed Principal – the ‘O’ in SOLID. The idea is to provide strategies for code re-use which allow you to leave your debugged code alone when extending it for new features. We look at the classical OOP inheritance pattern, the Template Method pattern, the Data Mapper pattern and the Strategy pattern in this presentation.

Here are my own notes I used during the presentation so I wouldn’t get lost with my code edits:

You can work through all the key checkpoints in the refactoring process by following the commits on github.