← Graph

Classes Should Configure Their Own Dependencies

takeaway 2 connections

Bellware's closing Q&A position: a class should be responsible for configuring its own operational dependencies. There's no significant advantage to taking a dependency on an IoC container, Rails configuration, or tools like Needle — IoC containers were tried in the 2000s and abandoned ('Angular didn't get the memo'); well-established patterns exist for setting up operational values without them. Also: you shouldn't need Rails configuration running just to exercise a test.

type
recommendation
takeaway Classes Should Configure Their Own Dependencies
about
Takes a position on how dependency configuration should be done — inside the class, not via external frameworks.
takeaway Classes Should Configure Their Own Dependencies
from_talk
Stated in the Q&A exchange about IoC containers and Rails configuration.

Provenance