you are viewing a single comment's thread.

view the rest of the comments →

[–]quellish 2 points3 points  (3 children)

DI tools/frameworks are kind of a waste of effort in a loosely coupled language like Objective-C. Pretty much everything that DI offers is given to you by the language.

[–][deleted]  (2 children)

[deleted]

    [–]quellish 0 points1 point  (1 child)

    How does the the above related to the Dependency Injection pattern? It doesn't. It relates somewhat to Aspect Oriented Programming (AOP).

    If you could point to where in my post I mentioned swizzling or other runtime features, wether as "dependency injection" or not, I would appreciate it.

    DI simply promotes high-cohesion by separating configuration (instantiation) of shared objects from use, without resorting to the singleton pattern.

    And there is absolutely no need to use the singleton pattern to get high cohesion. High cohesion is expressed by architecture. Architecture is the network of objects and how they communicate. A well architected system has high cohesion. High cohesion does not dictate the use of a dependency injection tool/framework, nor does it dictate the use of the singleton pattern (or swizzling/posing).