- Represent our ideas
- Manage Complexity
- Abstraction - Figuring out what abstractions express our requirements
- Polymorphism - Using multiple abstractions in the same way
- Inheritance - Sharing Implementation
- Encapsulation - Hiding Implementation Details
- Objects - Instances of Classes
- Mixins -
module
andinclude
- Interfaces - Set of Public Methods
- Classes - Object Factories
- State - Instance Variables
- Behaviours - Methods and Implementations
- Abstract Class - An Incomplete Class
- Duck Typing - Presence of a quack method
- Single Responsibility - Objects and Methods
- Law Demeter - Don't reach inside other objects
- What vs How - Interface specifies what to do not how
- Stack Exchange
- Composition - A Composition of Owned Components
- Aggregation - An Aggregation of Independent Parts
- Think about Interface before Implementation
- Abstraction - Only add the State and Behaviour you need
- If Objects are the Cookies, Classes are the Cookie Cutters