This project contains some of the most common Design Patterns in software development.
I decided to study more about design patterns to construct better softwares and also understand more deeply how famous softwares, libraries and frameworks were built.
-
Curry Currying is a process to reduce functions of more than one argument to functions of one argument with the help of lambda calculus. It's expensively used in real projects like React and Redux (like the
react-redux connect()
function) and it's very easy to implement. -
Singleton The Singleton pattern is a way to ensure that a Class/Function will have only one active instance. That means that for all the instantiations after the first one, the same instance will be returned. A singleton should be immutable by the consuming code, and there should be no danger of instantiating more than one of them.
-
Adapter The adapter pattern translates one interface to another allowing the communication between two pieces of code that wouldn't connect each other without an adapter. It's used commonly when new components need to be integrated with an existing codebase or a part of the system was rewrited and have to use the same interface as the old code.
-
https://github.com/VadimBrodsky/lab2/wiki/JavaScript-Design-Patterns
-
https://scotch.io/bar-talk/4-javascript-design-patterns-you-should-know
- Install the Code Runner VsCode extension
- Select a .js file
- Right click with the mouse and select Run Code
OR
- Open terminal and navigate to the project folder
- Type
node DesignPatterns/FILE_NAME.js
ReplaceFILE_NAME
by the name of the file that you want to run.
Luan Eduardo da Costa | Follow me on Linkedin