Hlavní menu

Nástroje

UvodDoKomponent / IoC

View (print) - Edit page | Recent changes - Page history

Updated 24 April 2015, 16:42 by Eduard Chromík

UvodDoKomponent.IoC History

Hide minor edits - Show changes to output

24 April 2015, 16:42 by Eduard Chromík -
Changed lines 14-17 from:
Oba výrazy tedy znamenají prakticky to samé.


to:
In practice, both terms represent the same.
Changed lines 18-19 from:
[[More about IoC vs DI-> http://www.codeproject.com/Articles/592372/Dependency-Injection-DI-vs-Inversion-of-Control-IO]]
to:
24 April 2015, 16:30 by Eduard Chromík -
Changed lines 1-2 from:
The main goal of Inversion of control and Dependency Injection is to remove dependencies of an application. This makes the system more decoupled and maintainable. You can delegate the control flow by callback delegates, observer pattern, events, DI (Dependency injection) and lot of other ways.
to:
The main goal of Inversion of control and Dependency Injection is to remove "Hard coded dependencies" of an application. This makes the system more decoupled and maintainable. You can delegate the control flow by callback delegates, observer pattern, events, DI (Dependency injection) and lot of other ways.
23 January 2015, 17:08 by PremekBrada -
Changed lines 3-4 from:
*Inversion of control* :- It’s a generic term and implemented in several ways (events, delegates etc).
to:
*Inversion of control* :- It’s a generic term and implemented in several ways (events, delegates etc). The [[classic text on IoC by Martin Fowler -> http://martinfowler.com/articles/injection.html]] is well worth reading.
22 January 2015, 14:48 by PremekBrada -
Added lines 7-17:
Dependency injection je proces, kdy si objekty definují své závislosti (dependency – odkaz na jiný objekt, s kterým pracují) pouze přes:
* argumenty, se kterými se volá kontruktor,
* argumenty, které se předají nějaké statické tovární metodě (factory – vytváří různé objekty s různou konfigurací)
* properties, které jsou nastaveny objektu potom, co je vytvořený

Dependency objekt, který je vytvořen frameworkem, je po vytvoření přímo předán (injected) objektu, který ho použije. Ve skutečnosti je tedy proces definování závislosti v základě opačný běžnému postupu, protože běžně si objekt/komponenta hledá sama objekt, na kterém závisí. Odtud název Inversion of Control ([=IoC=])

Oba výrazy tedy znamenají prakticky to samé.


04 January 2015, 20:20 by Eduard Chromik -
Added lines 1-2:
The main goal of Inversion of control and Dependency Injection is to remove dependencies of an application. This makes the system more decoupled and maintainable. You can delegate the control flow by callback delegates, observer pattern, events, DI (Dependency injection) and lot of other ways.
28 December 2014, 00:15 by Eduard Chromik -
Changed lines 7-8 from:
http://www.codeproject.com/Articles/592372/Dependency-Injection-DI-vs-Inversion-of-Control-IO
to:
[[More about IoC vs DI-> http://www.codeproject.com/Articles/592372/Dependency-Injection-DI-vs-Inversion-of-Control-IO]]
28 December 2014, 00:14 by Eduard Chromik -
Changed lines 5-7 from:
Attach:IoCDI.jpg
to:
Attach:IoCDI.jpg

http://www.codeproject.com/Articles/592372/Dependency-Injection-DI-vs-Inversion-of-Control-IO
28 December 2014, 00:11 by Eduard Chromik -
Changed line 5 from:
Attach:IocDI.jpg
to:
Attach:IoCDI.jpg
28 December 2014, 00:11 by Eduard Chromik -
Added lines 4-5:

Attach:IocDI.jpg
28 December 2014, 00:10 by Eduard Chromik -
Added lines 1-3:
*Inversion of control* :- It’s a generic term and implemented in several ways (events, delegates etc).

*Dependency injection* :- DI is a subtype of IoC and is implemented by constructor injection, setter injection or method injection.