Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Modularity & Dependency Injection at Scale

Modularity & Dependency Injection at Scale

How do we break down a large JVM monolith without incurring runtime costs? How do we scale dependency injection in such an application running in a constrained environment like mobile? Does it play well with a modularized Android app? How do you visualize and navigate the graph as complexity grows?

In this session we will describe the mechanisms that we use at Twitter to facilitate modularization and decoupling utilizing dependency injection. We will also cover why Dagger is our tool of choice along with the shortcomings we encountered, and share some practical advice on how to address them. Finally, we’ll offer a sneak peek of the extensions that we built on top of Dagger to facilitate dependency injection that we plan to open source in 2020.

3ddbc5555684719ae46d67021f0dc36e?s=128

Saud Khan

March 20, 2020
Tweet

More Decks by Saud Khan

Other Decks in Programming

Transcript

  1. Modularity & Dependency Injection at Scale FOSS Asia 2020

  2. @mrmans0n Nacho López Software Engineer Android Foundation Architecture @CesarDielo César

    Puerta Technical Lead Twitter for Android @bidyut Saud Khan Software Engineer Android Performance
  3. None
  4. Author: Ben Sandofsky Date: Mon Jun 21 23:24:55 2010 -0700

    Initial import.
  5. None
  6. None
  7. None
  8. None
  9. None
  10. Periscope @PeriscopeCo You might have heard some news: It involves

    a blue bird. #YouCanGuessTheRest #WeJoinedTheFlockInJanuary 13 Mar 2015 629 761
  11. +

  12. None
  13. None
  14. D D

  15. DI is important

  16. DI is important Refactoring for… Correctness Testability Reusability

  17. regardless of project size DI is important

  18. None
  19. Static checks Errors at compile time > Runtime errors

  20. Description: [Dagger/MissingBinding] com.twitter.ui.util.UiArchLayoutContentViewProvider cannot be provided without an @Inject constructor

    or an @Provides-annotated method. Description: [Dagger/DuplicateBindings] com.twitter.ui.util.UiArchLayoutContentViewProvider is bound multiple times.
  21. Code generation Automating the creation of glue code

  22. val inflater = LayoutInflater.from(context) val renderer = Renderer(inflater) val database

    = Database() val timeline = Timeline(database, renderer) class Renderer (database: Database, renderer: Renderer) class Timeline class Database() (inflater: LayoutInflater)
  23. class Renderer (database: Database, renderer: Renderer) class Timeline class Database

    () (inflater: LayoutInflater) @Inject constructor @Inject constructor @Inject constructor
  24. Graph Architecture Scoped object graphs mapping to the app lifecycle

    @Component @Subcomponent
  25. None
  26. None
  27. None
  28. None
  29. @ApplicationScope @UserScope @RetainedScope @ViewScope

  30. @Component(modules = [ApplicationModule::class]) @ApplicationScope interface ApplicationObjectGraph { fun userObjectGraphBuilder(): UserObjectGraph.Builder

    }
  31. { fun featureRetainedBuilder(): FeatureRetainedObjectGraph.Builder } @Subcomponent(modules = [UserModule::class]) @UserScope interface

    UserObjectGraph @Component(modules = [ApplicationModule::class]) @ApplicationScope interface ApplicationObjectGraph { fun userObjectGraphBuilder(): UserObjectGraph.Builder }
  32. { fun featureRetainedBuilder(): FeatureRetainedObjectGraph.Builder } @Subcomponent(modules = [UserModule::class]) @UserScope interface

    UserObjectGraph @ApplicationScope interface ApplicationObjectGraph { fun userObjectGraphBuilder(): UserObjectGraph.Builder } @Subcomponent(modules = [FeatureRetainedModule::class]) @RetainedScope interface FeatureRetainedObjectGraph { fun featureViewGraphBuilder(): FeatureViewObjectGraph.Builder }
  33. { fun featureRetainedBuilder(): FeatureRetainedObjectGraph.Builder } @UserScope interface UserObjectGraph @Subcomponent(modules =

    [FeatureRetainedModule::class]) @RetainedScope interface FeatureRetainedObjectGraph { fun featureViewGraphBuilder(): FeatureViewObjectGraph.Builder } @Subcomponent(modules = [FeatureViewModule::class]) @ViewScope interface FeatureViewObjectGraph
  34. { fun featureRetainedBuilder(): FeatureRetainedObjectGraph.Builder } @UserScope interface UserObjectGraph Components or

    ? Subcomponents @ApplicationScope @UserScope @RetainedScope @ViewScope
  35. Components for the root graph for the nested graphs Subcomponents

    @ApplicationScope @UserScope @RetainedScope @ViewScope
  36. None
  37. How to instantiate your graphs?

  38. component = .application(this) .build() class MyApplication : Application { private

    lateinit var component: ApplicationObjectGraph override fun onCreate() { } super.onCreate() } DaggerApplicationObjectGraph.builder()
  39. Dagger.getObjectGraphBuilder<ApplicationObjectGraph>() component = .application(this) .build() class MyApplication : Application {

    private lateinit var component: ApplicationObjectGraph override fun onCreate() { } super.onCreate() }
  40. fun <B : Any> getObjectGraphBuilder(builderClass: Class<B>): B } } class

    Dagger { companion object { inline fun <reified B : Any> getObjectGraphBuilder(): B = getObjectGraphBuilder(B::class.java) } {
  41. if (!builderClass.isAnnotationPresent(Component.Builder::class.java)) { throw IllegalArgumentException("Not a component builder class: $builderClass")

    } val componentClass = builderClass.enclosingClass ?: throw IllegalStateException("Component builder is not enclosed in a component.") val generatedDaggerClassName = getDaggerComponentImplementationClassName(componentClass) val generatedObjectGraphClass = ReflectionUtils.loadClass<Any>(generatedDaggerClassName) ?: throw IllegalStateException("Generated Dagger class can't be found: $generatedDagge val builderMethod = ReflectionUtils.getMethod(generatedObjectGraphClass, "builder") ?: throw IllegalStateException("The Dagger component generated class does not contain return ReflectionUtils.invokeMethod<B>(builderMethod, null) ?: throw IllegalStateException("The builder() method returned null.") fun <B : Any> getObjectGraphBuilder(builderClass: Class<B>): B } } class Dagger { companion object { inline fun <reified B : Any> getObjectGraphBuilder(): B = getObjectGraphBuilder(B::class.java) } TL;DR Use reflection once to find and instantiate the graph’s Component.Builder {
  42. if (!builderClass.isAnnotationPresent(Component.Builder::class.java)) { throw IllegalArgumentException("Not a component builder class: $builderClass")

    } val componentClass = builderClass.enclosingClass ?: throw IllegalStateException("Component builder is not enclosed in a component.") val generatedDaggerClassName = getDaggerComponentImplementationClassName(componentClass) val generatedObjectGraphClass = ReflectionUtils.loadClass<Any>(generatedDaggerClassName) ?: throw IllegalStateException("Generated Dagger class can't be found: $generatedDagge val builderMethod = ReflectionUtils.getMethod(generatedObjectGraphClass, "builder") ?: throw IllegalStateException("The Dagger component generated class does not contain return ReflectionUtils.invokeMethod<B>(builderMethod, null) ?: throw IllegalStateException("The builder() method returned null.") fun <B : Any> getObjectGraphBuilder(builderClass: Class<B>): B } } class Dagger { companion object { inline fun <reified B : Any> getObjectGraphBuilder(): B = getObjectGraphBuilder(B::class.java) } Don’t worry! We will share the code in GitHub! {
  43. if (!builderClass.isAnnotationPresent(Component.Builder::class.java)) { throw IllegalArgumentException("Not a component builder class: $builderClass")

    } val componentClass = builderClass.enclosingClass ?: throw IllegalStateException("Component builder is not enclosed in a component.") val generatedDaggerClassName = getDaggerComponentImplementationClassName(componentClass) val generatedObjectGraphClass = ReflectionUtils.loadClass<Any>(generatedDaggerClassName) ?: throw IllegalStateException("Generated Dagger class can't be found: $generatedDagge val builderMethod = ReflectionUtils.getMethod(generatedObjectGraphClass, "builder") ?: throw IllegalStateException("The Dagger component generated class does not contain return ReflectionUtils.invokeMethod<B>(builderMethod, null) ?: throw IllegalStateException("The builder() method returned null.") fun <B : Any> getObjectGraphBuilder(builderClass: Class<B>): B } } class Dagger { companion object { inline fun <reified B : Any> getObjectGraphBuilder(): B = getObjectGraphBuilder(B::class.java) } Follow Us! github.com/twitter {
  44. Referencing generated code Use reflection once to grab the root

    object graph builder. Dagger.getObjectGraphBuilder<ApplicationObjectGraph>() DaggerApplicationObjectGraph.builder()
  45. Where do we place our graphs?

  46. None
  47. @ApplicationScope @UserScope @RetainedScope @ViewScope

  48. Let’s compose a Tweet

  49. :features:composer ComposerActivity ComposerViewModel ComposerViewDelegate @RetainedScope @ViewScope @ApplicationScope @UserScope

  50. :subsystems:tweets TweetRepository :features:composer @RetainedScope @ViewScope @ApplicationScope @UserScope

  51. :subsystems:tweets TweetRepository :features:composer @RetainedScope @ViewScope @ApplicationScope @UserScope

  52. :twitter:media ImageUploader :features:composer :subsystems:tweets @RetainedScope @ViewScope @UserScope @ApplicationScope

  53. :twitter:media ImageUploader :features:composer :subsystems:tweets @RetainedScope @ViewScope @ApplicationScope @UserScope

  54. :core:network OkHttpClient :features:composer :subsystems:tweets :twitter:media @RetainedScope @ViewScope @UserScope @ApplicationScope

  55. :core:network :features:composer :subsystems:tweets :twitter:media @RetainedScope @ViewScope @ApplicationScope @UserScope ComposerNotifHandler

  56. :core:network :features:composer :subsystems:tweets :twitter:media @RetainedScope @ViewScope @ApplicationScope @UserScope M M

    M M M M
  57. :core:network :features:composer :subsystems:tweets :twitter:media @RetainedScope @ViewScope @ApplicationScope @UserScope M M

    M M M M
  58. App wide graphs definitions belong in the top gradle module.

    Ideal Location
  59. How to access graphs at the top from intermediate layers?

  60. :twitter:media L ImageUploader LegacyActivity ApplicationObjectGraph

  61. :twitter:media MediaAppSubgraph L LegacyActivity ApplicationObjectGraph

  62. object ApplicationObjectGraphProvider { var graphProvider: Any? }

  63. component = Dagger.getObjectGraphBuilder<ApplicationObjectGraph>() .application(this) .build() class MyApplication : Application {

    private lateinit var component: ApplicationObjectGraph override fun onCreate() { } super.onCreate() }
  64. super.onCreate() } ApplicationObjectGraphProvider.graphProvider = Dagger.getObjectGraphBuilder<ApplicationObjectGraph>() .application(this) .build() class MyApplication :

    Application { override fun onCreate() { }
  65. ApplicationObjectGraph ApplicationObjectGraphProvider :twitter:media L ImageUploader LegacyActivity MediaAppSubgraph

  66. (ApplicationObjectGraphProvider.graphProvider as MediaAppSubgraph).imageUploader()

  67. object ApplicationObjectGraphProvider { } fun <T> getSubgraph(clazz: Class<T>): T var

    graphProvider: Any? { return clazz.cast(graphProvider) }
  68. fun imageUploader(): ImageUploader interface MediaAppSubgraph { } companion object {

    fun get(): MediaAppSubgraph { return ApplicationObjectGraphProvider.graphProvider .getSubgraph(MediaAppSubgraph::class.java) }
  69. val uploader = MediaAppSubgraph.get().imageUploader() fun imageUploader(): ImageUploader interface MediaAppSubgraph {

    } companion object { fun get(): MediaAppSubgraph { return ApplicationObjectGraphProvider.graphProvider .getSubgraph(MediaAppSubgraph::class.java) }
  70. val uploader = MediaAppSubgraph.get().imageUploader()

  71. Grabbing objects from Dagger w/o visibility Wrap your Application and

    User graphs in providers that can be statically obtained, and add a way to extract subgraphs from them. ApplicationObjectGraphProvider UserObjectGraphProvider MediaAppSubgraph L LegacyActivity
  72. Graphs can be large!

  73. fun okHttpClient(): OkHttpClient fun twitterApiService(): TwitterApiService @Component @ApplicationScope interface ApplicationObjectGraph

    fun composerLauncher(): ComposerLauncher fun composerNotificationHandler(): ComposerNotifHandler fun tweetsRepository(): TweetsRepository fun tweetsDataSource(): TweetsDataSource fun imageLoader(): ImageLoader { fun loginController(): LoginController fun loginAssistController(): LoginAssistController fun appEventTracker(): AppEventTracker fun installationReferrer(): InstallationReferrer fun jobManager(): JobManager fun playServicesUtil(): PlayServicesUtil fun httpRequestController(): HttpRequestController fun registrableHeadsetPlugReceiver(): RegistrableHeadsetPlugReceiver , TweetRepositoryAppModule::cl (modules = [ComposerAppModule::class
  74. fun okHttpClient(): OkHttpClient fun twitterApiService(): TwitterApiService @Component @ApplicationScope interface ApplicationObjectGraph

    fun composerLauncher(): ComposerLauncher fun composerNotificationHandler(): ComposerNotifHandler fun tweetsRepository(): TweetsRepository fun tweetsDataSource(): TweetsDataSource fun imageLoader(): ImageLoader { fun loginController(): LoginController fun loginAssistController(): LoginAssistController fun appEventTracker(): AppEventTracker fun installationReferrer(): InstallationReferrer fun jobManager(): JobManager fun playServicesUtil(): PlayServicesUtil fun httpRequestController(): HttpRequestController fun registrableHeadsetPlugReceiver(): RegistrableHeadsetPlugReceiver , TweetRepositoryAppModule::cl (modules = [ComposerAppModule::class
  75. Subgraphs Slices of an Object Graph

  76. @Component @ApplicationScope interface ApplicationObjectGraph { } fun okHttpClient(): OkHttpClient fun

    twitterApiService(): TwitterApiService fun composerLauncher(): ComposerLauncher fun composerNotificationHandler(): ComposerNotifHandler fun tweetsRepository(): TweetsRepository fun tweetsDataSource(): TweetsDataSource fun imageLoader(): ImageLoader :app:twitter
  77. : @Component @ApplicationScope interface ApplicationObjectGraph { } fun okHttpClient(): OkHttpClient

    fun twitterApiService(): TwitterApiService fun composerLauncher(): ComposerLauncher fun composerNotificationHandler(): ComposerNotifHandler fun tweetsRepository(): TweetsRepository fun tweetsDataSource(): TweetsDataSource fun imageLoader(): ImageLoader ComposerAppSubgraph interface ComposerAppSubgraph { } :app:twitter :features:composer
  78. @Component @ApplicationScope interface ApplicationObjectGraph , : { } fun okHttpClient():

    OkHttpClient fun twitterApiService(): TwitterApiService fun tweetsRepository(): TweetsRepository fun tweetsDataSource(): TweetsDataSource fun imageLoader(): ImageLoader ComposerAppSubgraph interface TweetRepositoryAppSubgraph { } TweetRepositoryAppSubgraph :app:twitter :subsystems:tweets
  79. @Component @ApplicationScope interface ApplicationObjectGraph , : { } fun okHttpClient():

    OkHttpClient fun twitterApiService(): TwitterApiService fun imageLoader(): ImageLoader ComposerAppSubgraph TweetRepositoryAppSubgraph interface MediaAppSubgraph { } MediaAppSubgraph , :app:twitter :twitter:media
  80. @Component @ApplicationScope interface ApplicationObjectGraph , : fun okHttpClient(): OkHttpClient fun

    twitterApiService(): TwitterApiService ComposerAppSubgraph TweetRepositoryAppSubgraph MediaAppSubgraph , interface CoreNetworkAppSubgraph { } CoreNetworkAppSubgraph , :core:network :app:twitter
  81. :core:network :features:composer :subsystems:tweets :twitter:media TweetRepositoryAppSubgraph MediaAppSubgraph CoreNetworkAppSubgraph ApplicationObjectGraph ComposerAppSubgraph

  82. :core:network :features:composer :subsystems:tweets :twitter:media TweetRepositoryAppSubgraph MediaAppSubgraph CoreNetworkAppSubgraph ApplicationObjectGraph ComposerAppSubgraph

  83. Big monolithic graphs Scatter the definitions of the object graphs

    into subgraphs that can live in the gradle modules where the bindings are actually defined.
  84. How would that work in testing?

  85. object ApplicationObjectGraphProvider { } var graphProvider: Any? private val mapping:

    Map<Class<*>, Any> = mutableMapOf() fun <T> overrideSubgraph(clazz: Class<T>, subgraph: T) { mapping[clazz] = subgraph } fun <T> getSubgraph(clazz: Class<T>): T { if (mapping.containsKey(clazz)) return clazz.cast(mapping[clazz]) return clazz.cast(graphProvider) }
  86. object ApplicationObjectGraphProvider { } var graphProvider: Any? private val mapping:

    Map<Class<*>, Any> = mutableMapOf() fun <T> overrideSubgraph(clazz: Class<T>, subgraph: T) { mapping[clazz] = subgraph } fun <T> getSubgraph(clazz: Class<T>): T { if (mapping.containsKey(clazz)) return clazz.cast(mapping[clazz]) return clazz.cast(graphProvider) }
  87. How to decouple features? The app navigation case

  88. ComposerActivity MainActivity DMActivity TweetDetailActivity C D M TD

  89. ComposerActivity MainActivity DMActivity TweetDetailActivity C D M TD Circular Dependency!

  90. ComposerActivity MainActivity TweetDetailActivity C D M TD DMActivity :subsystems:navigation Intent

    factories ActivityArgs TD C D M
  91. ComposerActivity MainActivity TweetDetailActivity C D M TD DMActivity :subsystems:navigation TD

    M D C ActivityArgs
  92. interface ActivityArgs { fun toIntent(context: Context, clazz: Class<out Activity>): Intent

    }
  93. override fun toIntent(context: Context, clazz: Class<out Activity>): { .apply {

    putExtra("user_id", uid) putExtra("text", text) } } interface ActivityArgs { fun toIntent(context: Context, clazz: Class<out Activity>): Intent } data class ComposerArgs(val uid: Long, val text: String): ActivityArgs { } return Intent(context, clazz)
  94. Service Discovery Multibindings

  95. C D TD ComposerArgs TweetDetailArgs DMArgs :features:tweetdetail :features:dm :features:composer @Multibinds

  96. C D TD ComposerArgs TweetDetailArgs DMArgs :features:tweetdetail :features:dm :features:composer @Multibinds

  97. C D TD ComposerArgs TweetDetailArgs DMArgs :features:tweetdetail :features:dm :features:composer Map<Class<out

    ActivityArgs>, Class<out Activity>> C D TD ComposerActivity DMActivity TweetDetailActivity
  98. @Module object ComposerModule { @Provides @ApplicationScope fun provideActivityClass: Class<out Activity>

    { } } :features:composer @ActivityArgsKey(ComposerArgs::class) @IntoMap return ComposerActivity::class.java
  99. @ApplicationScope class ActivityStarter @Inject constructor( ) private val activityMap: Map<Class<out

    ActivityArgs>, Class<out Activity>>
  100. { fun startActivity(context: Context, args: ActivityArgs) { } } @ApplicationScope

    class ActivityStarter @Inject constructor( ) val intent = args.toIntent(context, activityMap[args.javaClass]) context.startActivity(intent) private val activityMap: Map<Class<out ActivityArgs>, Class<out Activity>>
  101. C D TD C D TD Start an Activity we

    can’t see at compile time At compile time you might not see everything, but at runtime it is all there. Let’s use Multibindings to aggregate references at compile time and resolve them at runtime.
  102. None
  103. Initializers Notification Handlers Deeplink Handlers

  104. None
  105. Subgraphs are not atomic units

  106. S ApplicationObjectGraph M S M S M S M S

    M S M S M S M
  107. S ApplicationObjectGraph M S M S M S M S

    S M S M S M @Component(modules = [ ComposerAppModule::class, TweetDetailAppModule::class, HomeAppModule::class, ExploreAppModule::class, CoreAppModule::class, CoreNetworkAppModule::class, MediaAppModule::class, VideoAppModule::class, NavigationAppModule::class, LoggingAppModule::class, TimelineAppModule::class, … and on and on and on ]) @ApplicationScope interface ApplicationObjectGraph: M
  108. ApplicationObjectGraph M M M M M M M M TimelineAppModule::class,

    … and on and on and on ]) @ApplicationScope interface ApplicationObjectGraph: InitializationSubgraph, ComposerAppSubgraph, TweetDetailAppSubgraph, HomeAppSubgraph, ExploreAppSubgraph, CoreAppSubgraph, CoreNetworkAppSubgraph, MediaAppSubgraph, VideoAppSubgraph, NavigationAppSubgraph, … and on and on and on S S S S S S S S
  109. @Component(modules = [ BroadcastAppModule::class, … and on and on and

    on ]) @ApplicationScope interface ApplicationObjectGraph: InitializationSubgraph, BroadcastAppSubgraph, TweetDetailAppSubgraph, @Component(modules = [ BroadcastAppModule::class, … and on and on and on ]) @ApplicationScope interface ApplicationObjectGraph: InitializationSubgraph, BroadcastAppSubgraph, MapSubgraph, S M
  110. None
  111. { fun broadcastController(): BroadcastController } @Module { @Binds @ApplicationScope fun

    bindBcastController(impl: BroadcastControllerImpl): BroadcastController } object BroadcastAppModule interface BroadcastAppSubgraph
  112. @ApplicationScope interface BroadcastAppSubgraph { fun broadcastController(): BroadcastController } @Subgraph @Subgraph(modules

    = [BroadcastAppModule::class]) @Module { @Binds @ApplicationScope fun bindBcastController(impl: BroadcastControllerImpl): BroadcastController } object BroadcastAppModule interface BroadcastAppSubgraph
  113. @ApplicationScope interface ApplicationObjectGraph : BroadcastAppSubgraph, InitializationSubgraph, ... (modules = [BroadcastAppModule::class,

    ...]) @Component
  114. @ApplicationScope interface ApplicationObjectGraph : BroadcastAppSubgraph, InitializationSubgraph, ... @ObjectGraph

  115. @UserScope interface UserObjectGraph : UserManagerSubgraph, TweetRepository, ... (modules = [UserManagerModule::class,

    ...]) @ApplicationScope interface ApplicationObjectGraph : BroadcastAppSubgraph, InitializationSubgraph, ... @ObjectGraph @Subcomponent
  116. @UserScope interface UserObjectGraph : UserManagerSubgraph, TweetRepository, ... @ApplicationScope interface ApplicationObjectGraph

    : BroadcastAppSubgraph, InitializationSubgraph, ... @ObjectGraph @ObjectGraph
  117. Annotation Processor @ObjectGraph @Subgraph @Component @Subcomponent

  118. @ObjectGraph @Subgraph Annotation Processor @Component @Subcomponent

  119. Annotation Processor @ObjectGraph @Subgraph @Component @Subcomponent

  120. Fully Dagger Compatible Annotation Processor

  121. Subgraphs are not encapsulated

  122. S S S S S S

  123. S S S S S S

  124. S @ApplicationScope interface BroadcastAppSubgraph { fun broadcastController(): BroadcastController } @Subgraph(modules

    = [BroadcastAppModule::class])
  125. @Subgraph( subgraphDependencies = [ CoreNetworkSubgraph::class, VideoPlayerSubgraph::class ]) S @ApplicationScope interface

    BroadcastAppSubgraph { fun broadcastController(): BroadcastController } @Subgraph @Subgraph(modules = [BroadcastAppModule::class],
  126. S ApplicationObjectGraph S S S S S S S

  127. S ApplicationObjectGraph S S S S S S S

  128. S ApplicationObjectGraph S S S S S S S S

  129. Subgraphs don’t support inversion of dependencies

  130. interface DatabaseSubgraph { fun migrationManager(): MigrationManager } fun schema(): Schema

    @Subgraph
  131. interface DatabaseSubgraph { fun migrationManager(): MigrationManager } fun schema(): Schema

    @Subgraph @Abstract @Abstract @Subgraph interface TwitterDatabaseSubgraph : DatabaseSubgraph { @Binds fun schema(bound: TwitterSchema): Schema }
  132. Graphs are hard to maintain

  133. @ObjectGraph @ApplicationScope interface ApplicationObjectGraph: InitializationSubgraph, BroadcastAppSubgraph, TweetDetailAppSubgraph, HomeAppSubgraph, ExploreAppSubgraph, CoreAppSubgraph,

    CoreNetworkAppSubgraph, MediaAppSubgraph, VideoPlayerSubgraph, NavigationAppSubgraph, TweetUploadAppSubgraph, PerformanceMetricsAppSubgraph, DMAppSubgraph, JSONModelsAppSubgraph, DynamicModulesAppSubgraph, NotificationsAppSubgraph, This is actually insane
  134. Annotation Processor @ObjectGraph @ApplicationScope interface ApplicationObjectGraph: InitializationSubgraph, BroadcastAppSubgraph, TweetDetailAppSubgraph, HomeAppSubgraph,

    ExploreAppSubgraph, CoreAppSubgraph, CoreNetworkAppSubgraph, MediaAppSubgraph, VideoPlayerSubgraph, NavigationAppSubgraph, TweetUploadAppSubgraph, PerformanceMetricsAppSubgraph, DMAppSubgraph, JSONModelsAppSubgraph, DynamicModulesAppSubgraph, NotificationsAppSubgraph,
  135. @ObjectGraph @ApplicationScope interface ApplicationObjectGraph Annotation Processor Automatic Discovery

  136. S ApplicationObjectGraph S S S S S S S

  137. And more!

  138. Annotation Processor

  139. Scythe OOP concepts for DI IDE support Better build times

    Binding overrides Modular scalability Self documentation Reusability Automatic discovery Completeness validation Factory bindings Assisted Injection Compatible with Dagger
  140. Scythe Open-source launch for everybody in 2020

  141. @mrmans0n Nacho @CesarDielo César @bidyut Saud Thank you! More questions?

    Follow ups from this talk? Hit us up on Twitter!