Mobile Web Apps and the Intel® XDK

63
Intel Confidential Do Not Forward Mobile Web Apps and the Intel® XDK Dale Schouten TCE, Intel Corporation - @OldGeeksGuide Bob Spencer Sr. Software Engineer, Open Source Technology Center, Intel Corporation

description

Mobile Web Apps and the Intel® XDK AnDevCon San Francisco November 18-21, 2014

Transcript of Mobile Web Apps and the Intel® XDK

Page 1: Mobile Web Apps and the Intel® XDK

Intel Confidential — Do Not Forward

Mobile Web Apps and the Intel® XDKDale Schouten – TCE, Intel Corporation - @OldGeeksGuide

Bob Spencer – Sr. Software Engineer, Open Source Technology Center, Intel

Corporation

Page 2: Mobile Web Apps and the Intel® XDK

All about me . . .

2

Working at Intel for nearly 20 years in

various capacities in compiler

development and support, performance

analysis and web app development

tools.

Currently working with the Intel XDK

team.

Recovering C Programmer

Compiler Guy

Performance

Android compiler

Intel XDK

Page 3: Mobile Web Apps and the Intel® XDK

3

Agenda

Mobile Web Apps and the Intel XDK

Android Apps

Web Apps

HTML5

Hybrid Apps

Intel XDK

Crosswalk

Intel XDK IoT

Page 4: Mobile Web Apps and the Intel® XDK

Develop on Intel to increase your business opportunity

40M Unit Tablet Goal in 2014

>200 Designs Entry to Performance Windows* and Android*

4

Page 5: Mobile Web Apps and the Intel® XDK

Rich Portfolio of Android* and Windows* Mobile DevicesNew Tablets From $99 - ~$499+

Over 200 Designs Available globally

Acer

Iconia Tab 8

Acer*

Iconia One 7

Acer

Aspire Switch 10

ASUS*

FonePad 7

FE375CG

ASUS

Transformer Pad LTE

TF303CL

Dell

Venue 7

Dell*

Venue 8 KD Interactive*

Kurio Tablet

Toshiba*

Excite Go

Toshiba

Encore2 10”

FUHU*

DreamTab

ASUS

Zenfone 4.5

A450CG

ASUS

MeMO Pad 7

ME170C, ME176C

ASUS

MeMO Pad 8

ME 181C, ME581CL

ASUS

FonePad 8

FE380CG

ASUS

Transformer pad

TF103CG, TF103C

Lenovo*

ThinkPad 10”

FOXCONN*

Anchor Premium

FOXCONN

Anchor 7.8

Toshiba

Encore2 8”

5

Page 6: Mobile Web Apps and the Intel® XDK

Android AppsGold rush . . .

6

Page 7: Mobile Web Apps and the Intel® XDK

Full Bleed Image Example

77

Page 8: Mobile Web Apps and the Intel® XDK

8

Creating Android Apps is hard . . .

Page 9: Mobile Web Apps and the Intel® XDK

9

Magic?

Page 10: Mobile Web Apps and the Intel® XDK

HTML AppsRun Everywhere

10

Page 11: Mobile Web Apps and the Intel® XDK

Why HTML5?

11

HTML5 is the language of the web!

Flexible, Adaptable

Used by millions of developers

HTML5 == HTML5/CSS3/JS

Page 12: Mobile Web Apps and the Intel® XDK

Hybrid HTML5 Apps…

12

…allow developers to build apps using

these skills and tools…

…that can be distributed in native

app stores.

Page 13: Mobile Web Apps and the Intel® XDK

Native vs. Web Apps

13

Single

Platform

Multiple

Platforms

Full

CapabilitiesPartial

Capabilities

Web Apps

Web Developer Skills

Instant updates

Unrestricted Distribution

Native Apps

Advanced UI Interactions

Smoothest Performance

App Store distribution

Page 14: Mobile Web Apps and the Intel® XDK

Native vs. Web Apps

14

Single

Platform

Multiple

Platforms

Full

CapabilitiesPartial

Capabilities

Web Apps

Web Developer Skills

Instant updates

Unrestricted Distribution

Native Apps

Advanced UI Interactions

Smoothest Performance

App Store distribution

Hybrid HTML5 Apps

Web developer skills

Access to native platform

App Store distribution

Page 15: Mobile Web Apps and the Intel® XDK

Mobile HTML5 Web App Block Diagram

15

Device Libraries

Mobile Device OS

HTML5 Web App

Mobile Browser

Restricted Device Access

Page 16: Mobile Web Apps and the Intel® XDK

Mobile Hybrid HTML5 WebView App Block

Diagram

16

Device Libraries

Mobile Device OS

Native WebView

HTML5

WebView App

Hybrid Extension

Bridge

Page 17: Mobile Web Apps and the Intel® XDK

Think of Hybrid as a “Black and Tan”

17

Web App Stuff(stout)

Native App Stuff(pale ale)

/fōn•gap/

stuff

P.S. - It’s spelled “Cordova” but pronounced /fōn•gap/

Page 18: Mobile Web Apps and the Intel® XDK

Intel XDKCreating Hybrid Mobile Web Apps

18

Page 19: Mobile Web Apps and the Intel® XDK

Intel XDK: Hybrid HTML5 Mobile App Development

Debug and Test ToolsServices and Content

thru APIs and Plugins

Mashery* (et al)

Multiple Form Factors

and Platforms

HTML5 Brackets* Editor

App Designer Layout Editor

Ripple* Cordova* Emulator

Intel App Preview Debugger

Remote Chrome* DevTools*

“weinre” Remote Inspector

On Device Live Preview

iOS* - iPhone* and iPad*

Android* - x86 and ARM*

Crosswalk* - x86 and ARM

Windows* 8 Store - “Metro” UI

Windows 8 Phone

HTML5 Packaged Web Apps:

Tizen*, Firefox* and Chrome

19

Page 20: Mobile Web Apps and the Intel® XDK

Intel® XDK – Every stage of development

20

The Intel® XDK facilitates the development of hybrid HTML5

applications for iOS*, Android*, Windows* 8 and other mobile devices.

Visit the Intel Developer Zone xdk.intel.com

Existing

App

New

App

Cordova

FrameworksCloud build

Manually

submit to

app

store

Apple App Store

Google Play Store

Windows Store

Nook

. . .

Brackets

Editor

App

Designer

Ripple

Emulator

CDT

DebugApp

Preview

Page 21: Mobile Web Apps and the Intel® XDK

Intel® XDK: Cordova Plugins

21

Cordova Plugins

Core Plugins

Intel.xdk.*

Featured plugins

Google Play Games Services

Dolby Audio

Third-party plugins

Cordova plugin registry (or not)

Built from sources

Intel XDK

Cloud

Build Service

Your

Sources

Cordova

Plugins

Built app

Android .apk

iOS

Windows

. . .

Page 22: Mobile Web Apps and the Intel® XDK

Intel® XDK: Mashery APIs

22

Intel® Mashery™ API Services

Rotten Tomatoes

Instagram

Markit OnDemand

Woot

Dropbox

Weather Underground

Many more . . . .

Information

Products

Services

{JSON}

APIhttp://. . .

Page 23: Mobile Web Apps and the Intel® XDK

DevelopCreating your app

23

Page 24: Mobile Web Apps and the Intel® XDK

24

Intel® XDK: HTML Editor (Brackets)

Page 25: Mobile Web Apps and the Intel® XDK

25

Intel® XDK: Live Layout Editing

Page 26: Mobile Web Apps and the Intel® XDK

26

Intel® XDK: App Designer

Page 27: Mobile Web Apps and the Intel® XDK

Summary: Mobile App Design Tools

27

HTML5 Built-in Editor

Based on Brackets* --or-- use your

favorite editor

App Designer

Drag-n-Drop UI components

Configure media query switch [wrap]

points

Compatible with multiple UI

frameworks

App Framework

jQuery* compatible UI framework

Optimized for mobile device web

views

Android*, iOS*, Blackberry* and

Windows 8* themes

app-framework-

software.intel.com/style.php

Page 28: Mobile Web Apps and the Intel® XDK

Test, Debug, Preview and ProfileMake it work

28

Page 29: Mobile Web Apps and the Intel® XDK

29

Intel® XDK: Ripple Emulator

Page 30: Mobile Web Apps and the Intel® XDK

30

Intel® XDK: Ripple Emulator

Page 31: Mobile Web Apps and the Intel® XDK

31

Intel® XDK: App Preview

Page 32: Mobile Web Apps and the Intel® XDK

32

XDK: Remote Debugging

Page 33: Mobile Web Apps and the Intel® XDK

33

XDK: Remote Debugging

Page 34: Mobile Web Apps and the Intel® XDK

34

XDK: Profile

Page 35: Mobile Web Apps and the Intel® XDK

Summary: Emulate and On-Device Debug

35

Intel® XDK Emulator

Preview in various phone and tablet

formats

Simulate device-specific features

Debug using standard Chrome

DevTools (CDT)

Simulation of intel.xdk and Apache

Cordova APIs

App Preview On-Device Previewer

Quickly load and run projects directly

on real devices

App Debugger On-Device Remote

Android Debug

Remote access to Android device

JavaScript console (aka CDT)

Live Layout Editing

Experiment with layout and styling

options in real-time

Page 36: Mobile Web Apps and the Intel® XDK

Build and PackageCross platform

36

Page 37: Mobile Web Apps and the Intel® XDK

37

Intel® XDK: Package and Build

Page 38: Mobile Web Apps and the Intel® XDK

38

Intel® XDK: Plugin Settings

Page 39: Mobile Web Apps and the Intel® XDK

Alternate Build Service Offerings

39

Intel® XDK† Adobe* PhoneGap*

Build*

Other Options

(typical)

iOS*

Android*

Windows* Phone 8

Windows* 8 Tablet

Tizen*

Amazon* Kindle*

Barnes & Nobile* Nook*

FireFox* OS

Chrome* OS

Web App

Facebook*

Page 40: Mobile Web Apps and the Intel® XDK

CrosswalkThe advanced web runtime for ambitious HTML5 applications

40

Page 41: Mobile Web Apps and the Intel® XDK

What is Crosswalk

• New HTML5 runtime based on Google’s Blink and Chromium Content Module

• Optimized for Android

• Supports Tizen, Linux, Mac, and Windows

• Open source, BSD licensed. Started in September, 2013

• 6-week release cadence. Stable, Beta and Canary channels

• GitHub for code and reviews. JIRA for features and bugs. FreeNode for IRC.

41

Page 42: Mobile Web Apps and the Intel® XDK

Why do we need a new HTML5 Runtime?

• Deploying on Android is complex

• Multiple type of devices (low cost, high cost)

• Multiple versions of Android (sometimes very old)

• WebView very old, behavior different from one device to the other

• Google focus on the browser, need for a product tailored for app developers

• Based on Blink, the most competitive HTML5 engine

• Many other companies and communities have made the same conclusion and

moved to Blink

42

Page 43: Mobile Web Apps and the Intel® XDK

43

Crosswalk

Page 44: Mobile Web Apps and the Intel® XDK

Crosswalk Project Goals

44

• Enable latest, advanced web application features across all Android devices

• Based on W3C standards and landing zone for new draft APIs and Intel differentiation, such as SIMD and Presentation API

• Bring web applications to the next level, closer to native

• Easy adaptation for downstream projects

• Integrated with Cordova, Intel® XDK or even existing Android Java applications.

• Good co-operation with upstream projects

• Chromium, Blink, Skia, V8, Wayland

• Fully open source project – embraces participation

Page 45: Mobile Web Apps and the Intel® XDK

Crosswalk Architecture Goals

• Based on Blink and selected parts of Chromium

• Work with upstream to enable features we need

• Minimize the changes on Crosswalk Blink and Chromium

• Crosswalk rapid release cycle always updated with the latest Chromium

version.

• API extensions in separate repositories

• Cordova APIs, early or experimental W3C APIs

45

Page 46: Mobile Web Apps and the Intel® XDK

46

Page 47: Mobile Web Apps and the Intel® XDK

Features and APIs

Web Components (http://www.w3.org/TR/components-intro/)

Future of the web app design

Service Worker (http://www.w3.org/TR/service-workers/)

Closing the gap between the native and web applications

Responsive Design

Media queries (L4), @viewport (http://dev.w3.org/csswg/css-device-adapt/)

PIcture element, srcset attribute

Native Client

Portable version, pNaCl

Manifest (http://w3c.github.io/manifest/)

Standard manifest for web applications

W3C SysApps: Raw Sockets (http://www.w3.org/2012/sysapps/tcp-udp-sockets/)

W3C SysApps: Device Capabilities (http://www.w3.org/2012/sysapps/device-capabilities/)

W3C SysApps: App URI (http://www.w3.org/2012/sysapps/app-uri/)

47

Page 48: Mobile Web Apps and the Intel® XDK

Features and APIs (cont.)

W3C Promises API

W3C Resource Timing API (http://www.w3.org/TR/resource-timing/)

W3C User Timing API (http://www.w3.org/TR/user-timing/)

W3C Ambient Light API

W3C GamePad API

EcmaScript SIMD

W3C WebRTC

W3C WebGL, Canvas

W3C Web Animations

HTML5 input enhancements

context menu, pattern attribute, data list element, autocomplete

Beacon (http://www.w3.org/TR/beacon/)

Vehicle API (IVI)

DLNA API (IVI)48

Page 49: Mobile Web Apps and the Intel® XDK

49

Embedding Crosswalk in your Android app

3 easy steps:

1. Download Crosswalk

2. Package Crosswalk with your application using make_apk.py:

• Bundles Crosswalk runtime with your application

• Creates apk for both x86 and arm

3. Install

$ python make_apk.py --package=org.abc.myapp \

--manifest=myapp/manifest.json

$ adb install -r myapp_x86.apk

Page 50: Mobile Web Apps and the Intel® XDK

The Crosswalk Advantage

• Advanced web runtime and webview features available for legacy Android platforms

• Application consistency across all Android versions

• Extendable

• Full control over upgrade cycle

• Based on Blink and Chromium

• Latest innovations, strong performance

• Intel is driving innovation in Blink and Chromium, including reviewing and owning various areas of

the code base

• Wide community adoption

• Strong corporate backing

• Open source

50

Page 51: Mobile Web Apps and the Intel® XDK

Intel XDK IoT EditionInternet of Things

51

Page 52: Mobile Web Apps and the Intel® XDK

52

Things

Page 53: Mobile Web Apps and the Intel® XDK

53

Intel® XDK: IoT Edition

Page 54: Mobile Web Apps and the Intel® XDK

54

Intel® XDK: IoT Edition - Debugger

Page 55: Mobile Web Apps and the Intel® XDK

Summary: XDK IoT Edition

55

IoT App

Program device with Node.js

Remote debug in XDK

Wireless connection

http server

Socket server

Companion App

Full XDK Capability

Mobile Device IoT device

Wireless

Interact/Control IoT device with mobile

device

Page 56: Mobile Web Apps and the Intel® XDK

Trying it outGet the Intel XDK

56

Page 57: Mobile Web Apps and the Intel® XDK

Download the Intel®

XDK

57

xdk.intel.com

Experiment with the demo apps.

Visit the Intel booth (#400) for an in-

depth demo.

Page 58: Mobile Web Apps and the Intel® XDK

58

Download App Preview onto your Device

Android*

bit.ly/1i8VEgliOS*

bit.ly/1a3W7BkWindows* 8

bit.ly/1j8rxdJ

Page 59: Mobile Web Apps and the Intel® XDK

Intel® Developer Zone

• Free tools and code samples

• Technical articles, forums and tutorials

• Connect with Intel and industry experts

• Get development support

• Build relationships

Tools. Knowledge. Community.

software.intel.com

Page 60: Mobile Web Apps and the Intel® XDK

60

Legal DisclaimerINFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR

OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN INTEL'S TERMS AND

CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED

WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A

PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.

A "Mission Critical Application" is any application in which failure of the Intel Product could result, directly or indirectly, in personal injury or death. SHOULD YOU

PURCHASE OR USE INTEL'S PRODUCTS FOR ANY SUCH MISSION CRITICAL APPLICATION, YOU SHALL INDEMNIFY AND HOLD INTEL AND ITS

SUBSIDIARIES, SUBCONTRACTORS AND AFFILIATES, AND THE DIRECTORS, OFFICERS, AND EMPLOYEES OF EACH, HARMLESS AGAINST ALL

CLAIMS COSTS, DAMAGES, AND EXPENSES AND REASONABLE ATTORNEYS' FEES ARISING OUT OF, DIRECTLY OR INDIRECTLY, ANY CLAIM OF

PRODUCT LIABILITY, PERSONAL INJURY, OR DEATH ARISING IN ANY WAY OUT OF SUCH MISSION CRITICAL APPLICATION, WHETHER OR NOT

INTEL OR ITS SUBCONTRACTOR WAS NEGLIGENT IN THE DESIGN, MANUFACTURE, OR WARNING OF THE INTEL PRODUCT OR ANY OF ITS PARTS.

Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or characteristics of any

features or instructions marked "reserved" or "undefined". Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or

incompatibilities arising from future changes to them. The information here is subject to change without notice. Do not finalize a design with this information.

The products described in this document may contain design defects or errors known as errata which may cause the product to deviate from published

specifications. Current characterized errata are available on request.

Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order.

Copies of documents which have an order number and are referenced in this document, or other Intel literature, may be obtained by calling 1-800-548-4725, or go

to: http://www.intel.com/design/literature.htm

Intel, Look Inside and the Intel logo are trademarks of Intel Corporation in the United States and other countries.

*Other names and brands may be claimed as the property of others.

Copyright ©2014 Intel Corporation.

Page 61: Mobile Web Apps and the Intel® XDK

http://software.intel.com/html5Please visit the Intel booth (#400) to learn more about these solutions and to see the technology in action

61

Page 62: Mobile Web Apps and the Intel® XDK

Intel Confidential — Do Not Forward

Page 63: Mobile Web Apps and the Intel® XDK

Backup

63