About Me
Rob Richardson is a software craftsman building web properties in ASP.NET and Node. He's a frequent speaker at conferences, user groups, and community events, and a diligent teacher and student of high quality software development. You can find this and other talks on https://robrich.org/presentations and follow him on twitter at @rob_rich.
Native or Web?
"So I have this idea for an app.
Should I build it as a native app or in HTML5?"
-everybody
"You're asking the wrong question."
-me
Native or Web?
It's not a binary switch
Native or Web?
There are more options than just two
Mobile Development Continuum
- (more native-ish)
- Native code in each platform
- Cross-compile Frameworks (Xamarin)
- "Browser in an App" Frameworks (Hybrid, PhoneGap)
- Separate mobile site
- "Responsive Design" site
- (more web-ish)
Why lean towards native?
- Better access to sensors
- Better performance
- People don't pay for websites
Why lean towards web-based?
- Single codebase works on more devices
- Faster deployment time
- Avoid App Store approval game
Mobile Development Continuum
Native
Description
Develop using native tools for each platform
Pros
- Most performant
- Most native look and feel
- Segmented testing
e.g. don't need to test the iPhone codebase against Android clients
Cons
- Most expensive to develop (no shared codebase)
- Typically need outsourced resources
Skills
Objective-C, Java, .NET, C++, etc, etc
Development
Mac, XCode, Android SDK, Eclipse
Debugging
within the native tools
Build
Mac for iOS client, Ant for Android client
Deployment
App Stores
Cross-compile Frameworks
Description
Code in your most fluent language, cross-compile into various platforms
Pros
- Easy to share non UI code between platforms
Cons
- Still need native build and debug resources
- Typically need to know native methodology
- Some argue this is the worst of both worlds
Cross-compile Frameworks
Skills
Mostly your native format, a little bit of native
Development
Install plugin into your IDE, link to Android SDK and XCode
Debugging
within your chosen IDE (hopefully)
Build
Mac for iOS client, Ant for Android client
Deployment
App Stores
Cross-compile Frameworks
Examples:
"Browser in an App" Frameworks (Hybrid apps)
Description
JavaScript shims to native SDKs, build to native apps, submit to app stores
Pros
- Develop using JavaScript
- Most debugging can be done in a browser
Cons
- Interface isn't quite right
- or we created so much code to
make it right that it's really slow
"Browser in an App" Frameworks (Hybrid apps)
Skills
JavaScript
Development
TextEditor, SublimeText
Debugging
on phone(s) or phone emulators
Build
Various cloud build tools available
Deployment
App Stores
"Browser in an App" Frameworks (Hybrid apps)
Cordova (open-source) clones:
- PhoneGap (Adobe): more tools, cloud build service
- Nomad (RedGate): write in Visual Studio, cloud build
- Icenium (Telerek): write in Visual Studio, cloud build
- Ionic Framework: Angular + Cordova
Separate mobile site
Description
Duplicate necessary pages to provide mobile-optimized experience
Pros
- Fast deployments
- No app store approval
- Copy/paste development is fast
- Don't need to worry about desktop
Cons
- Need to walk users through creating a home screen shortcut
- Separate codebase from main site means build it twice
- Browser detection (and redirecting) is fragile
- Dificult to debug and test with desktop browsers
Separate mobile site
Skills
Your chosen server technology, HTML5, JavaScript
Development
Your chosen IDE
Debugging
Phones browsers
Build
Existing tools
Deployment
A web server
"Responsive Design" site
Description
CSS Media Queries and JavaScript feature detection alter page content to match target
Pros
- Single codebase for mobile and non-mobile pages
- Can test in a browser
- Fast deployments
- No app store approval
Cons
- Developer needs to consider both desktop and mobile simultaniously
- Need to walk users through creating a home screen shortcut
"Responsive Design" site
Skills
Your chosen server technology, HTML5, JavaScript
Development
Your chosen IDE
Debugging
Desktop and Phone browsers
Build
Existing tools
Deployment
A web server
Which is best? It depends
Consider your resources and needs:
- Monitization strategy
- Target market
- Developer skills
- Development time
- Application depth
- Application needs
native apis not exposed? 3D acceleration needed?