What is the difference between Dagger and Dagger 2.0?

北城以北 提交于 2019-12-05 18:03:54

Some quotes from the Dagger 2 presentation

Issues of Dagger 1:

  • Ugly generated code
  • Runtime graph composition
  • Inefficient graph creation
  • Partial traceability
  • Map-like API

Dagger 2 solutions:

  • Compile-time validation of the entire graph
  • Easy debugging; entirely concrete call stack for provision and creation
  • Fully traceable
  • POJO API
  • Performance

Dagger 2 issues:

  • Less flexible
  • No dynamism
  • No automated migration path from Guice
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!