can I use the IOC when using a 3rd party library

Posted by Greg on Stack Overflow See other posts from Stack Overflow or by Greg
Published on 2010-04-23T22:05:01Z Indexed on 2010/04/24 0:33 UTC
Read the original article Hit count: 629

Hi,

Q1 If I have a reusable library that is available, that uses interfaces with classes that use the getInstance concept to create concrete classes for you to use, then in this case would that make sense on the client side to use the IOC container to create instances of these classes? Or is that really applying a double layer of abstraction?

Q2 Or in the cases where I'm building the reusable library myself and want the client to use an IOC container, then in my reusable library would I then dispense with any overhead of having factories or "getInstance" methods to instantiate the classes in the client? (i.e. as the IOC container would do this no?)

© Stack Overflow or respective owner

Related posts about ioc-container

Related posts about ioc