Toby O'Connell
Sep 21, 2022

--

Thansk for the response!

In the traditional definition of Dependency Inversion, protocols or interfaces are not required, simply an abstraction between modules. I would consider the mapping in the convenience initialiser to be this abstraction.

Ultimately, it's all just semantics though. This is just a different way of consuming dependencies which can offer some additional benefits.

--

--

Toby O'Connell
Toby O'Connell

Written by Toby O'Connell

Swift / iOS developer - I write about things that I find interesting or innovative.

No responses yet