Slide 1

Slide 1 text

How To Built Uranow Android App 2018.02.13 Toru Furuya

Slide 2

Slide 2 text

Agenda 1. Project Overview 2. Application Overview 3. Development Rule 4. Future Expectation

Slide 3

Slide 3 text

Project Overview

Slide 4

Slide 4 text

Project Overview ● 2017/11/Mid - 2018/02/09 (About 3 months) ● 3 - 4 Members (One was super begineer in Android (It’s me!!!)) ● iOS App was released in advanse ● 30min Sprint Planning once a week

Slide 5

Slide 5 text

Application Overview

Slide 6

Slide 6 text

Application Overview ● Overall Transition Diagram ● Architecture ● Dependencies ● In App Billing

Slide 7

Slide 7 text

Login Column Forune Notification Billing

Slide 8

Slide 8 text

Architecture Controller View Controller Model + Infra?

Slide 9

Slide 9 text

Architecture ● Activity/Fragment → API Client ● Pure? MVC Architecture ● What is Layered Architecture? Is it tasty?

Slide 10

Slide 10 text

Dependencies ● Kotlin v1.1.51 ● Retrofit2 ● Okhttp3 ● RxJava ● RxLifecycle ● Butterknife ● Glide ● Spotlight

Slide 11

Slide 11 text

Retrofit2, Okhttp3

Slide 12

Slide 12 text

Retrofit2, Okhttp3

Slide 13

Slide 13 text

RxJava, RxLifecycle

Slide 14

Slide 14 text

RxJava, RxLifecycle onSuccess onError

Slide 15

Slide 15 text

In App Billing ● Play Billing Library ● version 1.0 released @2017/10/18 “ The Play Billing Library is written in Java and provides convenience classes and features, which you can use to implement in-app billing into your Android apps. The library is a wrapper for the Android Interface Definition Language (AIDL) file that defines the interface to the In-app Billing service. ”

Slide 16

Slide 16 text

Development Rule

Slide 17

Slide 17 text

Development Rule ● Variables Naming Rule ● Activity Creating Rule ● Fragment Creating Rule ● View-Binding Rule ● Code Formatting Rule

Slide 18

Slide 18 text

Variables Naming Rule ● Don’t use “m” and “s” prefixes ● Don’t define static vars which isn’t final

Slide 19

Slide 19 text

View-Binding Rule ● Use at least one Fragment for each Activity ● Activity doesn’t hold View subclasses, Fragment does instead ● Don’t use by lazy in Fragment, but use Butterknife ○ unable to clear cached views in a Fragment’s onDestroyView() ○ Pros/cons of Android view access strategies ○ FragmentでKotlinのby lazyを使ってfindViewByIdするとレイアウト反映できない &リークする件

Slide 20

Slide 20 text

● Follow the ktlint rule (Refer to My Previous Presentation about ktlint) ● We have to do ktlint Formatting before commit (All we need to do is to type below command) ● Otherwise, Mr. Jenkins criticizes your code which isn’t follow the rule Code Formatting Rule

Slide 21

Slide 21 text

Future Expectation

Slide 22

Slide 22 text

Future Expectation ● Layered Architecture (or Alternatives) ● More Reactive Programming ● Lint Rule Customization with ktlint

Slide 23

Slide 23 text

Next Theme Android Architecture Components Fin

Slide 24

Slide 24 text

FYI - carbon