Skip to content

Instantly share code, notes, and snippets.

@toulouse
Last active April 16, 2016 18:25
Show Gist options
  • Save toulouse/4cece25c756a4c22ac7e74bb53c3263b to your computer and use it in GitHub Desktop.
Save toulouse/4cece25c756a4c22ac7e74bb53c3263b to your computer and use it in GitHub Desktop.

https://git.io/vwLdp

Basics

Tips

  • Directory structure
    • Most code lives in src/main/java
    • Other languages will live in src/main/${LANGUAGE_NAME}
      • Typically includes stuff like protobufs or thrift, which might generate code usable from other classes in main
    • src/main for stuff to go in the app; src/test is structured the same except it has testing stuff.
      • Stuff in src/test typically can see into src/main.
    • This directory structure comes from Maven, which is a really solid, if not the most solid dependency/package management software for any language that runs on a VM...
      • ...but it's quite complex the more plugins you add to it and configuration is insanely verbose, so Android uses Gradle, which uses the same directory structure and produces compatible build artifacts, BUT has much easier and simpler configuration (i.e. not XML, lol)
  • Square has the most interesting/useful Android code. Haven’t really looked at FB’s Android code, but it’s likely rather good. Google can be hit or miss. While most of Google is superlatively excellent, their execution on mobile is often good, but lacking.
    • Square lured some top-level Android people away from Google some time ago, and I’m sure FB did too.

Libraries

Architecture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment