Category Archives: OO design

OO Design is more about ‘Doing’ than ‘Being’

One of the most profound insights I have learnt about OO is that software design — the shaping of code & classes — is best informed by what processing needs to do, rather than the entities it goes between.

This makes sense on a fundamental level. The purpose of most software is to process & transform data. Algorithms (like quicksort for example) have the same structure, regardless of what data they’re processing. In short, design of the machine should be based on what does it do rather than what its inputs look like at rest. Continue reading

‘Advanced OO Design’ series

Real software sees entities (Customer, File etc) involved in multiple interactions. Simple OO examples model behavior in entity classes directly, but this becomes tangled as behaviors & interactions increase; and results in broken inheritance structures.

Instead of modelling these all in the entity, a more advanced OO approach considers separating behavior from the entity. We’ll consider key principles in this multi-part series. Continue reading