Skip to content

Commit a943b7c

Browse files
committed
docs(docs): add graphics to explain the goal of DI
1 parent 3da1099 commit a943b7c

File tree

3 files changed

+1370
-1
lines changed

3 files changed

+1370
-1
lines changed

Diff for: README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
Most (maybe all) applications rely on two kinds of dependencies.
1919

20+
![The lifecycle of most (all?) applications](./dependency-injection.svg)
21+
2022
**The code dependencies** are fully covered by JavaScript modules in a testable
2123
manner (with `mockery` or `System` directly). There is no need for another
2224
dependency management system if those libraries are pure functions (involve no
@@ -25,7 +27,7 @@ global states at all).
2527
Unfortunately, applications often rely on **global states** where the JavaScript
2628
module system shows its limits. This is where `knifecycle` enters the game.
2729

28-
![The app lifecycle sequence graph](https://insertafter.com/images/dependencies-graph-sequences.svg)
30+
![The app lifecycle sequence graph](./dependencies-graph-sequences.svg)
2931

3032
It is largely inspired by the Angular service system except it should not
3133
provide code but access to global states (time, filesystem, db). It also have an

0 commit comments

Comments
 (0)