~/talk

A Few Good Design Patterns

Talkat CascadiaJS 2022 · 2022-08-30..09-02· [javascript, frontend-architecture]
slides:none on file

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

  1. 0:00Introduction
  2. 1:26Design patterns overview
  3. 3:14Feature flags for discounts
  4. 6:49Singleton for websockets
  5. 9:01Performance issues and observability
  6. 11:32Decorator pattern for tracing
  7. 14:22Proxy pattern for caching
  8. 19:59Fluent interface for duplication
  9. 22:11Next steps and learning styles
  10. 23:15Q&A and closing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.