PHONEGAP TO NATIVE - YOW! Conferences · PHONEGAP TO NATIVE Rebuilding an Android App from Inside...

Preview:

Citation preview

PHONEGAP TO NATIVERebuilding an Android App from Inside Out

Krzysztof Koźmic @kkozmic

STARTING POINT

mobile web site

STARTING POINTmobile app

HOW?

REWRITE - GO BACK TO THE BEGINNING

MODIFY PIECE BY PIECE - KEEP MARCHING FORWARD

EVOLUTION NOT

REVOLUTION

ALWAYS BE SHIPPING

Divide and Conquer

STAGE 1process and tools

OPENING THE BLACK BOX

WEB ⇄ APPtwo repos - one codebase

END RESULTof stage 1

STAGE 2web code ⇄ app code

ISOLATE WEB APP CODE

END RESULTof stage 2

STAGE 3native navigation

LAYERS

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

END RESULTof stage 3

STAGE 4no WebView in sight

ALMOST THERE

END RESULTof stage 4

LESSONS LEARNED

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

Recommended