Skip to content

alefemoreira/design-patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Design Patterns

Summary

  1. How to execute the examples
  2. Strategy Pattern
  3. Observer Pattern
  4. Decorator Pattern
  5. Factory Pattern
  6. Command Pattern

1 How to Execute the Examples

These examples was build with Typescript and Deno, so Deno is required to execute these codes.

2 Strategy Pattern

Definition

According Head First - Design Pattern:

the Strategy Pattern defines a family of algorithms, enncapsulates each onde, aand make them interchangeable. Strategy lets the algorithm vary idependently from clients that use it.

Strategy Pattern make objects open do change inside the runtime. So, instead to rewrite a class of an object, just write its behavior and change the obbject bbehavior.

Inside strategy-pattern/ directory, you can see two implementation examples of Strategy Pattern.

3 Observer Pattern

4 Decorator Pattern

5 Factory Pattern

6 Command Pattern

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published