Hacker News new | ask | show | jobs
by bicx 4205 days ago
As an Android developer building and maintaining a larger app, I'm curious: Are there any performance hits or worrying complexity issues caused by including multiple paradigm-shifting libraries like RxAndroid, Dagger, and Butterknife? I've always tried to keep my app slim by keeping out unnecessary libraries (particularly ones that require I follow non-standard platform development), but I'm open to change if it's worth it.
2 comments

I'd say the two most important libraries for our app have been Retrofit & Picasso.  Both are built on RxAndroid so using it as well is a natural extension.  I think most people would probably only need RxAndroid or otto but we've enjoyed using both.  We mainly use the former for chaining network calls and the latter to maintain a bus of state updates.

Dagger 1.x (which we currently use) certainly helped slim down code size but it's mix of compile time and run time injection made using tools like Proguard a bit messy.  We haven't made the jump yet but it seems like Dagger 2.x solves for this: https://github.com/google/dagger

Butterknife is just plain useful to avoid a ton of view boilerplate code.

Our app is admittedly not too complicated but so far we haven't seen any performance issues.

RxAndroid does bring some overhead due to you having to create alot of anonymous classes (lack of Java lambdas really hurts here).

Butterknife and Dagger both use compile-time generation, so they're basically free and make your app well structured. I really wouldn't avoid 3rd party libs in your position, using good ones will make your apps less buggy and will let you easly create way better UX for your users.

For example, EventBus (or Otto, both do the same thing) is pretty essential for coupling things together and keeping them working over orientation and other configuration changes. I've seen so many apps locked into portrait position just because devs couldn't figure out how to decouple model from views and keep the app running over orientation change.