- What is is like to build hybrid apps in 2014?
- How does it differ from mobile development in 2014?
- Webviews
- WebView not necessairly the same as the built-in browser on the device.
- Apache Cordova
- Normal mobile web development
- Good code and style re-use across platforms
- Approximately the same level of difficulty as making a mobile site if you stay mostly within what is built-in to browser.
- A promise that you will never see or smell Java/Objective C
- A promise that you will not install XCode, Eclipse (or Android Studio)
-
Old android is a challenge
if (android < 4.4) { webview = ! chrome; webview = old; console.log = primitive // strings only, party like its 1999 }
-
Cordova plugin ecosystem is small, immature
- To make a plugin you need web, Android, iOS,
$other
skills
- To make a plugin you need web, Android, iOS,
-
Cordova docs are not amazing (but have improved).
- Android 4.4+, iOS 6+ allow you to attach dev tools to the webview
- Sadly Android 4.0 - 4.3 is still almost 50% of the install base
- Browser emulation of small screens/mobile devices is very helpful.
-
Same JS framework trade-offs apply as for a mobile website.
-
You need a build step.
- Minification still matters
- You will want to target different environments
-
Do as much developement as possible in the browser. Use your build process to stub out the bits of Cordova that your app requires.
-
Become somewhat competent with the Android/iOS dev tools
- You don't need to know heaps of Java/ObjC but knowing how to drive the IDEs and do basic debugging is helpful
// Objective C NSLog("Reveal thyself: @%", thing);
// Java import android.util.log; Log.d("Reveal thyself: ", someThing);
-
Absolutely must test on real devices - emulators are mostly useless.
- Some things build on top of Cordova e.g. ionic framework
- Have not used them but presume same trade-offs as vanilla Cordova.
- Xamarin - uses C# and builds against the operating system native frameworks e.g. Cocoa on iOS