Object-oriented design (notes)

Notes from reading Sandi Metz's Practical Object-Oriented Design in Ruby

Faux-OOD:

In a well-designed app, classes that are super complex don't change very much, & code that changes a lot is pretty simple - sweet spot of OOP!

OOD wants these types of objects:

  1. Decide roles - what is the common thing they do - inject a smarter thing
  2. Isolate the things you want to vary
  3. Push conditionals up the stack, back to the first place someone could have had enough info to pick the right object. Factories are where conditionals go.