mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-02-14 18:40:52 +03:00
Update README.rst
This commit is contained in:
parent
fcedbcabd2
commit
8878645c7b
76
README.rst
76
README.rst
|
@ -71,45 +71,6 @@ How does it different from the other frameworks?
|
||||||
|
|
||||||
``Dependency Injector`` is a simple tool for the powerful concept.
|
``Dependency Injector`` is a simple tool for the powerful concept.
|
||||||
|
|
||||||
People often ask
|
|
||||||
----------------
|
|
||||||
|
|
||||||
Here is a short summary of what is often asked about the dependency injection and the Dependency Injector.
|
|
||||||
|
|
||||||
What is the dependency injection?
|
|
||||||
⁃ dependency injection is a principle that decreases coupling and increases cohesion
|
|
||||||
|
|
||||||
Why should I do the dependency injection?
|
|
||||||
⁃ your code becomes more flexible, testable and clear
|
|
||||||
⁃ you have no problems when you need to understand how it works or change it 😎
|
|
||||||
|
|
||||||
How do I start doing the dependency injection?
|
|
||||||
⁃ you start writing the code following the dependency injection principle
|
|
||||||
⁃ you register all of your application components and their dependencies in the container
|
|
||||||
⁃ when you need a component, you get it from the container
|
|
||||||
|
|
||||||
Why do I need a framework for this?
|
|
||||||
⁃ you need the framework for this to not create it by your own
|
|
||||||
⁃ this framework gives you the container and the providers
|
|
||||||
⁃ the container is like a dictionary with the batteries 🔋
|
|
||||||
⁃ the providers manage the lifetime of your components, you will need factories, singletons, smart config object etc
|
|
||||||
|
|
||||||
What price do I pay and what do I get?
|
|
||||||
⁃ you need to explicitly specify the dependencies in the container
|
|
||||||
⁃ it will be extra work in the beginning
|
|
||||||
⁃ it will payoff when project grows or in two weeks 😊 (when you forget what project was about)
|
|
||||||
|
|
||||||
What features does the framework have?
|
|
||||||
⁃ building objects graph
|
|
||||||
⁃ smart configuration object
|
|
||||||
⁃ providers: factory, singleton, thread locals registers, etc
|
|
||||||
⁃ positional and keyword context injections
|
|
||||||
⁃ overriding of the objects in any part of the graph
|
|
||||||
|
|
||||||
What features the framework does NOT have?
|
|
||||||
⁃ auto wiring / auto resolving of the dependencies
|
|
||||||
⁃ the annotations and ``@inject``-like decorators
|
|
||||||
|
|
||||||
Why do I need it?
|
Why do I need it?
|
||||||
=================
|
=================
|
||||||
|
|
||||||
|
@ -230,6 +191,43 @@ Where is the docs?
|
||||||
|
|
||||||
- The documentation is available on the `Read The Docs <http://python-dependency-injector.ets-labs.org/>`_
|
- The documentation is available on the `Read The Docs <http://python-dependency-injector.ets-labs.org/>`_
|
||||||
|
|
||||||
|
Frequently asked questions
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
What is the dependency injection?
|
||||||
|
- dependency injection is a principle that decreases coupling and increases cohesion
|
||||||
|
|
||||||
|
Why should I do the dependency injection?
|
||||||
|
- your code becomes more flexible, testable and clear
|
||||||
|
- you have no problems when you need to understand how it works or change it 😎
|
||||||
|
|
||||||
|
How do I start doing the dependency injection?
|
||||||
|
- you start writing the code following the dependency injection principle
|
||||||
|
- you register all of your application components and their dependencies in the container
|
||||||
|
- when you need a component, you get it from the container
|
||||||
|
|
||||||
|
Why do I need a framework for this?
|
||||||
|
- you need the framework for this to not create it by your own
|
||||||
|
- this framework gives you the container and the providers
|
||||||
|
- the container is like a dictionary with the batteries 🔋
|
||||||
|
- the providers manage the lifetime of your components, you will need factories, singletons, smart config object etc
|
||||||
|
|
||||||
|
What price do I pay and what do I get?
|
||||||
|
- you need to explicitly specify the dependencies in the container
|
||||||
|
- it will be extra work in the beginning
|
||||||
|
- it will payoff when project grows or in two weeks 😊 (when you forget what project was about)
|
||||||
|
|
||||||
|
What features does the framework have?
|
||||||
|
- building objects graph
|
||||||
|
- smart configuration object
|
||||||
|
- providers: factory, singleton, thread locals registers, etc
|
||||||
|
- positional and keyword context injections
|
||||||
|
- overriding of the objects in any part of the graph
|
||||||
|
|
||||||
|
What features the framework does NOT have?
|
||||||
|
- auto wiring / auto resolving of the dependencies
|
||||||
|
- the annotations and ``@inject``-like decorators
|
||||||
|
|
||||||
Have a question?
|
Have a question?
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user