Static Class Structure
Client
ServiceA and
ServiceB
objects.
Injector.
Injector.
Injector
ServiceA1 and
ServiceB1 objects;
creates the Client
(if it doesn't already exist)
and injects the objects into the
Client.
Dynamic Object Collaboration
Injector object
creates ServiceA1 and ServiceB1 objects.
Thereafter, it creates a Client object
and injects the
ServiceA1 and ServiceB1 objects.
Injector
uses a Configuration
file that maps ServiceA and
ServiceB interfaces
to ServiceA1 and
ServiceB1 implementations.
Injector starts with creating the
ServiceA1 and
ServiceB1 objects.
Injector
creates the
Client object
and injects the ServiceA1 and ServiceB1
objects.
Client object
can then use
the ServiceA1 and ServiceB1
objects as required.