SlideShare una empresa de Scribd logo
1 de 84
Someone has already solved
     your problems.
•   Abstract those that vary.
•   Program to an interface not an
    implementation.
•   Favor composition over inheritance.
•   Strive for loosely coupled designs
    between objects that interact.
•   Classes should be open for extension
    but closed for modification.
•   Depend on abstraction. Do not
    depend on concrete classes.
Restricts the instanciation of a class to one object.
Avoids polluting globals.
Allow to use ‘function’ to obtain new objects.
Used to clone objects.

In Javascript is used to create inheritance.
Decouple parts of the code in modules.

Avoid failing your full application for some little
error in one module.
Allows to execute more than one method at the
same line.

Only one instance of object is needed.
Overwritte the behaviour of one method/function
to reduce time on further executions.

Ideal for updates.
Memoize the executions that have been done.

Reduce time on expensive jobs.
Nullify
Removes all references to local variables to avoid
                 memory leaks.
Removes all references to local variables to avoid
   memory leaks when the method/function
               returns something.
Adapter
Converts the interface of a class into another
the clients expect.

Lets classes work together that couldn't otherwise
because of incompatible interfaces.
Decorator
Attach additional responsibilities to an object
dynamically.

Decorators provide a flexible alternative to
subclassing for extending functionality
Factory
Defines an interface for creating an object, but
lets subclasses decide which class to instanciate.

Factory Method lets a class defer instanciation
to subclasses.
Observer
Defines a one-to-many dependency between
objects so that when one object changes state,
all its dependents are notified and updated
automatically.
Command
Encapsulates a request as an object, thereby letting
  you parameterize other objects with different
   requests, queue or log requests, and support
               undoable operations.
Facade
Provides a unified interface to a set of interfaces
in a subsystem.

Defines a higher-level interface that makes the
subsystem easier to use
Mediator
Defines an object that encapsulates how a set of
                objects interact.
State
Allows an object to alter its behavior when its
internal state changes.

The object will appear to change its class.
Strategy
Defines a family of algorithms, encapsulates each
one, and makes them interchangeable.
Compose objects into tree structures to represent
part-whole hierarchies.

Lets clients treat individual objects and
compositions of objects uniformly.
Separates elements of the application in layers.

Logic, data and views are separated.
M.V.C
M.V.C
M.V.V.M
http://bit.ly/softhire

Más contenido relacionado

La actualidad más candente

React js use contexts and useContext hook
React js use contexts and useContext hookReact js use contexts and useContext hook
React js use contexts and useContext hookPiyush Jamwal
 
Data Abstraction for Large Web Applications
Data Abstraction for Large Web ApplicationsData Abstraction for Large Web Applications
Data Abstraction for Large Web Applicationsbrandonsavage
 
an Introduction to Redux
an Introduction to Reduxan Introduction to Redux
an Introduction to ReduxAmin Ashtiani
 
Mysql creating stored function
Mysql  creating stored function Mysql  creating stored function
Mysql creating stored function Prof.Nilesh Magar
 
Reactive web applications
Reactive web applicationsReactive web applications
Reactive web applicationsJuan Sandoval
 

La actualidad más candente (8)

PowerPoint Format
PowerPoint FormatPowerPoint Format
PowerPoint Format
 
React js use contexts and useContext hook
React js use contexts and useContext hookReact js use contexts and useContext hook
React js use contexts and useContext hook
 
Controller
ControllerController
Controller
 
Data Abstraction for Large Web Applications
Data Abstraction for Large Web ApplicationsData Abstraction for Large Web Applications
Data Abstraction for Large Web Applications
 
an Introduction to Redux
an Introduction to Reduxan Introduction to Redux
an Introduction to Redux
 
Mysql creating stored function
Mysql  creating stored function Mysql  creating stored function
Mysql creating stored function
 
Reactive web applications
Reactive web applicationsReactive web applications
Reactive web applications
 
An Introduction to Redux
An Introduction to ReduxAn Introduction to Redux
An Introduction to Redux
 

Destacado

Uhtna Raamatukogu
Uhtna RaamatukoguUhtna Raamatukogu
Uhtna Raamatukoguarxxx
 
Yst Rsw300 Final
Yst Rsw300 FinalYst Rsw300 Final
Yst Rsw300 Finalarxxx
 
Videvik
VidevikVidevik
Videvikarxxx
 
Edci Tuesday Presentation
Edci Tuesday PresentationEdci Tuesday Presentation
Edci Tuesday Presentationready2tch
 
Extreme Environment
Extreme EnvironmentExtreme Environment
Extreme Environmentkked1701
 
Murdvargus Koolis
Murdvargus KoolisMurdvargus Koolis
Murdvargus Koolisarxxx
 
The Heart
The HeartThe Heart
The Heartkrismd
 
The Respiratory System
The Respiratory System The Respiratory System
The Respiratory System krismd
 
Kooli Esitlus
Kooli EsitlusKooli Esitlus
Kooli Esitlusarxxx
 
The Lymphatic System And Immunity1
The Lymphatic System And Immunity1The Lymphatic System And Immunity1
The Lymphatic System And Immunity1krismd
 
Nutrition Powerpoint
Nutrition PowerpointNutrition Powerpoint
Nutrition Powerpointkrismd
 
Indefinite Pronouns
Indefinite PronounsIndefinite Pronouns
Indefinite Pronounsready2tch
 

Destacado (17)

Uhtna Raamatukogu
Uhtna RaamatukoguUhtna Raamatukogu
Uhtna Raamatukogu
 
Album tof
Album tofAlbum tof
Album tof
 
Yst Rsw300 Final
Yst Rsw300 FinalYst Rsw300 Final
Yst Rsw300 Final
 
Videvik
VidevikVidevik
Videvik
 
Edci Tuesday Presentation
Edci Tuesday PresentationEdci Tuesday Presentation
Edci Tuesday Presentation
 
Extreme Environment
Extreme EnvironmentExtreme Environment
Extreme Environment
 
Murdvargus Koolis
Murdvargus KoolisMurdvargus Koolis
Murdvargus Koolis
 
The Heart
The HeartThe Heart
The Heart
 
The Respiratory System
The Respiratory System The Respiratory System
The Respiratory System
 
Mikado method
Mikado methodMikado method
Mikado method
 
Testea y aumenta tu karma
Testea y aumenta tu karmaTestea y aumenta tu karma
Testea y aumenta tu karma
 
Album Photo
Album PhotoAlbum Photo
Album Photo
 
Kooli Esitlus
Kooli EsitlusKooli Esitlus
Kooli Esitlus
 
xd
xdxd
xd
 
The Lymphatic System And Immunity1
The Lymphatic System And Immunity1The Lymphatic System And Immunity1
The Lymphatic System And Immunity1
 
Nutrition Powerpoint
Nutrition PowerpointNutrition Powerpoint
Nutrition Powerpoint
 
Indefinite Pronouns
Indefinite PronounsIndefinite Pronouns
Indefinite Pronouns
 

Similar a Design patterns in Javascript

All 23 Design patterns in one page front and back
All 23 Design patterns in one page front and backAll 23 Design patterns in one page front and back
All 23 Design patterns in one page front and backTrey Brister
 
Applied patterns in the project
Applied patterns in the projectApplied patterns in the project
Applied patterns in the projectJan de Vries
 
Solid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven DesignSolid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven DesignIrwansyah Irwansyah
 
Jump Start To Ooad And Design Patterns
Jump Start To Ooad And Design PatternsJump Start To Ooad And Design Patterns
Jump Start To Ooad And Design PatternsLalit Kale
 
Jump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design PatternJump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design PatternNishith Shukla
 
Design Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur UniversityDesign Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur UniversityShubham Narkhede
 
The 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summaryThe 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summaryguestebd714
 
The 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summaryThe 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summaryachraf_ing
 
Bartlesville Dot Net User Group Design Patterns
Bartlesville Dot Net User Group Design PatternsBartlesville Dot Net User Group Design Patterns
Bartlesville Dot Net User Group Design PatternsJason Townsend, MBA
 
Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)stanbridge
 
C# Advanced L07-Design Patterns
C# Advanced L07-Design PatternsC# Advanced L07-Design Patterns
C# Advanced L07-Design PatternsMohammad Shaker
 
Patterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docxPatterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docxdanhaley45372
 

Similar a Design patterns in Javascript (20)

All 23 Design patterns in one page front and back
All 23 Design patterns in one page front and backAll 23 Design patterns in one page front and back
All 23 Design patterns in one page front and back
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Applied patterns in the project
Applied patterns in the projectApplied patterns in the project
Applied patterns in the project
 
Solid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven DesignSolid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven Design
 
Jump Start To Ooad And Design Patterns
Jump Start To Ooad And Design PatternsJump Start To Ooad And Design Patterns
Jump Start To Ooad And Design Patterns
 
Jump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design PatternJump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design Pattern
 
Design Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur UniversityDesign Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur University
 
The 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summaryThe 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summary
 
The 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summaryThe 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summary
 
Gof design patterns
Gof design patternsGof design patterns
Gof design patterns
 
Bartlesville Dot Net User Group Design Patterns
Bartlesville Dot Net User Group Design PatternsBartlesville Dot Net User Group Design Patterns
Bartlesville Dot Net User Group Design Patterns
 
Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)
 
C# Advanced L07-Design Patterns
C# Advanced L07-Design PatternsC# Advanced L07-Design Patterns
C# Advanced L07-Design Patterns
 
Patterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docxPatterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docx
 
OOP design patterns
OOP design patternsOOP design patterns
OOP design patterns
 
Design patterns
Design patternsDesign patterns
Design patterns
 
designpatterns-.pdf
designpatterns-.pdfdesignpatterns-.pdf
designpatterns-.pdf
 

Más de Tomas Corral Casas

Más de Tomas Corral Casas (7)

Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
 
Welovejs AngularJS
Welovejs AngularJS Welovejs AngularJS
Welovejs AngularJS
 
Coderdojo bcn 12_10_2013
Coderdojo bcn 12_10_2013Coderdojo bcn 12_10_2013
Coderdojo bcn 12_10_2013
 
Lo que los desarrolladores web deberían saber
Lo que los desarrolladores web deberían saberLo que los desarrolladores web deberían saber
Lo que los desarrolladores web deberían saber
 
Hydra.js modula tu código
Hydra.js modula tu códigoHydra.js modula tu código
Hydra.js modula tu código
 
Less is more
Less is moreLess is more
Less is more
 
Automatización Unit Testing Javascript
Automatización Unit Testing JavascriptAutomatización Unit Testing Javascript
Automatización Unit Testing Javascript
 

Último

Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 

Design patterns in Javascript

  • 1.
  • 2.
  • 3.
  • 4. Someone has already solved your problems.
  • 5. Abstract those that vary. • Program to an interface not an implementation. • Favor composition over inheritance. • Strive for loosely coupled designs between objects that interact. • Classes should be open for extension but closed for modification. • Depend on abstraction. Do not depend on concrete classes.
  • 6.
  • 7. Restricts the instanciation of a class to one object.
  • 8.
  • 9.
  • 10.
  • 12.
  • 13.
  • 14. Allow to use ‘function’ to obtain new objects.
  • 15.
  • 16.
  • 17. Used to clone objects. In Javascript is used to create inheritance.
  • 18.
  • 19.
  • 20. Decouple parts of the code in modules. Avoid failing your full application for some little error in one module.
  • 21.
  • 22.
  • 23. Allows to execute more than one method at the same line. Only one instance of object is needed.
  • 24.
  • 25.
  • 26. Overwritte the behaviour of one method/function to reduce time on further executions. Ideal for updates.
  • 27.
  • 28.
  • 29. Memoize the executions that have been done. Reduce time on expensive jobs.
  • 30.
  • 32. Removes all references to local variables to avoid memory leaks.
  • 33.
  • 34.
  • 35. Removes all references to local variables to avoid memory leaks when the method/function returns something.
  • 36.
  • 38. Converts the interface of a class into another the clients expect. Lets classes work together that couldn't otherwise because of incompatible interfaces.
  • 39.
  • 40.
  • 42. Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality
  • 43.
  • 44.
  • 46. Defines an interface for creating an object, but lets subclasses decide which class to instanciate. Factory Method lets a class defer instanciation to subclasses.
  • 47.
  • 48.
  • 50. Defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
  • 51.
  • 52.
  • 54. Encapsulates a request as an object, thereby letting you parameterize other objects with different requests, queue or log requests, and support undoable operations.
  • 55.
  • 56.
  • 58. Provides a unified interface to a set of interfaces in a subsystem. Defines a higher-level interface that makes the subsystem easier to use
  • 59.
  • 60.
  • 62. Defines an object that encapsulates how a set of objects interact.
  • 63.
  • 64.
  • 65. State
  • 66. Allows an object to alter its behavior when its internal state changes. The object will appear to change its class.
  • 67.
  • 68.
  • 70. Defines a family of algorithms, encapsulates each one, and makes them interchangeable.
  • 71.
  • 72.
  • 73.
  • 74. Compose objects into tree structures to represent part-whole hierarchies. Lets clients treat individual objects and compositions of objects uniformly.
  • 75.
  • 76.
  • 77.
  • 78. Separates elements of the application in layers. Logic, data and views are separated.
  • 79. M.V.C
  • 80. M.V.C
  • 82.
  • 83.