+ All Categories
Home > Software > IoC containers: Theory and Practice

IoC containers: Theory and Practice

Date post: 15-Apr-2017
Category:
Upload: boris-modylevsky
View: 215 times
Download: 3 times
Share this document with a friend
14
Slide Header… QualiSystems Proprietary & Confidential 4/27/22 IoC Containers: Theory and Practice Boris Modylevsky
Transcript
Page 1: IoC containers: Theory and Practice

Slide Header…

QualiSystems Proprietary & Confidential

Wednesday, May 3, 2023

IoC Containers: Theory and PracticeBoris Modylevsky

Page 2: IoC containers: Theory and Practice

Slide Header…

QualiSystems Proprietary & Confidential2

What is dependency?

Page 3: IoC containers: Theory and Practice

Slide Header…

QualiSystems Proprietary & Confidential

• Code is tightly coupled

• Difficult to isolate when testing

• Difficult to maintain:

• If I change ComponentX how to I know what else will affect? Did I break anything?

What problems do dependencies create?

Page 4: IoC containers: Theory and Practice

Slide Header…

QualiSystems Proprietary & Confidential

• The ability to supply (inject) an external dependency into a software component.

What is Dependency Injection?

Page 5: IoC containers: Theory and Practice

Slide Header…

QualiSystems Proprietary & Confidential

•Constructor•Setter•Method

Types of Dependency Injection

Page 6: IoC containers: Theory and Practice

Slide Header…

QualiSystems Proprietary & Confidential

Constructor Injection

Page 7: IoC containers: Theory and Practice

Slide Header…

QualiSystems Proprietary & Confidential

Attribute Injection

Page 8: IoC containers: Theory and Practice

Slide Header…

QualiSystems Proprietary & Confidential

Method Injection

Page 9: IoC containers: Theory and Practice

Slide Header…

QualiSystems Proprietary & Confidential

• Configuration (XML/JSON)

• Explicit

• Convention

• Auto wiring

Registration Types

Page 10: IoC containers: Theory and Practice

Slide Header…

QualiSystems Proprietary & Confidential

IoC Containers in .NET

AutoFac fFastInjector Hiro Maestro Munq Speedioc TinyIo

c

Caliburn.Micro Funq IfInjector MEF Ninject Spring.NE

T Unity

Catel Grace LightCore MEF2 Petite Stiletto Wind

sor

DryIoc Griffin LightInject

MicroSliver QuickInject Structure

Map No

Dynamo HaveBox LinFu Mugen SimpleInjector

StyleMVVM Unity

Page 11: IoC containers: Theory and Practice

Slide Header…

QualiSystems Proprietary & Confidential

Popular IoC Containers

Unity Ninject AutoFac StructureMap Windsor0

0.5

1

1.5

2

2.5

3

3.5

Downloads in millions

Downloads in millions

Page 12: IoC containers: Theory and Practice

Slide Header…

QualiSystems Proprietary & Confidential

Demo

Page 13: IoC containers: Theory and Practice

Slide Header…

QualiSystems Proprietary & Confidential

Source: http://tinyurl.com/h7qntep by Nathanael Mann

Performance Comparison

Page 14: IoC containers: Theory and Practice

Slide Header…

QualiSystems Proprietary & Confidential

Visit our Website


Recommended