Timmy Kokke
“JavaScript is unsuitable for building apps!” random C# developer
about • Timmy Kokke • Windows Platform Development MVP • Consultant @ Centric • ASP.NET MVC / Xamarin • Store Apps Usergroup http://storeappsug.nl • http://WinJS.Ninja • http://timmykokke.com • @sorskoot • http://Youtube.com/c/WinJsNinja
agenda • Intro • Hosted web apps • WinJS • Knockout JS • AngularJS
Intro
Why ‘web’ technology? • Great support in Microsoft Edge • Many frameworks available • Access toWindows Runtime • Visual Studio Support • TypeScript • No cross-browser • No legacy
Why not? • No designer… anymore… • Cross-platform • Specific requirements • Learning curve • Documentation
Edge features • WebGL • WebAudio API • New tags • <Picture> • <template> • Webdriver • Console API • Content Security Policy (CSP) • … Much more http://status.modern.ie
Edge - JavaScript • Template strings • Promises • Arrow functions • Block bindings • Get/set • Symbols • Spread • Iterators • Class • Proxies • … again much more http://status.modern.ie
ES6 support IE 10 IE 11 Edge 12 FF 38 Edge 13 FF 42 FF 43 FF 44 CH 46 OP 33 CH 47 OP 34 CH 48 OP 35 SF 6.1 SF 7 SF 7.1 SF 8 SF 9 WK KQ 4.14 7% 16% 63% 84% 66% 71% 72% 74% 63% 63% 65% 12% 21% 54% 71% 13% Desktop Browsers https://kangax.github.io/compat-table/es6/
EdgeHTML Chakra
Where? • Desktop + PC • IoT • Surface Hub • HoloLens • Phone • Xbox
Tips •ThinkWeb •UseWindows Runtime Component •Use debugger for exploration •Minification for Obfuscation
JavaScript Frameworks
JavaScript Frameworks 0 20 40 60 80 100 120 2008 2008 2008 2008 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2011 2011 2011 2011 2011 2011 2011 2011 2011 2011 2012 2012 2012 2012 2012 2012 2012 2012 2012 2012 2012 2013 2013 2013 2013 2013 2013 2013 2013 2013 2013 2014 2014 2014 2014 2014 2014 2014 2014 2014 2014 2014 2015 2015 2015 2015 2015 2015 2015 2015 AngularJS Dojo Backbone knockout Reactjs
JavaScript Frameworks • Use whatever you like • Don’t use CDN for packaged apps • MSApp.execUnsafeLocalFunction
HostedWeb apps
Developers want… just run just work
Hosted web apps. • Perfect for existing web apps • Package app without content • Configure allowed URLs • Mix’n’Match • Reviews from MS during lifetime of app • Not allowed to change during lifetime
all https://*.websites.net/ allowForWebOnly https://*.website.net/ none http://ads.website.net/ Manifest
Manifold.js • Cross-plaform Package • Fallback to Apache Cordova • More at http://manifoldjs.com/documentation
Demo HostedWeb Apps
WinJS
“WinJS is a set of JavaScript toolkits that allow developers to build applications using HTML/JS/CSS technology”
WinJS features
How does it work?
How does it work?
How does it work?
How does it work?
How does it work?
How does it work?
How does it work?
How does it work?
What more? • Classes WinJS.NameSpace WinJS.Class • Promises WinJS.Promise • Databinding • Pages • Converters
Demo WinJS
WinJS + Knockout JS
“Simplify dynamic JavaScript UIs with the Model-View-View Model (MVVM) pattern”
Initialization
Initialization
Bindings
Observable
Computed
Custom bindings
Custom bindings
Knockout-WinJS
Knockout-WinJS
Demo WinJS + Knockout
WinJS + AngularJS
Overview Module Route $ScopeView Controller ServiceDirective Config
Module • ng-app doesn’t work withWinJS • After activation:
Controller
View
Service
Directive
Config
Angular-WinJS
Angular-WinJS
Navigation
Demo WinJS + Angular
Not discussed • Visual Studio tools for Apache Cordova • Anything else?
Blog: http://timmykokke.com http://winjs.ninja Twitter: @sorskoot YouTube: http://youtube.com/c/winjsninja Github: http://github.com/sorskoot Store apps user group: http://storeappsug.nl
Thank you!

JavaScript in Universal Windows Platform apps

Editor's Notes

  • #7 Koploper ES6 implementatie WinJS - Angular – Meteor – Knockout – React – Twitter bootstrap Wel toegang to volledige WinRT API – Voicecommands, Bluetooth, Notifications, MIDI Great VS support ! Eventueel TypeScript Geen gedoe met Chrome of FF Geen legacy… Geen gedoe met support voor 20 jaar oude browsers…
  • #25 Windows Library for JavaScript.