Dagger and Butter Knife vs. Android Annotations

前端 未结 8 828
抹茶落季
抹茶落季 2021-01-29 23:54

I am evaluating Dependency Injection (DI) frameworks for an Android app. The top contenders are: Dagger (with Butter Knife) and Android Annotations. I understand that Dagger an

8条回答
  •  不思量自难忘°
    2021-01-30 00:29

    You should give a try at Toothpick.

    Toothpick is (per the README):

    • pure java
    • fast, it doesn't use reflection but annotation processing
    • simple, flexible, extensible & powerful, robust & tested
    • thread safe
    • documented & Open Source
    • scope safe : it enforces leak free apps
    • test oriented : it makes tests easier
    • it works very well with Android or any other context based framework (such as web containers)

    It can even be faster than Dagger 2 in most cases, and it's much simpler.

    Note: Yes, I am one of the authors.

提交回复
热议问题