DI vs DIP
Dependency Injection and the Dependency Inversion Principle have similar names. What's the difference?
Dependency Injection and the Dependency Inversion Principle have similar names. What's the difference?
DIP is a design principle: high-level policy depends on an abstraction, not a concrete type, and the concrete type implements that abstraction. DI is a technique: an object receives what it needs from outside instead of building it. DI is the usual way to realize DIP, but if you inject a concrete type, DIP is still broken.
ArchitectureShort answerBasics
Why do we do dependency injection in an iOS app?
#dependency-injection #protocol
ArchitectureMultiple choiceBasics
In a codebase where a singleton like AnalyticsManager.shared is referenced directly all…
#dependency-injection #testability
ArchitectureShort answerIntro
In a travel app, a global SessionManager.shared holds auth, cache, analytics, and…
#dependency-injection #testability
iOS system designShort answerAdvanced
Sketch a single "save bookmark" feature as a Swift code skeleton. Instead of a…
#dependency-injection #protocol