Introducing chrome apps (ogura)
-
Author
kazuhiro-ogura -
Category
Software
-
view
828 -
download
0
Embed Size (px)
description
Transcript of Introducing chrome apps (ogura)
- 1. IntroducingChrome Apps
2. Our customer needs a PC version! 3. Requirements:"Port our iOS/Android app to Windows""Just support Windows 7 and that'senough"But market demand changes very fast!We should expect Macs, Chromebooks also infuture. 4. Our app to port from Android/iOS Native framework + webview Popular architecture for smartphone apps UIWebView (iOS), WebView (Android)NativeFrameworkwebviewOS service,Storage, etc.Interact with event callbacks,JavaScript injections, etc.Needed something like this, which works on adesktop client. Great if it works on multi-platform 5. Platforms we considered Full-native Full HTML5 on a browser JavaFX Native View + kind of a common backend Chromium Embedded Framework PhoneGap (Native WebView + commonbackend) Titanium Chrome App(formerly known as Chrome Packaged App) 6. Chrome Appshttps://developer.chrome.com/apps/about_apps HTML + JavaScript(PNaCL, Dart also available) 90% normal HTML5 app Additional chrome.* APIs are loaded in JavaScriptnamespace 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 7. Chrome Apps User Experience User Installs an app via Chrome Web Store Update happens automatically User launches the app when it's needed 8. So, looks great! Works on multi-platform Don't have to worry about how todistribute/update Programmer can use popular webtechnology. No need to learn any newframework or language Has a webview 9. Let's take a lookhttps://github.com/GoogleChrome/chrome-app-samples 10. Not just for calculators! 11. Interesting Features APIs same as chrome extensions Local storage, etc. Low-level system services USB Serial Network Communications (raw TCP/UDP sockets) Bluetooth 12. https://developer.chrome.com/apps/chrome_apps_on_mobile 13. Problems I faced (1) No interface to access OS-level securestorage (like KeyChain) CSP (Content Security Policy) No eval, no inline scripting. AngularJS already has a csp-mode which doesn'tuse evals No easy way to interact with webview Can inject JavaScript but access limited to the DOMtree only. No access to the page's namespace (can'tuse jQuery for example) No WebDriver yet Can't test it's automation (still seeking how to do it,help is welcomed!) 14. 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 yetBut it's improving! 15. (Coming next, may be) Chrome Apps WebView pitfalls Testing Chrome Apps Wrapping Chrome APIs as an AngularJSservice