Simple comparison of Android Dependency Injection framework Butterknife and Dagger

Source: Internet
Author: User

Recently researched the dependency injection framework that the Android platform can use. Found that there are now four kinds of commonly used. Dagger, Butter Knife, Roboguice, Android Annotations. After a series of comparisons, finally our choice

Narrowed down to the 2 frames of dagger, Butter knife. In fact, domestic and foreign use of more than should be dagger. But I think it is still a little complicated, and then look at Jakewharton blog, he also mentioned Dagger, I

Excerpt from the answer to the question he answered difference between Dagger and Butterknife Android on StackOverflow. Under the simple translation, some people say that butter knife is simply doing a binding view operation, not

The real inject. Dagger is the real inject. Jakewharton replied below that if you use dagger, you will want to die on the view injection. (Haha, a bit of the opposite meaning.) )。 Butter knife really isn't.

In the strict sense of injection, the reason is called view injection, because some people in the use of Dagger said view injection too troublesome. So there will be the birth of butter knife. Butter knife is so simple and rough, you can

It's okay to call him straight findViewById . (Haha, really a little angry!) )


Well, to here, should understand Butterknife and dagger different, in fact, should say butterknife is a supplement to dagger, butterknife only focuses on the injection of the view. The others use dagger. Me

We are now ready to adopt Butterknife, and later with the use of dagger strategy. Hope to help the two see the hesitation of friends.



Simple comparison of Android Dependency Injection framework Butterknife and Dagger

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.