SlideShare uma empresa 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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Destaque

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
 

Destaque (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
 

Semelhante 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 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
 
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
 
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
 

Semelhante 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 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
 
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
 
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
 

Mais de Tomas Corral Casas

Mais 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

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 

Último (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 

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.