new things about cordova 4.0

22
Cordova 4.0 Masa Tanaka

Upload: monaca

Post on 02-Jul-2015

1.143 views

Category:

Software


1 download

TRANSCRIPT

Page 1: New things about Cordova 4.0

Cordova 4.0

Masa Tanaka

Page 2: New things about Cordova 4.0

Who am I

Masa TanakaFounder & CEO, Monaca

Twitter: @massie

Page 3: New things about Cordova 4.0

● Browser platform support

● New WebViews

● Windows 8.1 support

What's new?

Page 4: New things about Cordova 4.0

● Browser platform support

● New WebViews

● Windows 8.1 support

What to cover

Page 5: New things about Cordova 4.0

What is a Cordova version, btw?

Page 6: New things about Cordova 4.0

Cordova versioning

Useful links:

Versioning and release strategy (Cordova-coho GitHub)Cordova/PhoneGap Version Confusion (Devgirl's Weblog)

4.1.2

Cordova CLI

4.1.2

cordova-lib

ios 3.7.0

android 3.6.4

browser 3.6.0

fireos 3.6.3

windows8 3.7.1

platforms plugins

device 0.2.12

camera 0.3.3

geolocation 0.3.10

statusbar 0.1.8

file 1.3.1

+

as of Nov.17, 2014

Page 7: New things about Cordova 4.0

Cordova versions

2.2.0 2.9.0

3.0.0 3.6.0

4.0.0 4.1.0

4.1.2

First CLI

New plugin structure

Platform pinning

Page 8: New things about Cordova 4.0

Browser platform

Page 9: New things about Cordova 4.0

New platform: browser

$ cordova platform add "browser"

$ cordova run browser

$ cordova build browser

Browser platform is more intended for the development purpose.

Page 10: New things about Cordova 4.0

Browser pluginsNot all plugins have supported the platform so far.

org.apache.cordova.camera

org.apache.cordova.device-motion

org.apache.cordova.device-orientation

org.apache.cordova.network-information

org.apache.cordova.device

Page 11: New things about Cordova 4.0

New WebViews

Page 12: New things about Cordova 4.0

WKWebView

● Starting from iOS 8.

● JavaScript with JIT runtime engine (Nitro).

● WebGL and IndexedDB support.

Page 13: New things about Cordova 4.0

More features

iOS 8 WKWebView

iOS 8 UIWebView

iOS 7 UIWebView

WebGL 3D Graphics ✓ ✓

IndexedDB ✓

HTML5 Coverage Score 440/555 427/555 410/555

Page 14: New things about Cordova 4.0

JavaScript benchmarks

iOS 8 WKWebView iOS 8 UIWebView iOS 7 UIWebView

SunSpider Benchmark 949.8ms

4249.6ms(About 4.5 times slower)

3659.5ms(About 4 times slower)

Octane Benchmark 2908Application crashed

during the testApplication crashed

during the test

ECMAScript 6 Compatibility

28/71 28/71 2/71

HTML5-Benchmark.com 4113

3277(About 20% Slower)

3377(About 20% Slower)

Page 15: New things about Cordova 4.0

WKWebView convertion

● Cache manifest does not work.

● CORS policy will be applied.

Page 16: New things about Cordova 4.0

Using WKWebView with Cordova$ cordova plugin add https://github.com/Telerik-Verified-Plugins/WKWebView

WKWebView

HTTP server

running locally

JavaScriptHTML5Native Layer

http://localhost:12344/

Page 17: New things about Cordova 4.0

Good news

Official platform support is ongoing.

https://github.com/apache/cordova-plugins

<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />

Page 18: New things about Cordova 4.0

What about Android?

Page 19: New things about Cordova 4.0

Crosswalk Project

● Chromium based WebView for Android.

● Requires Android 4.0+.

● Remote USB debugging support.

Page 20: New things about Cordova 4.0

Setup Crosswalk

See the document described here.

Page 21: New things about Cordova 4.0

Quicker way

Use Monaca, our Cordova development tool on the cloud. http://monaca.mobi/

Page 22: New things about Cordova 4.0

Thank You!