nalexn / clean-architecture-swiftui

SwiftUI sample app using Clean Architecture. Examples of working with CoreData persistence, networking, dependency injection, unit testing, and more.
MIT License
5.56k stars 671 forks source link

Dependancy injection framework #61

Closed hydro1337x closed 2 years ago

hydro1337x commented 3 years ago

Would you ever consider using a lightweight DI framework like Resolver: https://github.com/hmlongco/Resolver instead of your dependancy injector or would that be an overkill? Looking forward to hearing your thoughts

nalexn commented 3 years ago

I don't want to introduce a third-party dependency when it's not needed, especially for such a tiny project where I can go without it. You certainly can use that Resolver if you like it. Constructor injection would work for larger projects as well, and is, in my opinion, a cleaner way of declaring and managing the dependencies in the modules