41
PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic

PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

  • Upload
    others

  • View
    15

  • Download
    0

Embed Size (px)

Citation preview

Page 1: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

PHONEGAP TO NATIVERebuilding an Android App from Inside Out

Krzysztof Koźmic @kkozmic

Page 2: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile
Page 3: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

STARTING POINT

mobile web site

Page 4: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

STARTING POINTmobile app

Page 5: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile
Page 6: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile
Page 7: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile
Page 8: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile
Page 9: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile
Page 10: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile
Page 11: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile
Page 12: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile
Page 13: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

HOW?

Page 14: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

REWRITE - GO BACK TO THE BEGINNING

Page 15: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

MODIFY PIECE BY PIECE - KEEP MARCHING FORWARD

EVOLUTION NOT

REVOLUTION

Page 16: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile
Page 17: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

ALWAYS BE SHIPPING

Divide and Conquer

Page 18: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

STAGE 1process and tools

Page 19: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

OPENING THE BLACK BOX

Page 20: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile
Page 21: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile
Page 22: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile
Page 23: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile
Page 24: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

WEB ⇄ APPtwo repos - one codebase

Page 25: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile
Page 26: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

END RESULTof stage 1

Page 27: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

STAGE 2web code ⇄ app code

Page 28: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

ISOLATE WEB APP CODE

Page 29: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

END RESULTof stage 2

Page 30: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

STAGE 3native navigation

Page 31: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

LAYERS

Page 32: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile
Page 33: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

ONE ACTIVITY = LOTS OF LIES

➤ fake modal dialogs

➤ locking the navDrawer

➤ navDrawer location and toolbar title

➤ options menu

➤ hiding toolbar and navDrawer while web app is starting up

Page 34: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

END RESULTof stage 3

Page 35: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

STAGE 4no WebView in sight

Page 36: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile
Page 37: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

ALMOST THERE

Page 38: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

END RESULTof stage 4

Page 39: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

LESSONS LEARNED

Page 40: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile

TWO APPS IN ONE

➤ active/active - global logic in web app

➤ split logic (telemetry)

➤ assumptions in web app

➤ not enough time spent making web app ‘dumb’

➤ asynchronous timing issues

➤ back button handling

Page 41: PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside Out Krzysztof Koźmic @kkozmic. STARTING POINT mobile web site. STARTING POINT mobile