Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikaelvesavuori/5-minutes-or-less-solid
SOLID principles in TypeScript and JavaScript, demystified in less than 5 minutes each.
https://github.com/mikaelvesavuori/5-minutes-or-less-solid
demos design-patterns javascript js learning principles solid solid-principles ts typescript
Last synced: 2 months ago
JSON representation
SOLID principles in TypeScript and JavaScript, demystified in less than 5 minutes each.
- Host: GitHub
- URL: https://github.com/mikaelvesavuori/5-minutes-or-less-solid
- Owner: mikaelvesavuori
- Created: 2023-08-05T08:30:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-17T13:41:37.000Z (over 1 year ago)
- Last Synced: 2024-05-01T16:12:51.996Z (8 months ago)
- Topics: demos, design-patterns, javascript, js, learning, principles, solid, solid-principles, ts, typescript
- Language: TypeScript
- Homepage:
- Size: 37.1 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 5 Minutes or Less: SOLID principles in TypeScript/JavaScript
## SOLID principles in TypeScript and JavaScript, demystified in less than 5 minutes each
Everyone who's coded for some time has probably heard about these principles, but do you know them?
If you were ever afraid to ask, here's your chance to understand them easily and in just a few minutes each!
## Five Minutes or Less
- [Design Patterns](https://github.com/mikaelvesavuori/5-minutes-or-less-design-patterns)
- [TypeScript/JavaScript patterns and features](https://github.com/mikaelvesavuori/5-minutes-or-less-typescript-js)
- [Refactoring](https://github.com/mikaelvesavuori/5-minutes-or-less-refactoring)## The SOLID Principles
The principles in their mnemonic order:
- [Single Responsibility Principle](src/single-responsibility-principle.ts)
- [Open-Closed Principle](src/open-closed-principle.ts)
- [Liskov Substitution Principle](src/liskov-substitution-principle.ts)
- [Interface Segregation Principle](src/interface-segregation-principle.ts)
- [Dependency Inversion Principle](src/dependency-inversion-principle.ts)**My recommended way to approach them, from easiest to "hardest", is:**
- [Single Responsibility Principle](src/single-responsibility-principle.ts)
- [Liskov Substitution Principle](src/liskov-substitution-principle.ts)
- [Interface Segregation Principle](src/interface-segregation-principle.ts)
- [Open-Closed Principle](src/open-closed-principle.ts)
- [Dependency Inversion Principle](src/dependency-inversion-principle.ts)## Running the code
You can install the things with `npm install` and then just go at each file with `npx ts-node src/{filename}.ts`.
Or, if you're lazy, you can also copy the individual TS file's contents into the [TypeScript playground](https://www.typescriptlang.org/play) if you want to avoid cloning and installing anything at all.