Object Oriented Programming - bradyclifford/sdlc GitHub Wiki

Great talk about OOP by Sandi Metz: https://youtu.be/XXi_FBrZQiU

Churn vs. Complexity

Affordances

  1. Anthropomorphic: objects have life
  2. Polymorphism: mimic, conform to same API
  3. Loose coupling
  4. Role Playing: same as mimicking, conforms to same API
  5. Factory Created: hide conditions that choose objects
  6. Message Sending: shouldn't know the implementation

Key notes for me:

  • Reduce your execution paths
  • Dependency Injection is your friend
  • Balance between procedurally and OOP, don't swing the pendulum to either side, find the right balance
  • Factories are a good thing
  • Don't use methods or classes to just hide code (edited)