SlideShare a Scribd company logo
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

More Related Content

What's hot

PowerPoint Format
PowerPoint FormatPowerPoint Format
PowerPoint Format
webhostingguy
 
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
Piyush Jamwal
 
Controller
ControllerController
Controller
Vijay Shukla
 
Data Abstraction for Large Web Applications
Data Abstraction for Large Web ApplicationsData Abstraction for Large Web Applications
Data Abstraction for Large Web Applications
brandonsavage
 
an Introduction to Redux
an Introduction to Reduxan Introduction to Redux
an Introduction to Redux
Amin 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 applications
Juan Sandoval
 
An Introduction to Redux
An Introduction to ReduxAn Introduction to Redux
An Introduction to Redux
NexThoughts Technologies
 

What's hot (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
 

Viewers also liked

Uhtna Raamatukogu
Uhtna RaamatukoguUhtna Raamatukogu
Uhtna Raamatukoguarxxx
 
Yst Rsw300 Final
Yst Rsw300 FinalYst Rsw300 Final
Yst Rsw300 Final
arxxx
 
Videvik
VidevikVidevik
Videvikarxxx
 
Edci Tuesday Presentation
Edci Tuesday PresentationEdci Tuesday Presentation
Edci Tuesday Presentation
ready2tch
 
Extreme Environment
Extreme EnvironmentExtreme Environment
Extreme Environment
kked1701
 
Murdvargus Koolis
Murdvargus KoolisMurdvargus Koolis
Murdvargus Koolisarxxx
 
The Heart
The HeartThe Heart
The Heart
krismd
 
The Respiratory System
The Respiratory System The Respiratory System
The Respiratory System
krismd
 
Mikado method
Mikado methodMikado method
Mikado method
Tomas Corral Casas
 
Testea y aumenta tu karma
Testea y aumenta tu karmaTestea y aumenta tu karma
Testea y aumenta tu karma
Tomas Corral Casas
 
Kooli Esitlus
Kooli EsitlusKooli Esitlus
Kooli Esitlus
arxxx
 
The Lymphatic System And Immunity1
The Lymphatic System And Immunity1The Lymphatic System And Immunity1
The Lymphatic System And Immunity1
krismd
 
Nutrition Powerpoint
Nutrition PowerpointNutrition Powerpoint
Nutrition Powerpoint
krismd
 
Indefinite Pronouns
Indefinite PronounsIndefinite Pronouns
Indefinite Pronouns
ready2tch
 

Viewers also liked (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 to 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 back
Trey Brister
 
Design patterns
Design patternsDesign patterns
Design patterns
Vignesh Nethaji
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
Satheesh Sukumaran
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
Satheesh Sukumaran
 
Design patterns
Design patternsDesign patterns
Design patterns
Akhilesh Joshi
 
Mastering Design Patterns in Java: A Comprehensive Guide
Mastering Design Patterns in Java: A Comprehensive GuideMastering Design Patterns in Java: A Comprehensive Guide
Mastering Design Patterns in Java: A Comprehensive Guide
JAVATPOINT
 
Applied patterns in the project
Applied patterns in the projectApplied patterns in the project
Applied patterns in the project
Jan 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 Design
Irwansyah 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 Patterns
Lalit 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 Pattern
Nishith Shukla
 
Design Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur UniversityDesign Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur University
Shubham 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 summary
guestebd714
 
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
achraf_ing
 
Gof design patterns
Gof design patternsGof design patterns
Gof design patterns
Srikanth R Vaka
 
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
Jason 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 Patterns
Mohammad 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.docx
danhaley45372
 
OOP design patterns
OOP design patternsOOP design patterns
OOP design patterns
Igor Talevski
 
Design patterns
Design patternsDesign patterns
Design patterns
Elyes Mejri
 

Similar to 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
 
Mastering Design Patterns in Java: A Comprehensive Guide
Mastering Design Patterns in Java: A Comprehensive GuideMastering Design Patterns in Java: A Comprehensive Guide
Mastering Design Patterns in Java: A Comprehensive Guide
 
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
 

More from Tomas Corral Casas

Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
Tomas Corral Casas
 
Welovejs AngularJS
Welovejs AngularJS Welovejs AngularJS
Welovejs AngularJS
Tomas Corral Casas
 
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
Tomas Corral Casas
 
Hydra.js modula tu código
Hydra.js modula tu códigoHydra.js modula tu código
Hydra.js modula tu código
Tomas Corral Casas
 
Less is more
Less is moreLess is more
Less is more
Tomas Corral Casas
 
Automatización Unit Testing Javascript
Automatización Unit Testing JavascriptAutomatización Unit Testing Javascript
Automatización Unit Testing Javascript
Tomas Corral Casas
 

More from 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
 

Recently uploaded

Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 

Recently uploaded (20)

Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 

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.