CodeX
Published in

CodeX

Dependency Injection — Back to the Basics

DI ensures that components have their dependencies available without knowing having to create them. A dependency is another component that focuses on a specific need (e.g. database, third-party API, clock, etc.).

Image by Spencer via Unsplash Copyright-free

Why do I need DI?

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store