Tags and keywords
Now the simulation is run in Magic Model Analyst® (Cameo Simulation Toolkit®)
with instances of
Client
configured ("injected") with the various instances of A1
and A2
:The tables show before and after execution of the Parametrics calculations. They have been executed here directly from the MagicDraw table diagrams across all rows of each table.
Consider our definition of Dependency Injection:
Wikipedia: 'In software engineering, dependency injection is a technique in which an object receives other objects that it depends on. These other objects are called dependencies. In the typical "using" relationship the receiving object is called a client and the passed (that is, "injected") object is called a service. The code that passes the service to the client can be many kinds of things and is called the injector. Instead of the client specifying which service it will use, the injector tells the client what service to use. The "injection" refers to the passing of a dependency (a service) into the object (a client) that would use it.'
Here the author of the table has decided which concrete implementation of the service I_A
will be executed for each instance of Client
; all the client knows is that it can access the value of o
through its reference a : I_A
.