Skip to content

Commit f19504d

Browse files
authored
Update README.md
1 parent 8b65871 commit f19504d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,19 @@ Don't repeat yourself! The DRY principle is hostile to code duplication. Destroy
6060
If we need to reuse a previously written code or code block; By converting the existing code into a function/class/method (by refactoring if possible), we should connect the old user to this point, and then use this centralized point in the new codes we will write.
6161

6262
With SoC, sustainable, developable and reusable components and projects are possible thanks to these components.In this way, it will be easier to manage and we will have a much more organized architecture.
63+
64+
## IoC (Inversion Of Control) Principle
65+
[Go To Example](https://github.com/kadir-code/SoftwarePrinciples/tree/master/IoC_Principle)
66+
67+
![alt text for screen readers]( https://devnot.com/wp-content/uploads/2020/05/Ioc_1.png
68+
"Text to show on mouseover")
69+
70+
IoC is a software development principle that aims to create loose coupling objects with little interdependence throughout the application lifecycle. It is responsible for the life cycle of objects, provides their management. When an interface is injected into the class using IoC, the corresponding interface methods become available. Thus, the class using IoC only knows the methods it will use, even if there are more methods in the class, it will be able to access the methods specified in the interface.
71+
72+
### We can list the advantages of using IoC as follows:
73+
74+
* Creating loosely coupled classes
75+
* Easy unit test writing
76+
* Manageability
77+
* Modular programs
78+
* Easy transition between different implementations

0 commit comments

Comments
 (0)