Software Patterns and Design with AngularJS
summary
Focus lies on Angular 1.x with concrete claims: services are injected singletons used as caches facades and factories (providers are injected singletons too), data binding implements the observer pattern, and directives can use a directive proxy object or polymorphic models to render heterogeneous items. Examples and tools include a wizard component driven by a proxy object, ng-include for template-per-model rendering, Restangular and ECMA6 Weak Map as implementation notes, and anti-patterns like huge controllers, modal-global state, and prototype-chain coupling.
AI-written summary · about
chapters (7)
- 0:00Start
- 9:04Data binding • Data binding is an implementation of the traditional observer pattern. o Prevents tight coupling between independent parts
- 10:58Inheritance for services & controllers Standard JavaScript prototypal inheritance can be used with services and controllers.
- 12:15Inheritance for services & controllers • Standard JavaScript prototypal inheritance can be used with services and controllers. • Customize services in a common library Modify Ul component behavior by extending
- 13:18Thick Models • Models are a good place to encapsulate common domain logic
- 17:22Polymorphism and Directives We can move responsibilities normally belonging to the directive into the model.
- 21:05"Forgot About Dialogs" Global State Using services to store "per-page" state and clearing upon route change.
related talks
59mWeild AngularJS Like A Pro
18mFlexible data flow architecture in Angular
27mAngular Architecture: From Patterns to Implementation
28mUnleash The Power Of Angular With Knowledge of Patterns
24mDay 2 Keynote, Angular Architecture Concepts and Practices
38mIntroduction to AngularJS
40mAdvanced UI, Plugins and Components in AngularJS
28mFrom Scratch to Screen: The Art of Component Design in Angular
