Виртуальная песочница (тм)

Tuesday, January 22, 2013

Difference in Cross-Platform Mobile Development – Native vs Hybrid vs HTML5

Notes from the talk "Difference in Cross-platform mobile development – native vs hybrid vs HTML5" by Dmitry Ivanov from C.T.Co

Native
        ++
                + Speed and reaction
                + Consumer focus
                + Native look and feel
                + Native API
                + Debug + Profile
        --
                - Only 1 Platform
                - New language
                - Costs
                - App review time (publishing & updates)
HTML 5 Frameworks
        * Sencha Touch
        * jQuery Mobile
        * KendoUI
        * jQTouch
        * The-M-Project
        * GWT Mobile
        * Jo
        * Mobello

Tools
        * Default Web Developer tools
        * Remote Web Inspector (weinre, jsconsole.com
        * Check this:
                ** SASS
                ** CoffeeScript
                ** Backbone.js

Hints and Caveats
        * Desktop Browser != Mobile Browser
        * Safari != Chrome
        * Mobile Browser != WebView
        * Offline app: remember about storage limit
        * Screen rotation handling animation
        * Minimize & merge frontend
        * Reduce & gzip requests
        * Optimize images
        * Simple, semantic DOM
        * Move as much as possible to backend
        * Do not use jQuery only for $("#myButton")
        * Do not use huge frameworks
        * Use HTML5 features: 
                ** WebWorkers
                ** WebStorage, WebSockets, Geolocation
        * Forget about JS animation
        * Use CSS3 animations
                ** activate the GPU: -webkit-transform: translate3d(0,0,0);
        * Test on multiple (as many as possible) devices or use collaboration testing tools

Hybrid
        * Self made protocol (http://myapp/)
        * PhoneGap
        * Trigger.io
        * HTML5 <-> [Native]

HTML5
        * One app = All devices
        * App fast update (without approval)
        * Hybrid way: access to native API + plugins
        * Easy to learn/develop?

HTML5 --
        * Over-hype
        * It's not only HTML
        * Speed
        * UI & Browsers " identity" 
        * Debug/profile
        * In-app purchase unavailable
        * Wrappers stack
        * HTML+CSS vs Interface Builder
        * Hybrid way: custom plugins
        * Hybrid way: new platform/API SDK update delay

Resources
        http://www.html5rocks.com/

Cross-compile
        * Appcelerator Titanium:
                ** JavaScript -> Native + Hybrid JS
        * MonoTouch:
                ** C# -> ARM ASM
        * Apache Thrift:
                ** Thrift definition -> Native
        * QT:
                ** QT + Native interfaces + run loop integration magic

Decision:
        * Single Platform | Native <-- Hybrid --> HTML5 | Multiple Platforms
        * App size and type
        * Platforms
        * Developer skill
        * Budget
        * Monetization + Distribution


No comments: