GithubHelp home page GithubHelp logo

leohak / qualitymatters Goto Github PK

View Code? Open in Web Editor NEW

This project forked from artem-zinnatullin/qualitymatters

0.0 2.0 0.0 6.4 MB

Android Development Culture

Home Page: http://artemzin.com/blog/android-development-culture-the-document-qualitymatters/

Java 99.83% Shell 0.17%

qualitymatters's Introduction

QualityMatters

This is the app that follows all principles of Android Development Culture described here.

What does it have:

  • CI (Travis)
  • Unit tests (some under Robolectric, some are under plain JUnit runner with mocked android.jar).
  • Integration tests to see that Http, REST, JSON parsing and RxJava work well in composition.
  • Functional (UI) tests (Espresso with custom rules, mocked server and Screen-architecture) to check that app works according to the expectations from the user's point of view.
  • Static code analysis (FindBugs, PMD, Android Lint, Checkstyle) (see root build.gradle).
  • Code coverage (currently in process of fighting with jacoco-coverage plugin to fail the build if coverage is not big enough).
  • Developer Settings Menu where you can enable/disable Stetho, LeakCanary, etc. See full list below (feel free to add more tools!).
  • MVP, RxJava, Dagger 2, Retrofit 2 and so on.

Made with ❤️ by Artem Zinnatullin https://twitter.com/artem_zin.

To build the project run sh ci.sh (yep, that easy, because it should be easy).

Screenshots:

###Developer Settings

Tools:

  • Stetho — inspect the app via Chromium Developer Tools (network requests, db, preferences and so on). Must have for developers.
  • LeakCanary — detect memory leaks without IDE! Must have for QAs and developers.
  • TinyDancer — see frame rate right on your screen. Must have for QAs and developers.

Details of implementation

Developer Settings presented only in debug build type, libraries and resources used for Developer Settings compiled only into debug build and main source set knows only little abstractions over Developer Settings just to initialize real implementation in the debug build code. In release build type DeveloperSettingsModule (Dagger) just returns no-op implementation of DeveloperSettingsModel.

Why only debug builds? The Answer is simple — dex limit. LeakCanary brings about 3k of methods, Stetho brings about 2k and so on. The more tools you add to Developer Settings — the bigger apk you receive. Situation is even worse if your main code is near to 65k methods. In our production app we had to turn on multidex for debug builds.

###Packages structure

Many people ask why app has component-based structure of the packages: presenters, models, etc. instead of feature-based structure: itemslist, developersettings, etc.

With component-based structure of packages new persons on the project (like those who read the code of this app) can easily find what presenters does the app have, what views, models and so on. If you read the code and you want to quickly move to some class related to current one you can simply press t right on the GitHub and search for the required file!

qualitymatters's People

Contributors

artem-zinnatullin avatar digitalbuddha avatar jvilya avatar vanniktech avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.