
Sign up to save your podcasts
Or
When applying Dependency Injection (DI) principles in your iOS codebases, you rightly end up pushing and deferring the instantiation of dependencies up the chain.
For example, instead of coupling a ViewModel with a concrete Service by instantiating it directly:
Your ViewModels will depend on abstractions (e.g., protocol or closure) passed via initializer injection:
This way, you can easily develop, maintain, and test your implementations in isolation. You also gain the ability to inject different kinds of services, making your codebase more composable and Open/Closed.
A common question now is...
"Where should I instantiate and inject the Service and any other dependencies?!"
In the Composition Root!
And in this podcast episode, you’ll find answers to frequently asked questions about the Composition Root and how you can leverage it on your iOS apps, including:
This episode is full of insights you can apply in your current projects to help you and your team achieve loose coupling in the codebase, drastically improve your productivity, and deliver much more value to your company and customers.
Subscribe now to our Youtube channel and Podcast to catch new episodes.
4.3
1414 ratings
When applying Dependency Injection (DI) principles in your iOS codebases, you rightly end up pushing and deferring the instantiation of dependencies up the chain.
For example, instead of coupling a ViewModel with a concrete Service by instantiating it directly:
Your ViewModels will depend on abstractions (e.g., protocol or closure) passed via initializer injection:
This way, you can easily develop, maintain, and test your implementations in isolation. You also gain the ability to inject different kinds of services, making your codebase more composable and Open/Closed.
A common question now is...
"Where should I instantiate and inject the Service and any other dependencies?!"
In the Composition Root!
And in this podcast episode, you’ll find answers to frequently asked questions about the Composition Root and how you can leverage it on your iOS apps, including:
This episode is full of insights you can apply in your current projects to help you and your team achieve loose coupling in the codebase, drastically improve your productivity, and deliver much more value to your company and customers.
Subscribe now to our Youtube channel and Podcast to catch new episodes.