Slide 1

Slide 1 text

OHMAE Ryosuke Development Division 1, Media Services Group, Media Group, Yahoo! JAPAN Initiatives to Improve Code Integrity to Continue Providing New Value - Yahoo! JAPAN Weather App -

Slide 2

Slide 2 text

Self-introduction OHMAE Ryosuke https://github.com/ohmae Twitter: ryo_mm2d Qiita: ryo_mm2d Yahoo! JAPAN @Osaka Android App Engineer Yahoo! JAPAN Weather App

Slide 3

Slide 3 text

Initiatives to Improve Code Integrity to Continue Providing New Value

Slide 4

Slide 4 text

Continue providing new value Improve Code Integrity Development of new feature New value

Slide 5

Slide 5 text

写真:アフロ Yahoo! JAPAN Weather App

Slide 6

Slide 6 text

Changes in Yahoo! JAPAN weather app 2019 2022

Slide 7

Slide 7 text

Do ordinary things as a matter of course

Slide 8

Slide 8 text

Agenda Specification s and design Framework and code design App lifespan

Slide 9

Slide 9 text

Agenda Specification s and design Framework and code design App lifespan

Slide 10

Slide 10 text

It doesn't look like Android app..?

Slide 11

Slide 11 text

Standard UI components + Design guidelines

Slide 12

Slide 12 text

A lot of knowledge is required

Slide 13

Slide 13 text

Material Design Jetpack AppCompat Button Toolbar Elevation Dialog Typography Shadow Layout ProgressBar TextView ColorSystem Shape Theme Style Mode Icon ConstraintLayo CoordinatorLayout

Slide 14

Slide 14 text

iPhone

Slide 15

Slide 15 text

"Make it the same as for the iPhone"

Slide 16

Slide 16 text

iOS > Android

Slide 17

Slide 17 text

“Not possible?” “Sure it is!”

Slide 18

Slide 18 text

What's wrong with a UI like the iPhone?

Slide 19

Slide 19 text

Android iOS

Slide 20

Slide 20 text

Android iOS

Slide 21

Slide 21 text

Android iOS

Slide 22

Slide 22 text

Pixel 7 iPhone 14

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

Straightforward use of standard components Maintenance costs Convenience Accessibility Completeness

Slide 25

Slide 25 text

An Android app should be like an Android app

Slide 26

Slide 26 text

Specification and design OS compatibility vs

Slide 27

Slide 27 text

Specification and design OS compatibility +

Slide 28

Slide 28 text

Healthy specifications and design lAssertively introducing design guidelines and libraries and learning how to use them appropriately lAchieving a high level of completeness with straightforward implementation and strong OS compatibility lWe share specification and design intent, and our engineers propose specifications with strong OS compatibility

Slide 29

Slide 29 text

Agenda Specification s and design Framework and code design App lifespan

Slide 30

Slide 30 text

Lifecycle and threads Single package Wide range of support Difficulties in Android app development

Slide 31

Slide 31 text

Technical debt has an overall effect l Wrong abstruction / commonization l BaseActivity l BaseFragment Proper scoping is essential Implementing everything in a single package 写真:アフロ

Slide 32

Slide 32 text

Lifecycle and threads Understand the lifecycle and treat it appropriately Rotating the screen regenerates the instance Status handover Callback reconnection Handle threads properly Only the main thread can control the UI No network access allowed on the main thread onCreate() onStart() onResume() onPause() onStop() onDestroy() Activity launched Activity running Activity shutdown

Slide 33

Slide 33 text

Wide range of support Android 13 API 33 Android 12L API 32 Android 12 API 31 Android 11 API 30 Android 10 API 29 Android 9 API 28 Android 8.1 API 27 Android 8 API 26 Android 7.1 API 25 Android 7 API 24

Slide 34

Slide 34 text

Use what is available + Fit into the mold

Slide 35

Slide 35 text

Use what is available Actively introduce existing systems such as OSS and maintain a modern development environment RxJava Kotlin RxKotlin Retrofit OkHttp Room ViewModel LiveData Jetpack Material components Lottie Firebase

Slide 36

Slide 36 text

Kotlin lGoogle I/O 2017 Official support lGoogle I/O 2019 Kotlin-first lSecure code lDistinguishes Nullable/NonNull lExpressive and concise description lExtensive standard library

Slide 37

Slide 37 text

Fit into the mold Architecture

Slide 38

Slide 38 text

Architecture l Strategies for how to organize modules l We don't have to think about them each time l Can be made by imitation lLimits the scope naturally l Does not fall into local optimums

Slide 39

Slide 39 text

Work hard and have fun or Have fun and work hard

Slide 40

Slide 40 text

Use what is available + Fit into the mold lAvoid to do difficult things lTotal optimum instead of local optimum lSparing no effort to make things easy lAdding up lots of "betters" instead of a one-time "best"

Slide 41

Slide 41 text

Agenda Framework and code design Specification s and design App lifespan

Slide 42

Slide 42 text

"QQMJGFTQBO 2022 2010 First release Now ,FFQVQEBUJOHUIFTBNF QBDLBHFGPSZFBSTPSNPSF *UJTOPUJNQPTTJCMFUPNJHSBUFCZDSFBUJOHBDPNQMFUFMZTFQBSBUFBQQMJDBUJPO :PVIBWFUPCFEFUFSNJOFEFOPVHI

Slide 43

Slide 43 text

App lifespan Invisible specifications Irreversible elements Users who do not update

Slide 44

Slide 44 text

Irreversible elements lExternal protocol lAndroidManifest lPersistence information App specifications that have gone outside the app

Slide 45

Slide 45 text

Invisible specifications lCoordination information lCustom scheme lInter-process communication lPast persistence information App specifications that have gone outside the app

Slide 46

Slide 46 text

App specifications placed outside the app continue to affect the app even if the process disappears from the app

Slide 47

Slide 47 text

Users who do not update lOutdated information remains in the market lSupport cannot be easily cut off The problem becomes more complex

Slide 48

Slide 48 text

Just looking at it does not make the code healthy

Slide 49

Slide 49 text

Sorting out puzzling specifications lIs it being used? lEstablishment of overall consistency lAwareness of the end Past

Slide 50

Slide 50 text

Gradually suppressing the impact lSupport for both & penetration of migration processing lAllowing for temporary waste lEnd of support lSupport limit: 2 years Current

Slide 51

Slide 51 text

Do not bring external specification s inside lExternal specifications are absorbed in the outer-most portion of the application lSeparate from internal specifications lArchitecture Current

Slide 52

Slide 52 text

Specifications that do not result in future technical debt l Preparing for migration l What we are making now will definitely become obsolete someday l Proposing specifications that do not leave debts to the future l Will anyone in the future be able to maintain it? Future

Slide 53

Slide 53 text

To maintain code health l Identifying unnecessary specification l Tenacious migration over a long span of time l Looking to the future and considering specifications that will not cause technical debt

Slide 54

Slide 54 text

Summary Specifications and design Proposing healthy specifications to maintain healthy code Framework and code design Sparing no effort to make things easy App lifespan Clean the slate and create specifications that do not cause future debt

Slide 55

Slide 55 text

Do ordinary things as a matter of course

Slide 56

Slide 56 text

Thank You