🧩Design Pattern
3 posts
Show
- Factory Pattern: Centralizing Object Creation So Nothing Else Has To— When object creation logic varies by type, put it in one place. Factory means callers only say what they want — never how to build it.#design-pattern#factory#kotlin#android#ood2 min read
- Observer Pattern: Notifying Many Without Knowing Who's Listening— One state change, multiple reactions, zero direct dependencies. Observer lets a subject broadcast to whoever subscribed without caring what they do with it.#design-pattern#observer#kotlin#android#ood2 min read
- Strategy Pattern: Swapping Algorithms Without Touching the Caller— Same goal, different algorithms, zero if/else chains. Strategy wraps each pricing rule in its own class so adding a new one never touches existing code.#design-pattern#strategy#kotlin#android#ood2 min read