Manuel Meyer
Sep 18, 2022

but — why?

Seriuosly: just create the objects you need and pass it during creation time to other parts of he system.

If that isnt possible for you, you should simplify your system — not relying on very greater complexity — what adding any special treatment of dependencies would be. DI-frameworks must be considered "boilerplate code" or "accidental complexities" as they are a necessity risen from the chosen architecture — not part of the "domain" — the real reason why a project exists and someone pays for it.

just a few days ago I released an article on how design general purpose architectures that dont need any boilerplate codes: https://blog.devgenius.io/khipu-a-boilerplate-code-free-and-declarative-implementation-of-clean-architecture-in-swift-406b72327dcc?sk=c4139b49ee11a30c2fbab346a7f1be74

Manuel Meyer
Manuel Meyer

Written by Manuel Meyer

Freelance Software Developer and Code Strategist.

No responses yet