Scalable JavaScript architecture
summary
Claims a concrete, modular architecture: five favorite patterns (revealing module, mediator, singleton/factory, facade) applied to a split-up HTML5 audio player that replaces one big global blob. Uses npm modules and bundlers (webpack/browserify), shows how a mediator publish/subscribe decouples play button audio and video, and recommends immutability or cloning (mutable.js, icepick, lodash) to avoid shared-state bugs. Adds offline-first with service workers progressive web apps. Results: easier debugging, unit and regression testing, and safer refactoring.
AI-written summary · about
chapters (11)
- 0:00Intro
- 0:20The global blob
- 4:41Use Design patterns
- 5:21Design Patterns Elements of Reusable Object-Oriented Software Erich Gamma Richard Helm Ralph Johnson John Vlissides
- 7:425 design patterns For scalable javascript architecture
- 8:23Module Pattern • Reveal only what you want • Highly testable • Private functions and variables
- 18:55Dependency Inject All the things!
- 20:55Mediator pattern
- 28:56Pass by reference
- 31:26Facade pattern
- 33:17Study the language Be critical of frameworks Modularize Use mediator to cut deps Use creational patterns Hide innerworkings • Use the right pattern in the right place
related talks
04mDevelopment of JavaScript applications
38m"Design Patters for Modern JavaScript"
01h 13mArchitecting complex JavaScript setups for large scale enterprise projects
19mModularity Matters
41mThe future is modules not frameworks. JS modules Architecture demo.
49mDesign Patterns for Modern Javascript
12mRip your player's face off
29mDesigning very large JavaScript applications
