Skip to content

Difference between that-depends and modern-di #116

Answered by lesnik512
Jonas1312 asked this question in Q&A
Discussion options

You must be logged in to vote

@Jonas1312 Hi!

  1. The main difference: modern-di has scopes. Thanks to them it is easier to manage dependencies lifecycle.
  2. modern-di does not have global state. All state lives in containers of different scopes including overrides (mocks). That depends has global state inside providers and local state inside contextvars
  3. modern-di requires integration logic for web-frameworks to create container on each request and to resolve dependencies. That depends mostly does not require integration logic except for context resources.
  4. that-depends is production-ready, tested in production in many projects. modern-di is in early state of development and I have only started to integrate it to my work project

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Jonas1312
Comment options

@lesnik512
Comment options

Answer selected by Jonas1312
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants