Minimum Architecture for Dependency Injectionđź’‰: Practical Management of Dependency Definitions

updated 10 months ago

This proposal has been withdrawn...

Abstract

Dependency Injection (DI) has been introduced as one of the modern best practices in WWDC 2016, and mentioned in WWDC 2017 to improve testability. To apply the DI pattern, a DI container is often used to simply define a dependency graph to retrieve instances with their dependencies resolved.

In this talk, an author of a DI framework in Swift will introduce a minimum architecture to practically apply the DI pattern and to keep the architecture as simple as possible not to lose speed of your development. The talk is based on the speaker's experience applying the minimum architecture to a production app used by tens of millions of users.

This talk covers

  • Comparison of iOS architectures, MVC, MVVM, VIPER and Clean Architecture.
  • Basic concept and motivation of dependency injection.
  • Introduction of the minimum architecture with MVVM and Repository pattern to apply dependency injection.
  • Practical management of dependency definitions using Swinject Container, Assembly and Assembler.
  • Unit testing with mocks and dependency injection.

Keywords

  • Dependency Injection
  • Architectural Pattern
  • Swinject

Suggestions