How to use dependency injection to write maintainable software

Speaker: Francesco Zoffoli

Audience level: [ Beginner | Intermediate | Advanced ]

Are you tired of needing 50 files open to be able to understand what a single component does?

Do you find yourself wanting to change a component, then to realise that you’ll have to touch half of the code base?

Do you want to write simple tests which easily allow to verify your implementation?

Join this talk to learn an effective way to manage the dependencies through dependency injection and never have to worry about those problems again!

In this talk we’ll explore an approach and several techniques to perform dependency injection in C++, with the goal of having decoupled components which can be easily refactored and tested.

We’ll see how to manage both dependencies on data and dependencies on behaviours. We'll explore in which situations each can be used, and we'll see which libraries offer functionality to make the developer's life easy.

The talk will cover how to write components to take dependencies in an effective way and how to propagate them.

It will additionally cover more complicated cases, where components depend on multiple other components, and also how to handle deferred instantiation of dependencies (factories yay!!).

This is a concrete, practical talk which we'll give you a strategy for managing dependencies.

Join along to see how the typical code from production can be changed, and simplified, following this approach!