4. This strip was made by
CKGrafico mixin some strips
from, all the rights are for
commitstrip, and their awesome
work.
Can you help me
with a pattern?
Ye
s!
And this is the new
pattern to study
this week
FIRST YOU USE IT WITHOUT KNOWLEDGE
5. This strip was made by
CKGrafico mixin some strips
from, all the rights are for
commitstrip, and their awesome
work.
Can you help me
with a pattern?
Ye
s!
And this is the new
pattern to study
this week
This strip was made by
CKGrafico mixin some strips
from, all the rights are for
commitstrip, and their awesome
work.
Can you help me
with a pattern?
Ye
s!
And this is the new
pattern to study
this week
AND YOU DISCOVER THE PATTERN
6. This strip was made by
CKGrafico mixin some strips
from, all the rights are for
commitstrip, and their awesome
work.
Can you help me
with a pattern?
Ye
s!
And this is the new
pattern to study
this week
This strip was made by
CKGrafico mixin some strips
from, all the rights are for
commitstrip, and their awesome
work.
Can you help me
with a pattern?
Ye
s!
And this is the new
pattern to study
this week
YOU INVESTIGATE ALONE
7. This strip was made by
CKGrafico mixin some strips
from, all the rights are for
commitstrip, and their awesome
work.
Can you help me
with a pattern?
Ye
s!
And this is the new
pattern to study
this week
This strip was made by
CKGrafico mixin some strips
from, all the rights are for
commitstrip, and their awesome
work.
Can you help me
with a pattern?
Ye
s!
And this is the new
pattern to study
this week
DISCUSS WITH TEAMMATES
8. This strip was made by
CKGrafico mixin some strips
from, all the rights are for
commitstrip, and their awesome
work.
Can you help me
with a pattern?
Ye
s!
And this is the new
pattern to study
this week
This strip was made by
CKGrafico mixin some strips
from, all the rights are for
commitstrip, and their awesome
work.
Can you help me
with a pattern?
Ye
s!
And this is the new
pattern to study
this week
HAVE INTERNAL TRAININGS ABOUT IT
10. YOU CAN INJECT
DEPENDENCIES IN YOUR
COMPONENTS, LET'S DO IT!
QuiqueFdezGuerra
SoftwareEngineer
PlainConcepts
@CKGrafico
11. WHY THIS PATTERN?
A B
- One of the most used patterns in backend for
coupling.
- If A depends on B and B is broken, you should
change A.
- A has to manage the life time of B.
- Mocking dependencies is not easy.
We want to make our classes independent from
creating the instance of the dependencies.
12. A
THE SOLID PRINCIPLE
A BIB
Dependency Inversion Principle
One module should not depend of other
module, they both should depend of an
abstraction
13. Injector
(container?)
Inversion of Control ( IoC )
THE DESIGN PRINCIPLE
A B A
Creates
B?
B ☆
Using IoC, when one class depends on other class,
the first should not manage the life time of the
second, this should be done outside.
14. THE (FAMOUS) PATTERN
A Injector
(container?)
IB?
B
D
C E
Dependency Injection
We should have one object supplies the dependency
of another object helping on Inversion of Control,
and we should use abstractions to apply Dependency
Inversion.