They do overlap each other somewhere. But end goal of both
of these concepts are completely different. To understand these 2 concepts we
will take a scenario. We have 2 requirements:
- The application should be a tired application and each tier should be decoupled from each other for better reusability and maintainability.
- The application should provide a facility of exporting data in to different formats. External vendors should be able to plug in their own mechanism into the application.
For requirement 1 , goal is decoupling while for requirement
2 goal is extensibility.
DI/IOC
|
MEF
|
|
Decoupling
|
YES
|
|
Extensibility
|
YES
|
|
Integrate Known Things
|
YES
|
|
Integrate UnKnown Things
|
YES
|
|
Automatic discovery
|
YES
|
|
Registration
|
YES
|
|
Discovery
|
YES
|
|
Compile Time
|
YES
|
|
Run Time
|
YES
|

No comments:
Post a Comment