SlideShare a Scribd company logo
What Web Developers Need to Know to Develop Windows 8 Apps
Who am I?
          Developer Evangelist at Microsoft based in Silicon Valley, CA
             Blog: http://blogs.msdn.com/b/dorischen/
             Twitter @doristchen
             Email: doris.chen@microsoft.com
             Office Hours http://ohours.org/dorischen
          Has over 15 years of experience in the software industry focusing
           on web technologies
          Spoke and published widely at JavaOne, O'Reilly, Silicon Valley
           Code Camp, SD West, SD Forum and worldwide User Groups
           meetings
          Doris received her Ph.D. from the University of California at Los
           Angeles (UCLA)
PAGE 2      twitter #wins8camp   http://bit.ly/wins8cheatsheet   Blog http://blogs.msdn.com/dorischen
Blog http://blogs.msdn.com/dorischen
As of March 2012, IDC
http://bit.ly/win8cards
What Web Developers Need to Know to Develop Windows 8 Apps
PAGE 8   twitter #wins8camp   http://bit.ly/wins8cheatsheet   Blog http://blogs.msdn.com/dorischen
What Web Developers Need to Know to Develop Windows 8 Apps
Blog http://blogs.msdn.com/dorischen
demo
What Web Developers Need to Know to Develop Windows 8 Apps
Blog http://blogs.msdn.com/dorischen
PAGE
PAGE 14   twitter #wins8camp   http://bit.ly/wins8cheatsheet   Blog http://blogs.msdn.com/dorischen
PAGE 15   twitter #wins8camp   http://bit.ly/wins8cheatsheet   Blog http://blogs.msdn.com/dorischen
What Web Developers Need to Know to Develop Windows 8 Apps
/* Re-arrange and hide/show content */

                                                               /* */   Full screen          Portrait

                                                      /* …*/
                                             /* …*/




                                                                                     Snap
                                                                             Fill


PAGE 18
demo
What Web Developers Need to Know to Develop Windows 8 Apps
PAGE 22   twitter #wins8camp   http://bit.ly/wins8cheatsheet   Blog http://blogs.msdn.com/dorischen
PAGE 23   twitter #wins8camp   http://bit.ly/wins8cheatsheet   Blog http://blogs.msdn.com/dorischen
What Web Developers Need to Know to Develop Windows 8 Apps
The development tools are FREE!
If you use a higher SKU, it just works!
demo
What Web Developers Need to Know to Develop Windows 8 Apps
Blog http://blogs.msdn.com/dorischen
PAGE
demo
Feature                             Local context        Web context
  Windows Runtime                     Yes                  No

  Windows Library for JavaScript      Yes                  Partial

  JavaScript
                                      No                   Yes
  URIs(attribute="javascript:code")

  Data URIs ("data:" ) for fonts      No                   Yes

  External script references
                                      No                   Yes
  (<script src="http://*" /> )

  window.close                        Yes                  No

  Cross-domain XHR requests           Yes                  No



There are ways to communicate across contexts, ways to give websites access to some web standards
features and ways to skip automatic filtering within a function.
http://blogs.msdn.com/b/dorischen/archive/2012/10/02/transform-your-html-
css-javascript-apps-into-windows-8-application.aspx



 http://github.com/appendto/jquery-win8

 http://channel9.msdn.com/Events/Build/2012/3-130


http://msdn.microsoft.com/en-
us/library/windows/apps/hh700404.aspx
PAGE 33   twitter #devcamp   lab setup: http://bit.ly/html5setup   Blog http://blogs.msdn.com/dorischen
xhr
//access a web service, cloud service, local resource
       http://www.example.org/somedata.json
Blog http://blogs.msdn.com/dorischen
PAGE
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 Apps
"Code for touch, get mouse and pen for free!"
What Web Developers Need to Know to Develop Windows 8 Apps
function onLoad() {
    ...
    var workSpaces = document.getElementsByClassName("workspace");
    for (i = 0; i < workSpaces.length; i++) {
        workSpaces[i].addEventListener("MSPointerDown", pointerDownHandler, false);
        workSpaces[i].addEventListener("MSPointerMove", pointerMoveHandler, false);
        workSpaces[i].addEventListener("MSPointerUp", pointerUpHandler, false);
        workSpaces[i].addEventListener("MSManipulationStateChanged",
            resetInteractions, false);
    }
    ...
}
this.MSPointerDown = function(evt)
{
    context.beginPath();
    context.moveTo(evt.offsetX, evt.offsetY);
    x = evt.offsetX;
    y = evt.offsetY;
    brush.started = true;
};

this.MSPointerUp = function(evt)
{
    if (brush.started)
    {
        brush.MSPointerMove(evt);
        context.closePath();
        brush.started = false;
    }
};
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 Apps
demo
// Application manifest capabilities required to access camera
and microphone
<Capabilities>
    <DeviceCapability Name="webcam" />
    <DeviceCapability Name="microphone" />
</Capabilities>
id="message"
    id="imagedisplay"
       type="text/javascript">

// Step 1: Invoke the camera capture UI for snapping a photo
var captureUI = new Windows.Media.Capture.CameraCaptureUI();
captureUI.captureFileAsync(Windows.Media.Capture.CameraCaptureUIMode.photo).
    then(function (capturedItem) {

        if (capturedItem) {
            // Step 2: Display the photo
            document.getElementById("imagedisplay").src =
URL.createObjectURL(capturedItem);
        } else {
            document.getElementById("message").innerHTML = "User didn’t capture a
photo";
        }

   });
id="message"
      id="videoplayback"
       type="text/javascript">


// Step 1: Invoke the camera capture UI for record a video
var dialog = new Windows.Media.Capture.CameraCaptureUI();
dialog.videoSettings.format =
Windows.Media.Capture.CameraCaptureUIVideoFormat.mp4;
dialog.captureFileAsync(Windows.Media.Capture.CameraCaptureUIMode.video).done(fun
ction (file) {
    if (file) {
        var videoBlobUrl = URL.createObjectURL(file, {oneTimeOnly: true});
        document.getElementById("capturedVideo").src = videoBlobUrl;
    }
});
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 Apps
demo
document.getElementById("pin").addEventListener("click", function (e) {
               var uri = new Windows.Foundation.Uri("ms-appx:///" + item.tileImage);

               var tile = new start.SecondaryTile(
                   item.key,                                      //   Tile ID
                   item.shortTitle,                               //   Tile short name
                   item.title,                                    //   Tile display name
                   JSON.stringify(Data.getItemReference(item)),   //   Activation argument
                   start.TileOptions.showNameOnLogo,              //   Tile options
                   uri                                            //   Tile logo URI
               );
})




return nav.navigate("/pages/itemDetail/itemDetail.html", { item: JSON.parse(args.detail.arguments)
});
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 Apps
default.js:
// Register for push notifications
var profile = net.NetworkInformation.getInternetConnectionProfile();
if (profile.getNetworkConnectivityLevel() === net.NetworkConnectivityLevel.internetAccess)
{
push.PushNotificationChannelManager.createPushNotificationChannelForApplic
ationAsync().then(function (channel) {
                        var buffer =
wsc.CryptographicBuffer.convertStringToBinary(channel.uri, wsc.BinaryStringEncoding.utf8);
                    var uri = wsc.CryptographicBuffer.encodeToBase64String(buffer);


                    WinJS.xhr({ url:
"http://ContosoRecipes8.cloudapp.net?uri=" + uri + "&type=tile"
}).then(function (xhr) {
                        … }…
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 Apps
// Handle click events from the Reminder command
           document.getElementById("remind").addEventListener("click", function (e) {
               // Create a toast notifier
               var notifier = notify.ToastNotificationManager.createToastNotifier();

               // Make sure notifications are enabled
               if (notifier.setting != notify.NotificationSetting.enabled) {…}

                // Get a toast template and insert a text node containing a message
                var template =
notify.ToastNotificationManager.getTemplateContent(notify.ToastTemplateType.toastText01);
                var element =
template.getElementsByTagName("text")[0];element.appendChild(template.createTextNode("Reminder!"));

               // Schedule the toast to appear 10 seconds from now
               var date = new Date(new Date().getTime() + 10000);
               var stn = notify.ScheduledToastNotification(template, date);
               notifier.addToSchedule(stn); });
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 Apps
HTML5/JS developers
• Free open source cross platform framework for apps on mobile devices
• Renders UI using HTML5 and CSS; Web browser encased in a native app
  for each platform
• Build for Windows Phone and Port to Windows 8
HTML5/JS developers (Game): Construct 2 (Game)
Construct2 - cross platform game development for beginners
HTML5/JS developers (Game)
GameMaker - family of products that caters to entry-level developers and seasoned game development
professionals to create cross platform games
HTML5/JS developers (Game)
GameSalad – create cross platform games rapidly with no code
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 Apps
 Publish your app to the Windows
  Store and/or Windows Phone Store
   http://bit.ly/2000Cash

  March 8, 2013 through June 30, 2013
 Submit up to 10 published apps per
  Store and get a $100 Virtual Visa®
 More: http://bit.ly/2000Cash
 Blog http://blogs.msdn.com/dorischen
YOUR IDEA.                                                             Week 1 App design


YOUR APP .                                                             Week 2 Coding your app



30 DAYS.
                                                                       Week 3 Making your app shine
                                                                       Week 4 Get published



You can develop a Windows 8 app in 30 days—
and we’re here to help.
•   Insider tips and tricks on Windows 8 application development.
•   Personal on-the-phone access to a Windows 8 architect*.
•   An exclusive one-on-one Metro style design consultation*.
•   An opportunity to get expert help from a Microsoft Services Engineer at an App Excellence Lab.




    Sign Up             http://bit.ly/Win8GenApp
http://bit.ly/HTML5Wins8Camp



 http://bit.ly/CampInBox


 http://bit.ly/Wins8Download



 http://Aka.ms/brockschmidtbook

    PAGE
 http:/dev.windows.com
• Responsive Web Design and CSS3
      • http://bit.ly/CSS3Intro
   • HTML5, CSS3 Free 1 Day Training
      • http://bit.ly/HTML5DevCampDownload
   • Using Blend to Design HTML5 Windows 8 Application (Part II): Style,
      Layout and Grid
      • http://bit.ly/HTML5onBlend2
   • Using Blend to Design HTML5 Windows 8 Application (Part III): Style
      Game Board, Cards, Support Different Device, View States
      • http://bit.ly/HTML5onBlend3
   • Feature-specific demos
       • http://ie.microsoft.com/testdrive/
   • Real-world demos
PAGE
       • http://www.beautyoftheweb.com/

More Related Content

PPTX
Using Components to Build Native-Quality HTML5 Apps
PPT
HTML5 Dev Conf 2013 Presentation
PPTX
WebGL For Game Development Spring 2013
PDF
Modern frontend development with VueJs
PDF
Chrome enchanted 2015
PDF
125 고성능 web view-deview 2013 발표 자료_공유용
PDF
Developing for Mobile
PPTX
Vue business first
Using Components to Build Native-Quality HTML5 Apps
HTML5 Dev Conf 2013 Presentation
WebGL For Game Development Spring 2013
Modern frontend development with VueJs
Chrome enchanted 2015
125 고성능 web view-deview 2013 발표 자료_공유용
Developing for Mobile
Vue business first

What's hot (20)

PDF
The Point of Vue - Intro to Vue.js
ZIP
The 5 Layers of Web Accessibility
PDF
Love at first Vue
PDF
An introduction to Vue.js
PDF
VueJS Introduction
PPTX
How to Build SPA with Vue Router 2.0
PDF
Enjoy the vue.js
PPT
WebGL: GPU acceleration for the open web
ODP
An Introduction to Vuejs
PDF
Room with a Vue - Introduction to Vue.js
PDF
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
PDF
Scalable Front-end Development with Vue.JS
PDF
Introducing Rendr: Run your Backbone.js apps on the client and server
PDF
Sara Harkousse - "Web Components: It's all rainbows and unicorns! Is it?"
ODP
Passo a Passo para criar uma aplicação Móvel Híbrida
PDF
Vue.js is boring - and that's a good thing
PDF
Android best practices
PDF
Story about module management with angular.js
PDF
Making your Angular.js Application accessible
The Point of Vue - Intro to Vue.js
The 5 Layers of Web Accessibility
Love at first Vue
An introduction to Vue.js
VueJS Introduction
How to Build SPA with Vue Router 2.0
Enjoy the vue.js
WebGL: GPU acceleration for the open web
An Introduction to Vuejs
Room with a Vue - Introduction to Vue.js
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
Scalable Front-end Development with Vue.JS
Introducing Rendr: Run your Backbone.js apps on the client and server
Sara Harkousse - "Web Components: It's all rainbows and unicorns! Is it?"
Passo a Passo para criar uma aplicação Móvel Híbrida
Vue.js is boring - and that's a good thing
Android best practices
Story about module management with angular.js
Making your Angular.js Application accessible
Ad

Viewers also liked (13)

PDF
2013 04-02-server-side-backbone
PPT
Creating the interfaces of the future with the APIs of today
PPTX
Las apps
PPTX
Curso historia y turismo valparaíso chile
PPTX
Curso de reparacion de celulares
PDF
Famo.us - HTML5 Dev Conference Tech Talk
PPT
Windows 8 vs windows 7 ppt
DOCX
Windows 10
PPTX
Sistemas operativos-Windows 10
PPTX
Windows 10
PPTX
Introducción a Windows 10
PPTX
Windows 10
2013 04-02-server-side-backbone
Creating the interfaces of the future with the APIs of today
Las apps
Curso historia y turismo valparaíso chile
Curso de reparacion de celulares
Famo.us - HTML5 Dev Conference Tech Talk
Windows 8 vs windows 7 ppt
Windows 10
Sistemas operativos-Windows 10
Windows 10
Introducción a Windows 10
Windows 10
Ad

Similar to What Web Developers Need to Know to Develop Windows 8 Apps (20)

PDF
Building Beautiful and Interactive Windows 8 apps with JavaScript, HTML5 & CSS3
PDF
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
PDF
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
PDF
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
PDF
Wins8 appfoforweb fluent
PDF
Use html5 to build what you want, where you want it
PPTX
Responsive app design
PDF
Windows 8 app template feedback
PPTX
Windows 8 Pure Imagination - 2012-11-25 - Extending Your Game with Windows 8 ...
PDF
What Web Developers Need to Know to Develop Native HTML5/JS Apps
PDF
Win j svsphonegap-damyan-petev-mihail-mateev
PPTX
Toronto User groups workshop - 2013-03-10 - HTML5 & Windows 8, friends with b...
PPTX
Windows Store Apps using HTML and JavaScript: Become a Windows App Store deve...
PPTX
Windows 8 Pure Imagination - 2012-11-24 - Getting your HTML5 game Windows 8 r...
PDF
Programming Windows Store Apps with C 1st Edition Matthew Baxter-Reynolds
PPT
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
PDF
Windows 8 product guide developer english
PPTX
Introduction into windows 8 application development
PPTX
Building the windows 8 community app
PDF
Develop an app for Windows 8 using HTML5
Building Beautiful and Interactive Windows 8 apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
Wins8 appfoforweb fluent
Use html5 to build what you want, where you want it
Responsive app design
Windows 8 app template feedback
Windows 8 Pure Imagination - 2012-11-25 - Extending Your Game with Windows 8 ...
What Web Developers Need to Know to Develop Native HTML5/JS Apps
Win j svsphonegap-damyan-petev-mihail-mateev
Toronto User groups workshop - 2013-03-10 - HTML5 & Windows 8, friends with b...
Windows Store Apps using HTML and JavaScript: Become a Windows App Store deve...
Windows 8 Pure Imagination - 2012-11-24 - Getting your HTML5 game Windows 8 r...
Programming Windows Store Apps with C 1st Edition Matthew Baxter-Reynolds
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
Windows 8 product guide developer english
Introduction into windows 8 application development
Building the windows 8 community app
Develop an app for Windows 8 using HTML5

More from Doris Chen (20)

PDF
Practical tipsmakemobilefaster oscon2016
PDF
Building Web Sites that Work Everywhere
PDF
Angular mobile angular_u
PDF
Lastest Trends in Web Development
PDF
Angular or Backbone: Go Mobile!
PDF
OSCON Presentation: Developing High Performance Websites and Modern Apps with...
PDF
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
PDF
Developing High Performance Websites and Modern Apps with JavaScript and HTML5
PDF
Windows 8 Opportunity
PDF
Introduction to CSS3
PDF
Practical HTML5: Using It Today
PDF
Dive Into HTML5
PDF
Practical HTML5: Using It Today
PDF
HTML 5 Development for Windows Phone and Desktop
PDF
Dive into HTML5: SVG and Canvas
PDF
Performance Optimization and JavaScript Best Practices
PDF
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
PDF
Develop Netflix Movie Search App using jQuery, OData, JSONP and Netflix Techn...
PDF
Ajax Performance Tuning and Best Practices
PDF
Developing Revolutionary Web Applications using Comet and Ajax Push
Practical tipsmakemobilefaster oscon2016
Building Web Sites that Work Everywhere
Angular mobile angular_u
Lastest Trends in Web Development
Angular or Backbone: Go Mobile!
OSCON Presentation: Developing High Performance Websites and Modern Apps with...
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Developing High Performance Websites and Modern Apps with JavaScript and HTML5
Windows 8 Opportunity
Introduction to CSS3
Practical HTML5: Using It Today
Dive Into HTML5
Practical HTML5: Using It Today
HTML 5 Development for Windows Phone and Desktop
Dive into HTML5: SVG and Canvas
Performance Optimization and JavaScript Best Practices
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
Develop Netflix Movie Search App using jQuery, OData, JSONP and Netflix Techn...
Ajax Performance Tuning and Best Practices
Developing Revolutionary Web Applications using Comet and Ajax Push

Recently uploaded (20)

PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
cuic standard and advanced reporting.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Empathic Computing: Creating Shared Understanding
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Unlocking AI with Model Context Protocol (MCP)
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Advanced IT Governance
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Approach and Philosophy of On baking technology
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
Chapter 3 Spatial Domain Image Processing.pdf
Spectral efficient network and resource selection model in 5G networks
Diabetes mellitus diagnosis method based random forest with bat algorithm
cuic standard and advanced reporting.pdf
MYSQL Presentation for SQL database connectivity
NewMind AI Weekly Chronicles - August'25 Week I
Empathic Computing: Creating Shared Understanding
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Unlocking AI with Model Context Protocol (MCP)
The AUB Centre for AI in Media Proposal.docx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Advanced IT Governance
Understanding_Digital_Forensics_Presentation.pptx
Approach and Philosophy of On baking technology
NewMind AI Monthly Chronicles - July 2025
Dropbox Q2 2025 Financial Results & Investor Presentation

What Web Developers Need to Know to Develop Windows 8 Apps

  • 2. Who am I?  Developer Evangelist at Microsoft based in Silicon Valley, CA  Blog: http://blogs.msdn.com/b/dorischen/  Twitter @doristchen  Email: doris.chen@microsoft.com  Office Hours http://ohours.org/dorischen  Has over 15 years of experience in the software industry focusing on web technologies  Spoke and published widely at JavaOne, O'Reilly, Silicon Valley Code Camp, SD West, SD Forum and worldwide User Groups meetings  Doris received her Ph.D. from the University of California at Los Angeles (UCLA) PAGE 2 twitter #wins8camp http://bit.ly/wins8cheatsheet Blog http://blogs.msdn.com/dorischen
  • 4. As of March 2012, IDC
  • 7. PAGE 8 twitter #wins8camp http://bit.ly/wins8cheatsheet Blog http://blogs.msdn.com/dorischen
  • 10. demo
  • 13. PAGE 14 twitter #wins8camp http://bit.ly/wins8cheatsheet Blog http://blogs.msdn.com/dorischen
  • 14. PAGE 15 twitter #wins8camp http://bit.ly/wins8cheatsheet Blog http://blogs.msdn.com/dorischen
  • 16. /* Re-arrange and hide/show content */ /* */ Full screen Portrait /* …*/ /* …*/ Snap Fill PAGE 18
  • 17. demo
  • 19. PAGE 22 twitter #wins8camp http://bit.ly/wins8cheatsheet Blog http://blogs.msdn.com/dorischen
  • 20. PAGE 23 twitter #wins8camp http://bit.ly/wins8cheatsheet Blog http://blogs.msdn.com/dorischen
  • 22. The development tools are FREE! If you use a higher SKU, it just works!
  • 23. demo
  • 26. demo
  • 27. Feature Local context Web context Windows Runtime Yes No Windows Library for JavaScript Yes Partial JavaScript No Yes URIs(attribute="javascript:code") Data URIs ("data:" ) for fonts No Yes External script references No Yes (<script src="http://*" /> ) window.close Yes No Cross-domain XHR requests Yes No There are ways to communicate across contexts, ways to give websites access to some web standards features and ways to skip automatic filtering within a function.
  • 29. PAGE 33 twitter #devcamp lab setup: http://bit.ly/html5setup Blog http://blogs.msdn.com/dorischen
  • 30. xhr //access a web service, cloud service, local resource http://www.example.org/somedata.json
  • 35. "Code for touch, get mouse and pen for free!"
  • 37. function onLoad() { ... var workSpaces = document.getElementsByClassName("workspace"); for (i = 0; i < workSpaces.length; i++) { workSpaces[i].addEventListener("MSPointerDown", pointerDownHandler, false); workSpaces[i].addEventListener("MSPointerMove", pointerMoveHandler, false); workSpaces[i].addEventListener("MSPointerUp", pointerUpHandler, false); workSpaces[i].addEventListener("MSManipulationStateChanged", resetInteractions, false); } ... }
  • 38. this.MSPointerDown = function(evt) { context.beginPath(); context.moveTo(evt.offsetX, evt.offsetY); x = evt.offsetX; y = evt.offsetY; brush.started = true; }; this.MSPointerUp = function(evt) { if (brush.started) { brush.MSPointerMove(evt); context.closePath(); brush.started = false; } };
  • 41. demo
  • 42. // Application manifest capabilities required to access camera and microphone <Capabilities> <DeviceCapability Name="webcam" /> <DeviceCapability Name="microphone" /> </Capabilities>
  • 43. id="message" id="imagedisplay" type="text/javascript"> // Step 1: Invoke the camera capture UI for snapping a photo var captureUI = new Windows.Media.Capture.CameraCaptureUI(); captureUI.captureFileAsync(Windows.Media.Capture.CameraCaptureUIMode.photo). then(function (capturedItem) { if (capturedItem) { // Step 2: Display the photo document.getElementById("imagedisplay").src = URL.createObjectURL(capturedItem); } else { document.getElementById("message").innerHTML = "User didn’t capture a photo"; } });
  • 44. id="message" id="videoplayback" type="text/javascript"> // Step 1: Invoke the camera capture UI for record a video var dialog = new Windows.Media.Capture.CameraCaptureUI(); dialog.videoSettings.format = Windows.Media.Capture.CameraCaptureUIVideoFormat.mp4; dialog.captureFileAsync(Windows.Media.Capture.CameraCaptureUIMode.video).done(fun ction (file) { if (file) { var videoBlobUrl = URL.createObjectURL(file, {oneTimeOnly: true}); document.getElementById("capturedVideo").src = videoBlobUrl; } });
  • 48. demo
  • 49. document.getElementById("pin").addEventListener("click", function (e) { var uri = new Windows.Foundation.Uri("ms-appx:///" + item.tileImage); var tile = new start.SecondaryTile( item.key, // Tile ID item.shortTitle, // Tile short name item.title, // Tile display name JSON.stringify(Data.getItemReference(item)), // Activation argument start.TileOptions.showNameOnLogo, // Tile options uri // Tile logo URI ); }) return nav.navigate("/pages/itemDetail/itemDetail.html", { item: JSON.parse(args.detail.arguments) });
  • 52. default.js: // Register for push notifications var profile = net.NetworkInformation.getInternetConnectionProfile(); if (profile.getNetworkConnectivityLevel() === net.NetworkConnectivityLevel.internetAccess) { push.PushNotificationChannelManager.createPushNotificationChannelForApplic ationAsync().then(function (channel) { var buffer = wsc.CryptographicBuffer.convertStringToBinary(channel.uri, wsc.BinaryStringEncoding.utf8); var uri = wsc.CryptographicBuffer.encodeToBase64String(buffer); WinJS.xhr({ url: "http://ContosoRecipes8.cloudapp.net?uri=" + uri + "&type=tile" }).then(function (xhr) { … }…
  • 56. // Handle click events from the Reminder command document.getElementById("remind").addEventListener("click", function (e) { // Create a toast notifier var notifier = notify.ToastNotificationManager.createToastNotifier(); // Make sure notifications are enabled if (notifier.setting != notify.NotificationSetting.enabled) {…} // Get a toast template and insert a text node containing a message var template = notify.ToastNotificationManager.getTemplateContent(notify.ToastTemplateType.toastText01); var element = template.getElementsByTagName("text")[0];element.appendChild(template.createTextNode("Reminder!")); // Schedule the toast to appear 10 seconds from now var date = new Date(new Date().getTime() + 10000); var stn = notify.ScheduledToastNotification(template, date); notifier.addToSchedule(stn); });
  • 63. HTML5/JS developers • Free open source cross platform framework for apps on mobile devices • Renders UI using HTML5 and CSS; Web browser encased in a native app for each platform • Build for Windows Phone and Port to Windows 8
  • 64. HTML5/JS developers (Game): Construct 2 (Game) Construct2 - cross platform game development for beginners
  • 65. HTML5/JS developers (Game) GameMaker - family of products that caters to entry-level developers and seasoned game development professionals to create cross platform games
  • 66. HTML5/JS developers (Game) GameSalad – create cross platform games rapidly with no code
  • 69.  Publish your app to the Windows Store and/or Windows Phone Store http://bit.ly/2000Cash March 8, 2013 through June 30, 2013  Submit up to 10 published apps per Store and get a $100 Virtual Visa®  More: http://bit.ly/2000Cash Blog http://blogs.msdn.com/dorischen
  • 70. YOUR IDEA. Week 1 App design YOUR APP . Week 2 Coding your app 30 DAYS. Week 3 Making your app shine Week 4 Get published You can develop a Windows 8 app in 30 days— and we’re here to help. • Insider tips and tricks on Windows 8 application development. • Personal on-the-phone access to a Windows 8 architect*. • An exclusive one-on-one Metro style design consultation*. • An opportunity to get expert help from a Microsoft Services Engineer at an App Excellence Lab. Sign Up http://bit.ly/Win8GenApp
  • 72. • Responsive Web Design and CSS3 • http://bit.ly/CSS3Intro • HTML5, CSS3 Free 1 Day Training • http://bit.ly/HTML5DevCampDownload • Using Blend to Design HTML5 Windows 8 Application (Part II): Style, Layout and Grid • http://bit.ly/HTML5onBlend2 • Using Blend to Design HTML5 Windows 8 Application (Part III): Style Game Board, Cards, Support Different Device, View States • http://bit.ly/HTML5onBlend3 • Feature-specific demos • http://ie.microsoft.com/testdrive/ • Real-world demos PAGE • http://www.beautyoftheweb.com/