introducing chrome apps (ogura)

16
Introducing Chrome Apps

Upload: kazuhiro-ogura

Post on 19-Jun-2015

835 views

Category:

Software


0 download

DESCRIPTION

Introducing Chrome Apps

TRANSCRIPT

Page 1: Introducing chrome apps (ogura)

IntroducingChrome Apps

Page 2: Introducing chrome apps (ogura)
Page 3: Introducing chrome apps (ogura)

Our customer needs a PC version!

Page 4: Introducing chrome apps (ogura)

Requirements:

"Port our iOS/Android app to Windows"

But market demand changes very fast!We should expect Macs, Chromebooks also in future.

"Just support Windows 7 and that's enough"

Page 5: Introducing chrome apps (ogura)

Our app to port from Android/iOS

● Native framework + webview○ Popular architecture for smartphone apps○ UIWebView (iOS), WebView (Android)

webview

Native Framework

Interact with event callbacks, JavaScript injections, etc.

Needed something like this, which works on a desktop client. Great if it works on multi-platform

OS service,Storage, etc.

Page 6: Introducing chrome apps (ogura)

Platforms we considered● Full-native● Full HTML5 on a browser● JavaFX● Native View + kind of a common backend● Chromium Embedded Framework● PhoneGap (Native WebView + common

backend)● Titanium● Chrome App

(formerly known as Chrome Packaged App)

Page 7: Introducing chrome apps (ogura)

● HTML + JavaScript (PNaCL, Dart also available)

● 90% normal HTML5 app○ Additional chrome.* APIs are loaded in JavaScript

namespace○ <webview> tag to have another browser in the app,

which runs in a separate context from its parent app● Launches its own window

○ Not within any browser's tab● Launcher is bundled with Chrome

○ The app runs on Windows/Mac/Linux/Chromebook

Chrome Appshttps://developer.chrome.com/apps/about_apps

Page 8: Introducing chrome apps (ogura)

● User Installs an app via Chrome Web Store

● Update happens automatically

● User launches the app when it's needed

Chrome Apps User Experience

Page 9: Introducing chrome apps (ogura)

So, looks great…!

● Works on multi-platform● Don't have to worry about how to

distribute/update● Programmer can use popular web

technology. No need to learn any new framework or language

● Has a webview

Page 11: Introducing chrome apps (ogura)

Not just for calculators!

Page 12: Introducing chrome apps (ogura)

● APIs same as chrome extensions○ Local storage, etc.

● Low-level system services○ USB ○ Serial○ Network Communications (raw TCP/UDP sockets)○ Bluetooth

Interesting Features

Page 14: Introducing chrome apps (ogura)

Problems I faced (1)

● No interface to access OS-level secure storage (like KeyChain)

● CSP (Content Security Policy)○ No eval, no inline scripting.○ AngularJS already has a csp-mode which doesn't

use evals● No easy way to interact with webview

○ Can inject JavaScript but access limited to the DOM tree only. No access to the page's namespace (can't use jQuery for example)

● No WebDriver yet○ Can't test it's automation… (still seeking how to do it,

help is welcomed!)

Page 15: Introducing chrome apps (ogura)

Problems I faced (2)

● Documents are not very much organized, and it's sometimes not accurate○ http://stackoverflow.

com/questions/25883534/chrome-apps-webview-find-method-is-undefined

● Not stable very much yet

…But it's improving!

Page 16: Introducing chrome apps (ogura)

(Coming next, may be)

● Chrome Apps WebView pitfalls● Testing Chrome Apps● Wrapping Chrome APIs as an AngularJS

service