design-patterns
Installation
SKILL.md
Design Patterns Skill
Based on: Dive Into Design Patterns by Alexander Shvets (Refactoring.Guru, 2019)
Core OOP Pillars (Quick Reference)
| Pillar | Definition |
|---|---|
| Abstraction | Model only the attributes/behaviors relevant to the current context — ignore the rest |
| Encapsulation | Hide implementation details behind a public interface; protect internals from the outside |
| Inheritance | Build new classes on top of existing ones; subclasses inherit state and behavior |
| Polymorphism | A program detects the real class of an object at runtime and calls its actual implementation |
Object Relations (weakest → strongest):
- Dependency — object uses another temporarily (method param / return)
- Association — object has a permanent link to another (field)
- Aggregation — "has-a" but component can exist independently
- Composition — "whole-part"; component only exists inside the container