SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Windows 8 for Web Developers
The nextperience!
Cross competence...
...not cross platform.
Yes, you can use your favourite js library…
…but find out what the “integration story” is.
Anatomy of an HTML5 Metro app

HTML5
CSS
Javascript + client frameworks   HTML5

WinJS
WinRT
                                 WinJS

C# Libraries (Win8)
                                 WinRT
Demo

Basic solution
App package - appx


- Package (zip)
 - Folders and files
- Manifest              Host

                       AppContainer
- Application Folder
App package .appx
WinJS – A Windows JavaScript library


Controls with themed styling
Application model
Navigation
Utils & helpers
Promises                        WinJS



WinJS namespace
WinJS – JavaScript files



   <!-- WinJS JavaScript files -->
   <script src="//Microsoft.WinJS.0.6/js/base.js"></script>
   <script src="//Microsoft.WinJS.0.6/js/ui.js"></script>
WinJS - Controls

Controls are touch enabled and metro styled
ListView, grouping, Semantic Zoom


• “Contract” for grouping your data

• Semantic zoom adds to user experience
“ListView CRUD”


- Need to implement a “big” contract….

- …but you will be rewarded!
WinJS – Application model

  WinJS.UI.processAll();
  The Application object
  Life time management
  Queueing of events

                            WinJS
  Navigation
WinJS - processAll


   // Simplified..
   app.onactivated = function(e){
       ...
           WinJS.UI.processAll();
       ...
   };

   -----------

   // Equivalent to, for each node with data-win-control:
   var object = new WinJS.UI.SomeMetroControl(element, options););
The Application object


- var app = WinJS.Application;
  - Creating a placeholder for your application
    object
- Callbacks
  - onloaded, onactivated, onready
  - onunloaded, oncheckpoint
- Starting the app
  - app.start();
Queueing of events


- Encapsulation still important!
  - Eventing enables async integration of
    modules
- Simple interface
  - addEventListener(“eventName”, callback)
  - queueEvent(eventRecord)
  - removeEventListener(“eventName”, callback)
Demo

Application start
CSS
CSS3 Grid!
CSS Grid


- Web standard under construction
 - May change
- No longer “float hell”
 - “As easy as using tables”
- New unit: fragment (fr)
 - Uses “remaining part of page”
CSS Grid
CSS Grid

  #container {
    display: -ms-grid;
    -ms-grid-columns: 300px 1fr 300px;
    -ms-grid-rows: 100px 1fr 100px;
  }

  #header {
    -ms-grid-column: 1;
    -ms-grid-column-span: 3;
    -ms-grid-row: 1;
  }
WinJS - CSS

  ...

  @media   screen and (-ms-view-state: fullscreen-landscape)
  {}
  @media   screen and (-ms-view-state: snapped)
  {}
  @media   screen and (-ms-view-state: filled)
  {}
  @media   screen and (-ms-view-state: fullscreen-portrait)
  {}
WinJS – CSS

     <!-- WinJS style sheets--only include one. -->
     <link href="//Microsoft.WinJS.0.6/css/ui-dark.css"
         rel="stylesheet">
     <link href="//Microsoft.WinJS.0.6/css/ui-light.css"
         rel="stylesheet">

CODE!

All prefixed win
WinJS – Utils And helpers

  Promises
  xhr (AJAX)

  Namespaces
  Constructing objects
  Mixins
                            WinJS
WinJS – Promises - Async



  promise.then(completeHandler,
               errorHandler,
               progressHandler)
         .done()
WinJS – xhr



   WinJS.xhr({
       url: "http://www.example.org/somedata.json"
   }).then(function(response){
       updateDisplay(JSON.parse(response.responseText));
   })
   .done();
WinRT - Windows Runtime


• Recap (?)

• Windows Namespace

• (Accessing C# code possible)


                                 WinRT
Metro HTML5 Contexts - Security


- Local Context
  - Default, secure, cross-domain
                                    ms-wwa://




- Web Context
  - No WinRT            ms-wwa-     http:// and
                        web:///     https://
Metro HTML5 Contexts – Security, xhr
Demo

Feed reader
Our experience

Large templates

Need Blend

Wrapper classes, pros/cons

WinRT is written for C# and C++ too!
Advices

Encapsulation is still important. (No scopes in HTML) Use events.

Start to use Blend.

Learn the CSS Grid.

Put media queries in the bottom of a file.
Improvements..

Unit tests

Two-way data binding

No “larger app” architecture template/help

“Blend mode” debugging in VS === killer tool
Resources


Dev Center/msdn
Build/conference videos

blog.jayway.com
Thank you!
Bonus slides...
WinJS - Namespaces
WinJS – Utils, scoping
performance

a = 5;

(function(global, WinJS) {
    var q = WinJS.Utilities.query;

   WinJS.UI.processAll().then(function() {
       q(".output").forEach(function(e) {
           e.innerText = a;
       });
   });

})(window, WinJS);
WinJS – Utils



var MyThing = WinJS.Class.define(
    function(){   },
    {
        somethingUseful: function(){   }
    });
WinJS - Mixins

var MyControl = WinJS.Class.mix(
    function(element, options){
        this._domElement = element;
        // your code here..
    },
    WinJS.UI.DOMEventMixin,
    WinJS.Utilities
        .createEventProperties({swizzle: 0, spin: 0})
    );

var c = new MyControl(element);
c.onswizzle = function(){   }
c.addEventListener("spin", function(){   }, false);

Weitere ähnliche Inhalte

Was ist angesagt?

An Introduction to Vuejs
An Introduction to VuejsAn Introduction to Vuejs
An Introduction to VuejsPaddy Lock
 
System webpack-jspm
System webpack-jspmSystem webpack-jspm
System webpack-jspmJesse Warden
 
Story about module management with angular.js
Story about module management with angular.jsStory about module management with angular.js
Story about module management with angular.jsDavid Amend
 
Drupalcon 2021 - Nuxt.js for drupal developers
Drupalcon 2021 - Nuxt.js for drupal developersDrupalcon 2021 - Nuxt.js for drupal developers
Drupalcon 2021 - Nuxt.js for drupal developersnuppla
 
Vue 淺談前端建置工具
Vue 淺談前端建置工具Vue 淺談前端建置工具
Vue 淺談前端建置工具andyyou
 
JS & NodeJS - An Introduction
JS & NodeJS - An IntroductionJS & NodeJS - An Introduction
JS & NodeJS - An IntroductionNirvanic Labs
 
Vue js 大型專案架構
Vue js 大型專案架構Vue js 大型專案架構
Vue js 大型專案架構Hina Chen
 
On Demand Javascript - Scalecamp 2009
On Demand Javascript - Scalecamp 2009On Demand Javascript - Scalecamp 2009
On Demand Javascript - Scalecamp 2009Michael Mahemoff
 
Introduction to VueJS & Vuex
Introduction to VueJS & VuexIntroduction to VueJS & Vuex
Introduction to VueJS & VuexBernd Alter
 
Performance monitoring measurement angualrjs single page apps with phantomas
Performance monitoring measurement angualrjs single page apps with phantomasPerformance monitoring measurement angualrjs single page apps with phantomas
Performance monitoring measurement angualrjs single page apps with phantomasDavid Amend
 
Javascript ui for rest services
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest servicesIoan Eugen Stan
 
Docker Up and Running for Web Developers
Docker Up and Running for Web DevelopersDocker Up and Running for Web Developers
Docker Up and Running for Web DevelopersAmr Fawzy
 
Famo.us - New generation of HTML5 Web Application Framework
Famo.us - New generation of HTML5 Web Application FrameworkFamo.us - New generation of HTML5 Web Application Framework
Famo.us - New generation of HTML5 Web Application FrameworkHina Chen
 
Groovy Ecosystem - JFokus 2011 - Guillaume Laforge
Groovy Ecosystem - JFokus 2011 - Guillaume LaforgeGroovy Ecosystem - JFokus 2011 - Guillaume Laforge
Groovy Ecosystem - JFokus 2011 - Guillaume LaforgeGuillaume Laforge
 
第一次用 Vue.js 就愛上 [改]
第一次用 Vue.js 就愛上 [改]第一次用 Vue.js 就愛上 [改]
第一次用 Vue.js 就愛上 [改]Kuro Hsu
 

Was ist angesagt? (20)

Lecture: Webpack 4
Lecture: Webpack 4Lecture: Webpack 4
Lecture: Webpack 4
 
An Introduction to Vuejs
An Introduction to VuejsAn Introduction to Vuejs
An Introduction to Vuejs
 
System webpack-jspm
System webpack-jspmSystem webpack-jspm
System webpack-jspm
 
Story about module management with angular.js
Story about module management with angular.jsStory about module management with angular.js
Story about module management with angular.js
 
Drupalcon 2021 - Nuxt.js for drupal developers
Drupalcon 2021 - Nuxt.js for drupal developersDrupalcon 2021 - Nuxt.js for drupal developers
Drupalcon 2021 - Nuxt.js for drupal developers
 
Vue 淺談前端建置工具
Vue 淺談前端建置工具Vue 淺談前端建置工具
Vue 淺談前端建置工具
 
JS & NodeJS - An Introduction
JS & NodeJS - An IntroductionJS & NodeJS - An Introduction
JS & NodeJS - An Introduction
 
Vue js 大型專案架構
Vue js 大型專案架構Vue js 大型專案架構
Vue js 大型專案架構
 
On Demand Javascript - Scalecamp 2009
On Demand Javascript - Scalecamp 2009On Demand Javascript - Scalecamp 2009
On Demand Javascript - Scalecamp 2009
 
lecture5
lecture5lecture5
lecture5
 
Introduction to VueJS & Vuex
Introduction to VueJS & VuexIntroduction to VueJS & Vuex
Introduction to VueJS & Vuex
 
Performance monitoring measurement angualrjs single page apps with phantomas
Performance monitoring measurement angualrjs single page apps with phantomasPerformance monitoring measurement angualrjs single page apps with phantomas
Performance monitoring measurement angualrjs single page apps with phantomas
 
Javascript ui for rest services
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest services
 
Vuex
VuexVuex
Vuex
 
Lesson 09
Lesson 09Lesson 09
Lesson 09
 
Docker Up and Running for Web Developers
Docker Up and Running for Web DevelopersDocker Up and Running for Web Developers
Docker Up and Running for Web Developers
 
Famo.us - New generation of HTML5 Web Application Framework
Famo.us - New generation of HTML5 Web Application FrameworkFamo.us - New generation of HTML5 Web Application Framework
Famo.us - New generation of HTML5 Web Application Framework
 
Groovy Ecosystem - JFokus 2011 - Guillaume Laforge
Groovy Ecosystem - JFokus 2011 - Guillaume LaforgeGroovy Ecosystem - JFokus 2011 - Guillaume Laforge
Groovy Ecosystem - JFokus 2011 - Guillaume Laforge
 
第一次用 Vue.js 就愛上 [改]
第一次用 Vue.js 就愛上 [改]第一次用 Vue.js 就愛上 [改]
第一次用 Vue.js 就愛上 [改]
 
An Intro into webpack
An Intro into webpackAn Intro into webpack
An Intro into webpack
 

Andere mochten auch

My slideshow
My slideshowMy slideshow
My slideshowNinaK86
 
HTML Hypermedia APIs and Adaptive Web Design - reject.js
HTML Hypermedia APIs and Adaptive Web Design -  reject.js HTML Hypermedia APIs and Adaptive Web Design -  reject.js
HTML Hypermedia APIs and Adaptive Web Design - reject.js Gustaf Nilsson Kotte
 
HTML Hypermedia APIs and Adaptive Web Design - jDays 2013
HTML Hypermedia APIs and Adaptive Web Design - jDays 2013HTML Hypermedia APIs and Adaptive Web Design - jDays 2013
HTML Hypermedia APIs and Adaptive Web Design - jDays 2013Gustaf Nilsson Kotte
 
Surviving the Zombie Apocalpyse of Connected Devices
Surviving the Zombie Apocalpyse of Connected DevicesSurviving the Zombie Apocalpyse of Connected Devices
Surviving the Zombie Apocalpyse of Connected DevicesGustaf Nilsson Kotte
 
HTML Hypermedia APIs and Adaptive Web Design - RuPy
HTML Hypermedia APIs and Adaptive Web Design - RuPyHTML Hypermedia APIs and Adaptive Web Design - RuPy
HTML Hypermedia APIs and Adaptive Web Design - RuPyGustaf Nilsson Kotte
 

Andere mochten auch (7)

My slideshow
My slideshowMy slideshow
My slideshow
 
HTML Hypermedia APIs and Adaptive Web Design - reject.js
HTML Hypermedia APIs and Adaptive Web Design -  reject.js HTML Hypermedia APIs and Adaptive Web Design -  reject.js
HTML Hypermedia APIs and Adaptive Web Design - reject.js
 
HTML Hypermedia APIs and Adaptive Web Design - jDays 2013
HTML Hypermedia APIs and Adaptive Web Design - jDays 2013HTML Hypermedia APIs and Adaptive Web Design - jDays 2013
HTML Hypermedia APIs and Adaptive Web Design - jDays 2013
 
Design Hypermedia APIs
Design Hypermedia APIsDesign Hypermedia APIs
Design Hypermedia APIs
 
Prototyping
PrototypingPrototyping
Prototyping
 
Surviving the Zombie Apocalpyse of Connected Devices
Surviving the Zombie Apocalpyse of Connected DevicesSurviving the Zombie Apocalpyse of Connected Devices
Surviving the Zombie Apocalpyse of Connected Devices
 
HTML Hypermedia APIs and Adaptive Web Design - RuPy
HTML Hypermedia APIs and Adaptive Web Design - RuPyHTML Hypermedia APIs and Adaptive Web Design - RuPy
HTML Hypermedia APIs and Adaptive Web Design - RuPy
 

Ähnlich wie Windows 8 for Web Developers

Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript AppsBusy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript AppsJAX London
 
Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web ApplicationYakov Fain
 
Devon 2011-f-1 반응형 웹 디자인
Devon 2011-f-1  반응형 웹 디자인Devon 2011-f-1  반응형 웹 디자인
Devon 2011-f-1 반응형 웹 디자인Daum DNA
 
Serverless 프레임워크로 Nuxt 앱 배포하기
Serverless 프레임워크로 Nuxt 앱 배포하기Serverless 프레임워크로 Nuxt 앱 배포하기
Serverless 프레임워크로 Nuxt 앱 배포하기Changwan Jun
 
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitJava Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitIMC Institute
 
Going Offline with JS
Going Offline with JSGoing Offline with JS
Going Offline with JSbrendankowitz
 
Build tons of multi-device JavaScript applications - Part 1 : Boilerplate, de...
Build tons of multi-device JavaScript applications - Part 1 : Boilerplate, de...Build tons of multi-device JavaScript applications - Part 1 : Boilerplate, de...
Build tons of multi-device JavaScript applications - Part 1 : Boilerplate, de...Skilld
 
WinJS at NYC Code Camp 2012
WinJS at NYC Code Camp 2012WinJS at NYC Code Camp 2012
WinJS at NYC Code Camp 2012Dmitri Artamonov
 
JAX London 2015: Java vs Nodejs
JAX London 2015: Java vs NodejsJAX London 2015: Java vs Nodejs
JAX London 2015: Java vs NodejsChris Bailey
 
Web-Technologies 26.06.2003
Web-Technologies 26.06.2003Web-Technologies 26.06.2003
Web-Technologies 26.06.2003Wolfgang Wiese
 
Java vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris BaileyJava vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris BaileyJAXLondon_Conference
 
Windows8 metro presentationupdated
Windows8 metro presentationupdatedWindows8 metro presentationupdated
Windows8 metro presentationupdatedDhananjay Kumar
 
Web Apps and more
Web Apps and moreWeb Apps and more
Web Apps and moreYan Shi
 
Web app and more
Web app and moreWeb app and more
Web app and morefaming su
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWAREFIWARE
 
openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010Patrick Lauke
 
IBM InterConnect: Java vs JavaScript for Enterprise WebApps
IBM InterConnect: Java vs JavaScript for Enterprise WebAppsIBM InterConnect: Java vs JavaScript for Enterprise WebApps
IBM InterConnect: Java vs JavaScript for Enterprise WebAppsChris Bailey
 

Ähnlich wie Windows 8 for Web Developers (20)

Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript AppsBusy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
 
Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web Application
 
Devon 2011-f-1 반응형 웹 디자인
Devon 2011-f-1  반응형 웹 디자인Devon 2011-f-1  반응형 웹 디자인
Devon 2011-f-1 반응형 웹 디자인
 
Serverless 프레임워크로 Nuxt 앱 배포하기
Serverless 프레임워크로 Nuxt 앱 배포하기Serverless 프레임워크로 Nuxt 앱 배포하기
Serverless 프레임워크로 Nuxt 앱 배포하기
 
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitJava Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
 
Going Offline with JS
Going Offline with JSGoing Offline with JS
Going Offline with JS
 
Google Web Toolkit
Google Web ToolkitGoogle Web Toolkit
Google Web Toolkit
 
Jsf2 html5-jazoon
Jsf2 html5-jazoonJsf2 html5-jazoon
Jsf2 html5-jazoon
 
Build tons of multi-device JavaScript applications - Part 1 : Boilerplate, de...
Build tons of multi-device JavaScript applications - Part 1 : Boilerplate, de...Build tons of multi-device JavaScript applications - Part 1 : Boilerplate, de...
Build tons of multi-device JavaScript applications - Part 1 : Boilerplate, de...
 
WinJS at NYC Code Camp 2012
WinJS at NYC Code Camp 2012WinJS at NYC Code Camp 2012
WinJS at NYC Code Camp 2012
 
JAX London 2015: Java vs Nodejs
JAX London 2015: Java vs NodejsJAX London 2015: Java vs Nodejs
JAX London 2015: Java vs Nodejs
 
Web-Technologies 26.06.2003
Web-Technologies 26.06.2003Web-Technologies 26.06.2003
Web-Technologies 26.06.2003
 
Java vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris BaileyJava vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris Bailey
 
Sanjeev ghai 12
Sanjeev ghai 12Sanjeev ghai 12
Sanjeev ghai 12
 
Windows8 metro presentationupdated
Windows8 metro presentationupdatedWindows8 metro presentationupdated
Windows8 metro presentationupdated
 
Web Apps and more
Web Apps and moreWeb Apps and more
Web Apps and more
 
Web app and more
Web app and moreWeb app and more
Web app and more
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWARE
 
openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010
 
IBM InterConnect: Java vs JavaScript for Enterprise WebApps
IBM InterConnect: Java vs JavaScript for Enterprise WebAppsIBM InterConnect: Java vs JavaScript for Enterprise WebApps
IBM InterConnect: Java vs JavaScript for Enterprise WebApps
 

Mehr von Gustaf Nilsson Kotte

Microservice Websites – Øredev 2017
Microservice Websites – Øredev 2017Microservice Websites – Øredev 2017
Microservice Websites – Øredev 2017Gustaf Nilsson Kotte
 
Microservice Websites – Micro CPH
Microservice Websites – Micro CPHMicroservice Websites – Micro CPH
Microservice Websites – Micro CPHGustaf Nilsson Kotte
 
Microservice Websites (microXchg 2017)
Microservice Websites (microXchg 2017)Microservice Websites (microXchg 2017)
Microservice Websites (microXchg 2017)Gustaf Nilsson Kotte
 
Simpler Web Architectures Now! (At The Frontend 2016)
Simpler Web Architectures Now! (At The Frontend 2016)Simpler Web Architectures Now! (At The Frontend 2016)
Simpler Web Architectures Now! (At The Frontend 2016)Gustaf Nilsson Kotte
 
A Simpler Web App Architecture (jDays 2016)
A Simpler Web App Architecture (jDays 2016)A Simpler Web App Architecture (jDays 2016)
A Simpler Web App Architecture (jDays 2016)Gustaf Nilsson Kotte
 
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIsHTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIsGustaf Nilsson Kotte
 
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013Gustaf Nilsson Kotte
 

Mehr von Gustaf Nilsson Kotte (8)

Microservice Websites – Øredev 2017
Microservice Websites – Øredev 2017Microservice Websites – Øredev 2017
Microservice Websites – Øredev 2017
 
Microservice Websites – Micro CPH
Microservice Websites – Micro CPHMicroservice Websites – Micro CPH
Microservice Websites – Micro CPH
 
Microservice Websites (microXchg 2017)
Microservice Websites (microXchg 2017)Microservice Websites (microXchg 2017)
Microservice Websites (microXchg 2017)
 
Simpler Web Architectures Now! (At The Frontend 2016)
Simpler Web Architectures Now! (At The Frontend 2016)Simpler Web Architectures Now! (At The Frontend 2016)
Simpler Web Architectures Now! (At The Frontend 2016)
 
A Simpler Web App Architecture (jDays 2016)
A Simpler Web App Architecture (jDays 2016)A Simpler Web App Architecture (jDays 2016)
A Simpler Web App Architecture (jDays 2016)
 
Jayway Web Tech Radar 2015
Jayway Web Tech Radar 2015Jayway Web Tech Radar 2015
Jayway Web Tech Radar 2015
 
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIsHTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
 
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
 

Kürzlich hochgeladen

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 

Kürzlich hochgeladen (20)

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 

Windows 8 for Web Developers

  • 1. Windows 8 for Web Developers
  • 4. Yes, you can use your favourite js library… …but find out what the “integration story” is.
  • 5. Anatomy of an HTML5 Metro app HTML5 CSS Javascript + client frameworks HTML5 WinJS WinRT WinJS C# Libraries (Win8) WinRT
  • 7. App package - appx - Package (zip) - Folders and files - Manifest Host AppContainer - Application Folder
  • 9. WinJS – A Windows JavaScript library Controls with themed styling Application model Navigation Utils & helpers Promises WinJS WinJS namespace
  • 10. WinJS – JavaScript files <!-- WinJS JavaScript files --> <script src="//Microsoft.WinJS.0.6/js/base.js"></script> <script src="//Microsoft.WinJS.0.6/js/ui.js"></script>
  • 11. WinJS - Controls Controls are touch enabled and metro styled
  • 12. ListView, grouping, Semantic Zoom • “Contract” for grouping your data • Semantic zoom adds to user experience
  • 13. “ListView CRUD” - Need to implement a “big” contract…. - …but you will be rewarded!
  • 14. WinJS – Application model WinJS.UI.processAll(); The Application object Life time management Queueing of events WinJS Navigation
  • 15. WinJS - processAll // Simplified.. app.onactivated = function(e){ ... WinJS.UI.processAll(); ... }; ----------- // Equivalent to, for each node with data-win-control: var object = new WinJS.UI.SomeMetroControl(element, options););
  • 16. The Application object - var app = WinJS.Application; - Creating a placeholder for your application object - Callbacks - onloaded, onactivated, onready - onunloaded, oncheckpoint - Starting the app - app.start();
  • 17. Queueing of events - Encapsulation still important! - Eventing enables async integration of modules - Simple interface - addEventListener(“eventName”, callback) - queueEvent(eventRecord) - removeEventListener(“eventName”, callback)
  • 19. CSS
  • 21. CSS Grid - Web standard under construction - May change - No longer “float hell” - “As easy as using tables” - New unit: fragment (fr) - Uses “remaining part of page”
  • 23. CSS Grid #container { display: -ms-grid; -ms-grid-columns: 300px 1fr 300px; -ms-grid-rows: 100px 1fr 100px; } #header { -ms-grid-column: 1; -ms-grid-column-span: 3; -ms-grid-row: 1; }
  • 24. WinJS - CSS ... @media screen and (-ms-view-state: fullscreen-landscape) {} @media screen and (-ms-view-state: snapped) {} @media screen and (-ms-view-state: filled) {} @media screen and (-ms-view-state: fullscreen-portrait) {}
  • 25. WinJS – CSS <!-- WinJS style sheets--only include one. --> <link href="//Microsoft.WinJS.0.6/css/ui-dark.css" rel="stylesheet"> <link href="//Microsoft.WinJS.0.6/css/ui-light.css" rel="stylesheet"> CODE! All prefixed win
  • 26. WinJS – Utils And helpers Promises xhr (AJAX) Namespaces Constructing objects Mixins WinJS
  • 27. WinJS – Promises - Async promise.then(completeHandler, errorHandler, progressHandler) .done()
  • 28. WinJS – xhr WinJS.xhr({ url: "http://www.example.org/somedata.json" }).then(function(response){ updateDisplay(JSON.parse(response.responseText)); }) .done();
  • 29. WinRT - Windows Runtime • Recap (?) • Windows Namespace • (Accessing C# code possible) WinRT
  • 30. Metro HTML5 Contexts - Security - Local Context - Default, secure, cross-domain ms-wwa:// - Web Context - No WinRT ms-wwa- http:// and web:/// https://
  • 31. Metro HTML5 Contexts – Security, xhr
  • 33. Our experience Large templates Need Blend Wrapper classes, pros/cons WinRT is written for C# and C++ too!
  • 34. Advices Encapsulation is still important. (No scopes in HTML) Use events. Start to use Blend. Learn the CSS Grid. Put media queries in the bottom of a file.
  • 35. Improvements.. Unit tests Two-way data binding No “larger app” architecture template/help “Blend mode” debugging in VS === killer tool
  • 38.
  • 41. WinJS – Utils, scoping performance a = 5; (function(global, WinJS) { var q = WinJS.Utilities.query; WinJS.UI.processAll().then(function() { q(".output").forEach(function(e) { e.innerText = a; }); }); })(window, WinJS);
  • 42. WinJS – Utils var MyThing = WinJS.Class.define( function(){ }, { somethingUseful: function(){ } });
  • 43. WinJS - Mixins var MyControl = WinJS.Class.mix( function(element, options){ this._domElement = element; // your code here.. }, WinJS.UI.DOMEventMixin, WinJS.Utilities .createEventProperties({swizzle: 0, spin: 0}) ); var c = new MyControl(element); c.onswizzle = function(){ } c.addEventListener("spin", function(){ }, false);

Hinweis der Redaktion

  1. Visa vilka templates som finnsVisa ”Fake references”
  2. “Zooma UT!” (till A,B,C..)
  3. “Kontroller, utilsoch lifecycle-ramverk”
  4. Målet från Microsoft verkar vara att man bara ska behöva anropa processAll() precis i början av sin applikation.
  5. NOTE: Varför används inte onready som default?
  6. NOTE: Varför används inte onready som default?NOTE:Är capture som ”anti bubbling”?
  7. ”From div to control”, WinJS.UI.processAll(); Inklusive DOM Explorer och JavaScript console
  8. ”Så, här står vi nu med en blank solution.. Hur ska vi börja tänka kring design och layout?”HTML5 är designat för att enkelt kunna göra applikationer (!) för webben. CSS3 är exakt samma sak, fast för layout och design.
  9. NOTE: Heter dom likadant? Nej! Byt och berätta om application-klassen!!!
  10. “Alltpåslidenärviktigt”Detgår med fördelattnästla grids.NOTE: När man säger “dettaelementetskavara I kolumn #1”, hur vet renderarenvilken grid man menar?!?
  11. Skriv inget under sista media queryn!
  12. “Så,dåhar vi litekollpå layout och design I vårnya metro app. Nu skabaraappengöranågotvettigtockså… ”  JavaScript
  13. Always call “done” as the last promise method in your promise chain! Otherwise, if you forget to provide an errorHandler, the error will be very silent.
  14. Nämn att man kommunicerar mellan kontexterna med HTML5 PostMessage!
  15. När ”frågan” kommer...
  16. NOTE: Uppdatera den här?
  17. Vad är den första parametern?