SlideShare a Scribd company logo
1 of 75
Download to read offline
Building native
Windows 8 apps
using YUI 3
@tilomitra // YUI Engineer
About this talk
About this talk

 • A bit about Windows 8 and IE10
About this talk

 • A bit about Windows 8 and IE10
 • WinJS
About this talk

 • A bit about Windows 8 and IE10
 • WinJS
 • WinJS + YUI (with Demo)
About this talk

 • A bit about Windows 8 and IE10
 • WinJS
 • WinJS + YUI (with Demo)
 • Questions & Discussion
Not really focussing on...

• In-app purchases
• Packaging and submission process
• Visual Studio (I’m a VS n00b)
Apps. Opportunity.
Apps. Opportunity.
YUI 3.7.3
 We gave ourselves 10 days (which included
 weekends) to get the job done…We were able to
 add support for all these new environments
 very quickly because of YUI’s architecture.

                                       -Eric F.
Windows 8
Win8 vs WinRT
        Can run traditional Windows apps and the
Win8    new Metro apps


        “Windows 8 Lite” designed primarily for
        tablets such as the Surface.
WinRT
        Can only run Metro apps
4 different JS runtimes

• IE10 Desktop
• IE10 Start Screen (Metro)
• Webview inside a C# app
• WinJS
IE10 “Metro”

     • More restrictive than IE10 Desktop
     • Minimal support for plugins (ActiveX,
           Flash, Silverlight, etc.)*

* Metro IE10 does have Flash support but only sites that are on the Compatibility List can play Flash content.
IE10 “Metro”

     • More restrictive than IE10 Desktop
     • Minimal support for plugins (ActiveX,
           Flash, Silverlight, etc.)*

* Metro IE10 does have Flash support but only sites that are on the Compatibility List can play Flash content.
Webview
                    	
  	
  	
  	
  

<WebView Name="wv" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
Source="http://yuilibrary.com"/>




   • Similar to web-views on iOS or Android
   • No access to device APIs, limited
       HTML5 support
WinJS
WinJS
• A restricted IE10 runtime with access to
  native APIs
• Allows developers to create WinRT apps
  using HTML/CSS/JS
• All scripts/styles must be available on device
WinJS
• A restricted IE10 runtime with access to
  native APIs
• Allows developers to create WinRT apps
  using HTML/CSS/JS
• All scripts/styles must be available on device
WinJS
What’s different about it?
Overview
Overview

• Uses IE10 to process HTML/CSS/JS
Overview

• Uses IE10 to process HTML/CSS/JS
• Stylesheets and scripts bundled locally
Overview

• Uses IE10 to process HTML/CSS/JS
• Stylesheets and scripts bundled locally
• No JSONP, safe innerHTML
Overview

• Uses IE10 to process HTML/CSS/JS
• Stylesheets and scripts bundled locally
• No JSONP, safe innerHTML
• Access to Windows and WinJS
  namespaces
Injecting HTML

myDiv.innerHTML	
  =	
  ‘<script>function	
  test()	
  {	
  alert("Testing,	
  Testing,	
  
123...");	
  }</script><span	
  onclick="test()">Click	
  Me</span>’

//results	
  in	
  <span>Click	
  me</span>

    List of all filtered elements
A WinJS App
                                      WinJS References


                                            ui.css

              default.html

                                           base.js



                                            ui.js
 default.js             default.css


                                         navigator.js
A WinJS App
                                                       WinJS References
                 Basic Shell
                                       Native styles         ui.css

               default.html

                                        JS Utilities        base.js



                                         UI Views            ui.js
  default.js             default.css


                                        Navigation        navigator.js
App Lifecycle               Media
   Code                    queries
Adding Pages
                        Master View       Detail View


   default.html        masterview.html   detailview.html


WinJS References
                       masterview.css    detailview.css

Other scripts/styles

                        masterview.js     detailview.js
Pages adopt MVC
Each “page” of the app has has it’s own
HTML, CSS, and JS

    View       Defined by page.html and page.css

  Controller          Defined by page.js

                  Defined in default.html and
    Model
                     available in all pages
default.html
                 default.html
                                         <div	
  i
                                         contro
                                         igator
               homepage.html             	
  	
  	
  	
  da
                 homepage.css            pages/
                  homepage.js            </div>




   A “wrapper” around different pages.
default.html
   default.html
                        <div	
  id="contenthost"	
  data-­‐win-­‐
                        control="Application.PageControlNav
                        igator"
  homepage.html         	
  	
  	
  	
  data-­‐win-­‐options="{home:	
  '/
    homepage.css        pages/homepage/homepage'}">
     homepage.js        </div>




     A “wrapper” around different pages.
default.js: Lifecycle events
   activated   When the app is launched.

               After DOMContentLoaded (HTML parsed, resources
    loaded
               not loaded)


    ready      When the app ready for use


               When the user switches away from your app. Good
  checkpoint
               time to save state.


    unload     When app is about to be unloaded
Navigation
   default.html                      default.html




 masterView.html                   detailView.html




   Single page navigation model provided by
 navigator.js through WinJS.Navigation.navigate(...)
Navigation
   default.html




 masterView.html                detailView.html




  This is what happens if you use <a   href=”...”>
Navigation                            Where am I?
                                       Who am i?
                               What is the meaning of life?


   default.html




 masterView.html                  detailView.html




  This is what happens if you use <a    href=”...”>
Navigation
  groupedMaster.js


WinJS.Navigation.navigate("/pages/itemDetail/itemDetail.html",	
  {	
  model:	
  
model});

//the	
  passed	
  object	
  can	
  be	
  retrieved	
  in	
  itemDetail.js




             Use WinJS.Navigation.navigate()
                 instead of location.href
WinJS + YUI
Leveraging YUI to build Win 8 apps
It’s all about reusing code

 • Re-use your existing web code-base
   when making Win 8 apps

 • Use existing concepts - don’t re-invent
   the wheel

 • But what about UI/UX?
Y.Sights.GridView
Y.Sights.GridView




Y.Sights.ShotList
Y.Sights.GridView




Y.Sights.Shot




                Y.Sights.ShotList
Y.Masonry
Y.Sights.GridView
Y.Sights.GridView




Y.Sights.ShotList
Y.Sights.GridView




Y.Sights.Shot




            Y.Sights.ShotList
Y.DetailView
demo
Including YUI
• Pull down necessary modules using the
  Dependency Configurator
• Clone YUI and include build/ and src/
• Clone YUI and include build/
Including YUI
• Pull down necessary modules using the
  Configurator
• Clone YUI and include build/ and src/
• Clone YUI and include build/
Including YUI
       default.html
                            	
  	
  	
  	
  
	
  	
  	
  
	
  	
  	
  <!-­‐-­‐	
  WinJS	
  references	
  -­‐-­‐>
	
  	
  	
  <link	
  href="//Microsoft.WinJS.1.0.RC/css/ui-­‐dark.css"	
  rel="stylesheet"	
  />
	
  	
  	
  <script	
  src="//Microsoft.WinJS.1.0.RC/js/base.js"></script>
	
  	
  	
  <script	
  src="//Microsoft.WinJS.1.0.RC/js/ui.js"></script>	
  
	
  	
  	
  <script>
	
  	
  	
  	
  	
  	
  YUI_config	
  =	
  {
	
  	
  	
  	
  	
  	
  	
  	
  	
  ...
	
  	
  	
  	
  	
  	
  };
	
  	
  	
  </script>
	
  	
  	
  <script	
  src="/js/lib/yui3/build/yui/yui-­‐min.js"></script>
Let’s re-visit MVC

     MVC, you say?
     Reminds me of the YUI App Framework.
Let’s re-visit MVC

   Model      Defined by Y.Model/Y.ModelList

   View             Defined by Y.View

 Controller        Defined by {page}.js
Models

• Should be environment agnostic
• Y.Model/Y.ModelList + Y.YQL
• Work on the browser and on WinJS
Views



  Should we use native WinJS UI Views, or
             leverage Y.View?
Native Views
 Easy to get it to look “right”

 It’s the WinJS way (documentation, code samples, etc.)

 Code can’t be re-used outside this environment
 Need to figure out how to organize native code and
 YUI code
 No performance gain for using native views
Y.View
Code once, re-use in different environments

Works well with YUI

Achieving the look and feel of Win 8 is fairly easy

Need to code and determine markup and styles
Native Views vs.
Y.View
• Depends on the app
• Over the long term, Y.View probably
  offers greater benefits

• Try using both and see what you are
  comfortable with
Controllers

• Haven’t experimented with Y.Router in
  this environment yet

• Page navigation done through
  WinJS.Navigation.navigate(...)

• Navigation history maintained by
  navigator.js
UI/UX

 Won’t user experience suffer if we
 don’t use native APIs?
UI/UX
• Everything is HTML, CSS, and JS, whether it’s
  native or not.
• CSS3 transitions are supported
• Easy to leverage ui-*.css styles to get the
  right look and feel
• Remember, Win 8 UI !== Web UI
Debugging WinJS
apps
• Breakpoints and JavaScript console for
  standard debugging

• Windows Simulator
• View the DOM while the app is running
  with the DOM Explorer
Thanks!
Questions or comments? Fire away.

@tilomitra
http://github.com/tilomitra/Sights

More Related Content

What's hot

An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.jsPagepro
 
Accessibility - A feature you can build
Accessibility - A feature you can buildAccessibility - A feature you can build
Accessibility - A feature you can buildMonika Piotrowicz
 
JClouds at San Francisco Java User Group
JClouds at San Francisco Java User GroupJClouds at San Francisco Java User Group
JClouds at San Francisco Java User GroupMarakana Inc.
 
Contextual jQuery
Contextual jQueryContextual jQuery
Contextual jQueryDoug Neiner
 
jQuery Comes to XPages
jQuery Comes to XPagesjQuery Comes to XPages
jQuery Comes to XPagesTeamstudio
 
jQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterprisejQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterpriseDave Artz
 
Vue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.jsVue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.jsTakuya Tejima
 
Dynamic User Interfaces for Desktop and Mobile
Dynamic User Interfaces for Desktop and MobileDynamic User Interfaces for Desktop and Mobile
Dynamic User Interfaces for Desktop and Mobilepeychevi
 
Real World Web components
Real World Web componentsReal World Web components
Real World Web componentsJarrod Overson
 
The Point of Vue - Intro to Vue.js
The Point of Vue - Intro to Vue.jsThe Point of Vue - Intro to Vue.js
The Point of Vue - Intro to Vue.jsHolly Schinsky
 
Doctype html public
Doctype html publicDoctype html public
Doctype html publicEddy_TKJ
 
Vue.js Getting Started
Vue.js Getting StartedVue.js Getting Started
Vue.js Getting StartedMurat Doğan
 
What’s new in WinJS? Windows Phone 8.1 and the road ahead
What’s new in WinJS? Windows Phone 8.1 and the road aheadWhat’s new in WinJS? Windows Phone 8.1 and the road ahead
What’s new in WinJS? Windows Phone 8.1 and the road aheadNguyên Phạm
 
SEE 2009: Improving Mobile Web Developer Experience
SEE 2009: Improving Mobile Web Developer ExperienceSEE 2009: Improving Mobile Web Developer Experience
SEE 2009: Improving Mobile Web Developer ExperienceTasneem Sayeed
 
Room with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.jsRoom with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.jsZachary Klein
 
jQuery Mobile
jQuery MobilejQuery Mobile
jQuery Mobilemowd8574
 

What's hot (20)

An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.js
 
Accessibility - A feature you can build
Accessibility - A feature you can buildAccessibility - A feature you can build
Accessibility - A feature you can build
 
JClouds at San Francisco Java User Group
JClouds at San Francisco Java User GroupJClouds at San Francisco Java User Group
JClouds at San Francisco Java User Group
 
Vue.js
Vue.jsVue.js
Vue.js
 
Contextual jQuery
Contextual jQueryContextual jQuery
Contextual jQuery
 
jQuery Comes to XPages
jQuery Comes to XPagesjQuery Comes to XPages
jQuery Comes to XPages
 
jQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterprisejQuery in the [Aol.] Enterprise
jQuery in the [Aol.] Enterprise
 
Vue JS Intro
Vue JS IntroVue JS Intro
Vue JS Intro
 
Vue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.jsVue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.js
 
An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.js
 
Dynamic User Interfaces for Desktop and Mobile
Dynamic User Interfaces for Desktop and MobileDynamic User Interfaces for Desktop and Mobile
Dynamic User Interfaces for Desktop and Mobile
 
Real World Web components
Real World Web componentsReal World Web components
Real World Web components
 
The Point of Vue - Intro to Vue.js
The Point of Vue - Intro to Vue.jsThe Point of Vue - Intro to Vue.js
The Point of Vue - Intro to Vue.js
 
Doctype html public
Doctype html publicDoctype html public
Doctype html public
 
Meet VueJs
Meet VueJsMeet VueJs
Meet VueJs
 
Vue.js Getting Started
Vue.js Getting StartedVue.js Getting Started
Vue.js Getting Started
 
What’s new in WinJS? Windows Phone 8.1 and the road ahead
What’s new in WinJS? Windows Phone 8.1 and the road aheadWhat’s new in WinJS? Windows Phone 8.1 and the road ahead
What’s new in WinJS? Windows Phone 8.1 and the road ahead
 
SEE 2009: Improving Mobile Web Developer Experience
SEE 2009: Improving Mobile Web Developer ExperienceSEE 2009: Improving Mobile Web Developer Experience
SEE 2009: Improving Mobile Web Developer Experience
 
Room with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.jsRoom with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.js
 
jQuery Mobile
jQuery MobilejQuery Mobile
jQuery Mobile
 

Viewers also liked

Understanding progressive enhancement - yuiconf2010
Understanding progressive enhancement - yuiconf2010Understanding progressive enhancement - yuiconf2010
Understanding progressive enhancement - yuiconf2010Christian Heilmann
 
淘宝移动端Web开发最佳实践
淘宝移动端Web开发最佳实践淘宝移动端Web开发最佳实践
淘宝移动端Web开发最佳实践Du Yamin
 
Preview of YUI3 Treeview
Preview of YUI3 TreeviewPreview of YUI3 Treeview
Preview of YUI3 TreeviewGonzalo Cordero
 
Getting started with YUI3 and AlloyUI
Getting started with YUI3 and AlloyUIGetting started with YUI3 and AlloyUI
Getting started with YUI3 and AlloyUIZeno Rocha
 
Creating Hybrid mobile apps with YUI
Creating Hybrid mobile apps with YUICreating Hybrid mobile apps with YUI
Creating Hybrid mobile apps with YUIGonzalo Cordero
 

Viewers also liked (7)

YUI3 - IIT Madras HackU
YUI3 - IIT Madras HackU YUI3 - IIT Madras HackU
YUI3 - IIT Madras HackU
 
Understanding progressive enhancement - yuiconf2010
Understanding progressive enhancement - yuiconf2010Understanding progressive enhancement - yuiconf2010
Understanding progressive enhancement - yuiconf2010
 
淘宝移动端Web开发最佳实践
淘宝移动端Web开发最佳实践淘宝移动端Web开发最佳实践
淘宝移动端Web开发最佳实践
 
Preview of YUI3 Treeview
Preview of YUI3 TreeviewPreview of YUI3 Treeview
Preview of YUI3 Treeview
 
Attribute
AttributeAttribute
Attribute
 
Getting started with YUI3 and AlloyUI
Getting started with YUI3 and AlloyUIGetting started with YUI3 and AlloyUI
Getting started with YUI3 and AlloyUI
 
Creating Hybrid mobile apps with YUI
Creating Hybrid mobile apps with YUICreating Hybrid mobile apps with YUI
Creating Hybrid mobile apps with YUI
 

Similar to Building native Win8 apps with YUI

Going Offline with JS
Going Offline with JSGoing Offline with JS
Going Offline with JSbrendankowitz
 
Going offline with JS (DDD Sydney)
Going offline with JS (DDD Sydney)Going offline with JS (DDD Sydney)
Going offline with JS (DDD Sydney)brendankowitz
 
Responsive websites. Toolbox
Responsive websites. ToolboxResponsive websites. Toolbox
Responsive websites. ToolboxWojtek Zając
 
jQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesjQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesMark Roden
 
Use html5 to build what you want, where you want it
Use html5 to build what you want, where you want itUse html5 to build what you want, where you want it
Use html5 to build what you want, where you want itKevin DeRudder
 
Developing JavaScript Widgets
Developing JavaScript WidgetsDeveloping JavaScript Widgets
Developing JavaScript WidgetsBob German
 
Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web ApplicationYakov Fain
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introductionaswapnal
 
jQuery 1.9 and 2.0 - Present and Future
jQuery 1.9 and 2.0 - Present and FuturejQuery 1.9 and 2.0 - Present and Future
jQuery 1.9 and 2.0 - Present and FutureRichard Worth
 
Toronto User groups workshop - 2013-03-10 - HTML5 & Windows 8, friends with b...
Toronto User groups workshop - 2013-03-10 - HTML5 & Windows 8, friends with b...Toronto User groups workshop - 2013-03-10 - HTML5 & Windows 8, friends with b...
Toronto User groups workshop - 2013-03-10 - HTML5 & Windows 8, friends with b...Frédéric Harper
 
openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010Patrick Lauke
 
Developing large scale JavaScript applications
Developing large scale JavaScript applicationsDeveloping large scale JavaScript applications
Developing large scale JavaScript applicationsMilan Korsos
 
Win j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateevWin j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateevMihail Mateev
 
Windows 8 app template feedback
Windows 8 app template feedbackWindows 8 app template feedback
Windows 8 app template feedbackSteren Giannini
 
Mobile app with sencha touch
Mobile app with sencha touchMobile app with sencha touch
Mobile app with sencha touchfch415
 
Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022NAVER D2
 
Microsoft PT TechRefresh html win8.1
Microsoft PT TechRefresh html win8.1 Microsoft PT TechRefresh html win8.1
Microsoft PT TechRefresh html win8.1 Alexandre Marreiros
 
Mobile applications in a new way with React Native
Mobile applications in a new way with React NativeMobile applications in a new way with React Native
Mobile applications in a new way with React NativeEugene Zharkov
 
Mobile applications in a new way with React Native (by Eugene Zharkov) - Hack...
Mobile applications in a new way with React Native (by Eugene Zharkov) - Hack...Mobile applications in a new way with React Native (by Eugene Zharkov) - Hack...
Mobile applications in a new way with React Native (by Eugene Zharkov) - Hack...Intersog
 

Similar to Building native Win8 apps with YUI (20)

Going Offline with JS
Going Offline with JSGoing Offline with JS
Going Offline with JS
 
Going offline with JS (DDD Sydney)
Going offline with JS (DDD Sydney)Going offline with JS (DDD Sydney)
Going offline with JS (DDD Sydney)
 
Responsive websites. Toolbox
Responsive websites. ToolboxResponsive websites. Toolbox
Responsive websites. Toolbox
 
jQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesjQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPages
 
Use html5 to build what you want, where you want it
Use html5 to build what you want, where you want itUse html5 to build what you want, where you want it
Use html5 to build what you want, where you want it
 
Developing JavaScript Widgets
Developing JavaScript WidgetsDeveloping JavaScript Widgets
Developing JavaScript Widgets
 
Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web Application
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
 
Windows 8 for Web Developers
Windows 8 for Web DevelopersWindows 8 for Web Developers
Windows 8 for Web Developers
 
jQuery 1.9 and 2.0 - Present and Future
jQuery 1.9 and 2.0 - Present and FuturejQuery 1.9 and 2.0 - Present and Future
jQuery 1.9 and 2.0 - Present and Future
 
Toronto User groups workshop - 2013-03-10 - HTML5 & Windows 8, friends with b...
Toronto User groups workshop - 2013-03-10 - HTML5 & Windows 8, friends with b...Toronto User groups workshop - 2013-03-10 - HTML5 & Windows 8, friends with b...
Toronto User groups workshop - 2013-03-10 - HTML5 & Windows 8, friends with b...
 
openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010
 
Developing large scale JavaScript applications
Developing large scale JavaScript applicationsDeveloping large scale JavaScript applications
Developing large scale JavaScript applications
 
Win j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateevWin j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateev
 
Windows 8 app template feedback
Windows 8 app template feedbackWindows 8 app template feedback
Windows 8 app template feedback
 
Mobile app with sencha touch
Mobile app with sencha touchMobile app with sencha touch
Mobile app with sencha touch
 
Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022
 
Microsoft PT TechRefresh html win8.1
Microsoft PT TechRefresh html win8.1 Microsoft PT TechRefresh html win8.1
Microsoft PT TechRefresh html win8.1
 
Mobile applications in a new way with React Native
Mobile applications in a new way with React NativeMobile applications in a new way with React Native
Mobile applications in a new way with React Native
 
Mobile applications in a new way with React Native (by Eugene Zharkov) - Hack...
Mobile applications in a new way with React Native (by Eugene Zharkov) - Hack...Mobile applications in a new way with React Native (by Eugene Zharkov) - Hack...
Mobile applications in a new way with React Native (by Eugene Zharkov) - Hack...
 

Recently uploaded

"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
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
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
 
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
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
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
 

Recently uploaded (20)

"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 ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
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
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
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...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 

Building native Win8 apps with YUI

  • 1.
  • 2. Building native Windows 8 apps using YUI 3 @tilomitra // YUI Engineer
  • 3.
  • 5. About this talk • A bit about Windows 8 and IE10
  • 6. About this talk • A bit about Windows 8 and IE10 • WinJS
  • 7. About this talk • A bit about Windows 8 and IE10 • WinJS • WinJS + YUI (with Demo)
  • 8. About this talk • A bit about Windows 8 and IE10 • WinJS • WinJS + YUI (with Demo) • Questions & Discussion
  • 9. Not really focussing on... • In-app purchases • Packaging and submission process • Visual Studio (I’m a VS n00b)
  • 10.
  • 11.
  • 14. YUI 3.7.3 We gave ourselves 10 days (which included weekends) to get the job done…We were able to add support for all these new environments very quickly because of YUI’s architecture. -Eric F.
  • 16. Win8 vs WinRT Can run traditional Windows apps and the Win8 new Metro apps “Windows 8 Lite” designed primarily for tablets such as the Surface. WinRT Can only run Metro apps
  • 17. 4 different JS runtimes • IE10 Desktop • IE10 Start Screen (Metro) • Webview inside a C# app • WinJS
  • 18. IE10 “Metro” • More restrictive than IE10 Desktop • Minimal support for plugins (ActiveX, Flash, Silverlight, etc.)* * Metro IE10 does have Flash support but only sites that are on the Compatibility List can play Flash content.
  • 19. IE10 “Metro” • More restrictive than IE10 Desktop • Minimal support for plugins (ActiveX, Flash, Silverlight, etc.)* * Metro IE10 does have Flash support but only sites that are on the Compatibility List can play Flash content.
  • 20. Webview         <WebView Name="wv" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Source="http://yuilibrary.com"/> • Similar to web-views on iOS or Android • No access to device APIs, limited HTML5 support
  • 21. WinJS
  • 22. WinJS • A restricted IE10 runtime with access to native APIs • Allows developers to create WinRT apps using HTML/CSS/JS • All scripts/styles must be available on device
  • 23. WinJS • A restricted IE10 runtime with access to native APIs • Allows developers to create WinRT apps using HTML/CSS/JS • All scripts/styles must be available on device
  • 26. Overview • Uses IE10 to process HTML/CSS/JS
  • 27. Overview • Uses IE10 to process HTML/CSS/JS • Stylesheets and scripts bundled locally
  • 28. Overview • Uses IE10 to process HTML/CSS/JS • Stylesheets and scripts bundled locally • No JSONP, safe innerHTML
  • 29. Overview • Uses IE10 to process HTML/CSS/JS • Stylesheets and scripts bundled locally • No JSONP, safe innerHTML • Access to Windows and WinJS namespaces
  • 30. Injecting HTML myDiv.innerHTML  =  ‘<script>function  test()  {  alert("Testing,  Testing,   123...");  }</script><span  onclick="test()">Click  Me</span>’ //results  in  <span>Click  me</span> List of all filtered elements
  • 31. A WinJS App WinJS References ui.css default.html base.js ui.js default.js default.css navigator.js
  • 32. A WinJS App WinJS References Basic Shell Native styles ui.css default.html JS Utilities base.js UI Views ui.js default.js default.css Navigation navigator.js App Lifecycle Media Code queries
  • 33. Adding Pages Master View Detail View default.html masterview.html detailview.html WinJS References masterview.css detailview.css Other scripts/styles masterview.js detailview.js
  • 34. Pages adopt MVC Each “page” of the app has has it’s own HTML, CSS, and JS View Defined by page.html and page.css Controller Defined by page.js Defined in default.html and Model available in all pages
  • 35. default.html default.html <div  i contro igator homepage.html        da homepage.css pages/ homepage.js </div> A “wrapper” around different pages.
  • 36. default.html default.html <div  id="contenthost"  data-­‐win-­‐ control="Application.PageControlNav igator" homepage.html        data-­‐win-­‐options="{home:  '/ homepage.css pages/homepage/homepage'}"> homepage.js </div> A “wrapper” around different pages.
  • 37. default.js: Lifecycle events activated When the app is launched. After DOMContentLoaded (HTML parsed, resources loaded not loaded) ready When the app ready for use When the user switches away from your app. Good checkpoint time to save state. unload When app is about to be unloaded
  • 38. Navigation default.html default.html masterView.html detailView.html Single page navigation model provided by navigator.js through WinJS.Navigation.navigate(...)
  • 39. Navigation default.html masterView.html detailView.html This is what happens if you use <a href=”...”>
  • 40. Navigation Where am I? Who am i? What is the meaning of life? default.html masterView.html detailView.html This is what happens if you use <a href=”...”>
  • 41. Navigation groupedMaster.js WinJS.Navigation.navigate("/pages/itemDetail/itemDetail.html",  {  model:   model}); //the  passed  object  can  be  retrieved  in  itemDetail.js Use WinJS.Navigation.navigate() instead of location.href
  • 42. WinJS + YUI Leveraging YUI to build Win 8 apps
  • 43. It’s all about reusing code • Re-use your existing web code-base when making Win 8 apps • Use existing concepts - don’t re-invent the wheel • But what about UI/UX?
  • 44.
  • 45.
  • 48. Y.Sights.GridView Y.Sights.Shot Y.Sights.ShotList
  • 49.
  • 50.
  • 52.
  • 55. Y.Sights.GridView Y.Sights.Shot Y.Sights.ShotList
  • 56.
  • 58. demo
  • 59. Including YUI • Pull down necessary modules using the Dependency Configurator • Clone YUI and include build/ and src/ • Clone YUI and include build/
  • 60. Including YUI • Pull down necessary modules using the Configurator • Clone YUI and include build/ and src/ • Clone YUI and include build/
  • 61. Including YUI default.html                    <!-­‐-­‐  WinJS  references  -­‐-­‐>      <link  href="//Microsoft.WinJS.1.0.RC/css/ui-­‐dark.css"  rel="stylesheet"  />      <script  src="//Microsoft.WinJS.1.0.RC/js/base.js"></script>      <script  src="//Microsoft.WinJS.1.0.RC/js/ui.js"></script>        <script>            YUI_config  =  {                  ...            };      </script>      <script  src="/js/lib/yui3/build/yui/yui-­‐min.js"></script>
  • 62. Let’s re-visit MVC MVC, you say? Reminds me of the YUI App Framework.
  • 63. Let’s re-visit MVC Model Defined by Y.Model/Y.ModelList View Defined by Y.View Controller Defined by {page}.js
  • 64. Models • Should be environment agnostic • Y.Model/Y.ModelList + Y.YQL • Work on the browser and on WinJS
  • 65. Views Should we use native WinJS UI Views, or leverage Y.View?
  • 66.
  • 67.
  • 68. Native Views Easy to get it to look “right” It’s the WinJS way (documentation, code samples, etc.) Code can’t be re-used outside this environment Need to figure out how to organize native code and YUI code No performance gain for using native views
  • 69. Y.View Code once, re-use in different environments Works well with YUI Achieving the look and feel of Win 8 is fairly easy Need to code and determine markup and styles
  • 70. Native Views vs. Y.View • Depends on the app • Over the long term, Y.View probably offers greater benefits • Try using both and see what you are comfortable with
  • 71. Controllers • Haven’t experimented with Y.Router in this environment yet • Page navigation done through WinJS.Navigation.navigate(...) • Navigation history maintained by navigator.js
  • 72. UI/UX Won’t user experience suffer if we don’t use native APIs?
  • 73. UI/UX • Everything is HTML, CSS, and JS, whether it’s native or not. • CSS3 transitions are supported • Easy to leverage ui-*.css styles to get the right look and feel • Remember, Win 8 UI !== Web UI
  • 74. Debugging WinJS apps • Breakpoints and JavaScript console for standard debugging • Windows Simulator • View the DOM while the app is running with the DOM Explorer
  • 75. Thanks! Questions or comments? Fire away. @tilomitra http://github.com/tilomitra/Sights