A Few Good Design Patterns
summary
Prototype shows a working set of patterns: a feature flag flips a 90% discount via a vendor SDK isEnabled call but spawns a websocket per check, so a Singleton wraps the vendor client to guarantee one websocket instance and stop the leak. Observability uses the Performance API wrapped as a decorator in TypeScript to trace function timing, a proxy plus Map caches function calls, and structuredClone implements deep cloning; sales jump 10,000% in the example.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:26Design patterns overview
- 3:14Feature flags for discounts
- 6:49Singleton for websockets
- 9:01Performance issues and observability
- 11:32Decorator pattern for tracing
- 14:22Proxy pattern for caching
- 19:59Fluent interface for duplication
- 22:11Next steps and learning styles
- 23:15Q&A and closing
related talks
38m"Design Patters for Modern JavaScript"
49mDesign Patterns for Modern Javascript
54mPatterns for Programming in JavaScript
52mJavaScript Design Patterns
29mA Design Pattern Goes to the Supermarket
11m⚡Lightning Talk: No More If-Else Soup: Scalable Feature Flag Architecture With Design Patterns
02h 14mDesign Patterns Workshop
58mImmutable Patterns of System Design; From Monolith to Agentic AI
