javascript design patterns
TRANSCRIPT
JAVASCRIPTDESIGN PATTERNSVictor Perez
/ INTRODUCTION
⁄ ⁄ ⁄
● Proven solutions
● Reusable
● Expressive
● Categories
○ Creational
○ Structural
○ Behavioral
○ Architectural
○ Concurrency
○ and more...
DESIGN PATTERNSINTRODUCTION
/ CREATIONAL
⁄ ⁄ ⁄
● Gang of Four (GoF)
○ Abstract factory pattern
○ Factory method pattern
○ Builder pattern
○ Prototype pattern
○ Singleton pattern
OVERVIEWCREATIONAL
⁄ ⁄ ⁄
FACTORY METHODCREATIONAL
⁄ ⁄ ⁄
SINGLETONCREATIONAL
/ STRUCTURAL
⁄ ⁄ ⁄
● Gang of Four (GoF)
○ Adapter
○ Bridge
○ Composite
○ Decorator
○ Facade
○ Flyweight
○ Proxy
OVERVIEWSTRUCTURAL
⁄ ⁄ ⁄
PROXYSTRUCTURAL
⁄ ⁄ ⁄
FACADESTRUCTURAL
/ BEHAVIORAL
⁄ ⁄ ⁄
● Gang of Four (GoF)
○ Chain of responsibility
○ Command
○ Interpreter
○ Iterator
○ Mediator
○ Memento
○ Observer
○ State
○ Strategy
○ Template method
○ Visitor
OVERVIEWBEHAVIORAL
⁄ ⁄ ⁄
CHAIN-OF-RESPONSIBILITYBEHAVIORAL
⁄ ⁄ ⁄
OBSERVERBEHAVIORAL
/ ARCHITECTURAL
⁄ ⁄ ⁄
MVCARCHITECTURAL
● Model
● View
● Controller
⁄ ⁄ ⁄
PUBLISH–SUBSCRIBEARCHITECTURAL
● Loose coupling
● Scalability
● Message filtering
○ topic-based
○ content-based
/ QUESTIONS?
THANKS