问题
What is the difference between Dagger and Dagger 2.0, and why did Google decide to fork the existing project?
回答1:
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
来源:https://stackoverflow.com/questions/27888580/what-is-the-difference-between-dagger-and-dagger-2-0