SlideShare una empresa de Scribd logo
1 de 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);

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Destacado

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
 

Destacado (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
 

Similar a 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
 

Similar a 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
 

Más de 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
 

Más de 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
 

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Último (20)

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

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);

Notas del editor

  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?