Building Android Apps — 30 things that experience made me learn the hard way
There are two kinds of people — those who learn the hard way and those who learn by taking someone’s advice. Here are some of the things I’ve learned along the way that I want to share with you:
- seriouscommitment;
- don’t draw it!;
- really need to;
- multidexing can save you;
- RxJava is the best alternative to AsyncTasks and so much more;
- Retrofit is the best networking library there is;
- Retrolambda;
- RxJava with Retrofit and Retrolambda for maximum awesomeness!;
- don’t use it too much because the codebase would get really messy;
- Package by Feature, not layers;
- everything off the application thread;
- lint your views to help you optimize the layouts and layout hierarchies so you can identify redundant views that could perhaps be removed;
- can;
- profile reports of your builds to see what is taking the build time;
- well known architecture;
- Testing takes time but it’s faster and more robust than coding without tests once you’ve got the hang of it;
- dependency injection to make your app more modular and therefore easier to test;
- fragmented podcast will be great for you;
- Never use your personal email for your android market publisher account;
- appropriate input types;
- analytics to find usage patterns and isolate bugs;
- dryrun to test them out faster);
- die as quickly as possible;
- Account Manager to suggest login usernames and email addresses;
- CI (Continuous Integration) to build and distribute your beta and production .apk’s;
- CI server, maintaining the server is time consuming because of disk space/security issues/updating the server to protect from SSL attacks, etc. Use circleci, travis or shippable, they’re cheap and it’s one less thing to worry about;
- Automate your deployments to the playstore;
- proguard for instance);
- CI builds are a good example), or even to check if the previous individual module build is up-to-date, can be up to almost 4x greater than to simply load that dependency as a binary .jar/.aar.
- thinking about ditching PNGs for SVGs;
- Timber.d(message) is a better option);
- wifi?);
- battery is low?);
- A user interface is like a joke. If you have to explain it, it’s not that good;
- Tests are great for performance: Write slow (but correct) implementation then verify optimizations don’t break anything with tests.
cesarmcferreira!
form:https://medium.com/@cesarmcferreira/building-android-apps-30-things-that-experience-made-me-learn-the-hard-way-313680430bf9#.iz9oy4ekc