<=Exit
+ - 0:00:00
Notes for current slide

notes here

Notes for next slide

State of Cross Platform Development
2015

John Leung 2015
1 / 41

notes here

Topics

  1. Platforms Today
  2. Native Platform Development
  3. Cross Platform Native Development
  4. Finding Unicorn
2 / 41

Platforms 2015

  • PC - Windows, OS X, Linux, Chrome OS
  • Mobile - iOS, Android, Windows Phone Mobile
  • Web - Chrome, Firefox, IE, Safari, Edge
  • Others - Game Systems, IoT, Wearables, SmartTV, Auto
3 / 41

Mythical Unicorn

4 / 41
5 / 41
6 / 41
7 / 41

Tidekit

  • The only app development platform that lets you develop HTML5, hybrid and native apps for iOS, Android, Blackberry, Windows, Mac OS X, Linux and the Web — all from a single source of code written in JavaScript.
  • Bindings for different languages including Python, C, C++, Java, C#, Objective-C
  • Beta Testing via paid waiting list of $29 or priority seating for $99 http://betalist.com/startups/tidekit
8 / 41

Vaporware

  • After more than a year with nothing to show, it announced:
    We failed to bring the product quickly enough for you. As a result, we came to the serious decision to discontinue TideKit and dissolve our company.
  • lawsuits were filed for 1000+ paid supporters
9 / 41

Native Mobile Development Environments

10 / 41

iOS

  • operating system for iphone, ipad, ipod touch, appleTV
  • uses XNU kernel, the kernel for Darwin, a Unix OS which began in form of NeXT’s OS and became the base for OS X
  • iOS SDK stack (hierarchically):
    1. Cocoa Touch Platform
    2. Media / Application Services
    3. Core Services
    4. Core OS / iOS kernel
11 / 41

Cocoa Touch

  • Multi-touch events and controls
  • Accelerometer support
  • View hierarchy
  • Localization (i18n)
  • Camera support
12 / 41

Cocoa Touch key frameworks

  • Foundation Kit Framework
  • UIKit Framework (based on Application Kit)
  • GameKit Framework
  • iAd Framework
  • MapKit Framework
  • Address Book UI Framework
  • EventKit UI Framework
  • Message UI Framework
  • Notification Center Framework
  • PushKit Framework
  • Twitter Framework
13 / 41

Native iOS Languages

  • c, c++, objective-C, swift
  • most documentations are still for objective-C
  • “Objective-C - a hacked language to incorporate smalltalk on top of c”

Swift:

  • characterized as “Objective-C without the C”
  • 2.0 announced and open sourced June’15
  • usage is growing
  • will probably replace Objective-C as the de facto language for iOS and MacOS apps
14 / 41

Android OS

  • operating system for Android phones, tablets, and PC, Android TV, Android Wear, and Android Auto
  • started life as OS for the Danger smartphone
  • uses version 3.4 or 3.10 of Linux kernel
15 / 41
16 / 41

Android Runtime Environment

Dalvik VM:

  • on version 4.4 (Kitkat) and earlier.
  • a JIT (Just In Time compilation) Java VM

ART (Android Runtime):

  • on version 5.0 (Lollipop) and later
  • uses of ahead-of-time (AOT) compilation by compiling entire applications into native machine code upon their installation.
17 / 41

Android SDK

SDK:

  • debugger, libraries, and emulator

Native Languages support:

  • Java (any JVM languages), Go
  • other languages can be compiled to ARM and MIPS, and be installed via the Android NDK (Native Development Kit)
18 / 41

Official Tools

XCode(iOS):

  • IDE containing iOS SDK and OS X SDK targeting the Cocoa Touch and Cocoa Platform
  • available on OS X only, but can run on Windows via a VM
  • provides Different View Layouts, Storyboard Editor

Android Studio(Android):

  • the Official Android IDE powered by IntelliJ
  • available on Windows, Linux, OS X

Visual Studio (Windows, Windows Phone):

  • available on Windows, Linux, OS X
19 / 41
20 / 41
21 / 41

Cross Platform Native Development

22 / 41

Appcelerator (Javascript)

  • Suite of tools: Dashboard, Titanium, ArrowDB, Arrow Push, Insights/Analytics
  • Compiles to Native targeting iOS, Android, Windows
  • One of the first Cross Mobile Native Platform Development Environment
  • Still strong community
  • $39/mo. for solo
23 / 41

RubyMotion (Ruby)

  • targets Native Android, iOS
  • No IDE (use XCode, Android Studio, etc.)
  • Terminal based workflow, deployment
  • watchOS support
  • Not much community and traction, not that great reviews
24 / 41

Corona SDK (Lua)

  • targets Native Android, iOS, Windows Phone, Windows, OS X, kindle
  • Designed for gaming, so very gaming centric
  • Comes with Corona Editor IDE
  • Very active community
  • Free SDK limited to API provided
  • $79/mo. for Enterprise - ability to call C, C++, Objective-C, Java
  • $499/yr/platform for Corona Cards - even easier development
25 / 41

Golang Mobile

26 / 41

Marmalade (C++)

  • No IDE (use XCode, Android Studio, etc.)
  • Single source for your app regardless of platform
  • No virtual machines or language cross translation
  • Can redeploy your app to another platform without recompiling
27 / 41
28 / 41

RoboVM (Java)

  • Share code targeting iOS, Android, Windows, Linux, OS X and WebGL-enabled browsers
  • Use any JVM languages
  • translates Java bytecode into native ARM or x86 code for Native UX & Performance
  • integrates with Eclipse, IntelliJ IDEA, Netbeans, and XCode's Interface Builder
  • $19/mo. or $199/yr. for solo
29 / 41

Xamarin (C#)

  • Suite of tools: Xamarin Platform, Test Cloud, Insights
  • Custom IDE with forms builder
  • Share code targeting Native iOS, Android, Windows, OS X
  • Support for F#, but almost zero documentation/code samples
  • $25/mo. for solo
30 / 41

Kivy (Python)

  • "Open source Python library for rapid development of multi-touch applications"
  • targets Linux, Windows, OS X, Android and iOS
  • runs the same code on all supported platforms
  • can natively use most inputs, protocols and devices including mouse, trackpad, WM_Touch, WM_Pen
  • 4 books published in past 18 months!
  • http://kivy.org/#gallery
  • very active community
31 / 41

Kivy Organization

  • a non-profit (as per the French law of 1901) membership organization devoted to advancing open source technology related to the Kivy Framework, created in February 2014.
  • Manages the funding, publicizing, protection of the core Kivy Framework, made available to the public free of charge.
  • Publicizes, promotes the adoption of, and facilitates the ongoing development of Kivy-related technology and educational resources.
32 / 41
from kivy.app import App
from kivy.uix.button import Button
class TestApp(App):
def build(self):
return Button(text='Hello World')
TestApp().run()
class LoadDialog(FloatLayout):
def load(self, filename): pass
def cancel(self): pass
#:kivy 1.4.0
<LoadDialog>:
BoxLayout:
size: root.size
pos: root.pos
orientation: "vertical"
FileChooserListView:
id: filechooser
BoxLayout:
size_hint_y: None
height: 30
Button:
text: "Cancel"
on_release: root.cancel()
Button:
text: "Load"
on_release: root.load(filechooser.path, filechooser.selection)
33 / 41

Silver

34 / 41

Silver Extensions

Extends Swift 2.0’s error handling to handle exceptions from all 3 platforms

Additional keywords and symbols

  • __await - C# style await
  • __event - .NET style multi-cast Events
  • __inline (inline functions)
  • __partial - partial classes
  • __yield - iterators
  • __mapped - Mapped Types - used internally to create cross-platform wrappers with zero overhead
  • @ - Aspects
  • : - attribute scope prefixes
35 / 41

Silver IDE

  • uses Visual Studio for Windows
  • “Fire” - their IDE for Mac
  • both IDE can compile to all 3 platforms
  • have contextual menu to open up Android Studio and Xcode to edit UI
36 / 41
37 / 41

React Native

  • “Bringing modern web techniques to mobile“
  • true native UI (only on iOS for now)
  • based on componentkit, a native port of React to iOS also by facebook
  • aims to primarily bring the power of the React programming model to mobile app development
  • aims to be a learn-once write-anywhere tool
  • not aim to be a write-once run-anywhere cross platform tool
  • only environment with virtual DOM and reconciliation, bringing functional programming to the UI layer
38 / 41

React Native vs. React

  • Instead of using block elements such as div or section, use the View component, which maps over to the native iOS component UIView
  • All text must be wrapped inside the Text component
  • No stylesheets - all your styling is written as JavaScript objects
  • ES6 is supported out of the box as well as flexbox

sources:

39 / 41

Conclusion

  • Unicorn exists?
40 / 41

Half Unicorns?

  • Kivy, Silver, React Native
41 / 41

Topics

  1. Platforms Today
  2. Native Platform Development
  3. Cross Platform Native Development
  4. Finding Unicorn
2 / 41
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow