Download - Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

Transcript
Page 1: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Page 2: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

twitter #wins8camp http://bit.ly/wins8cheatsheet Blog http://blogs.msdn.com/dorischen

Who am I? Developer Evangelist at Microsoft based in Silicon Valley, CA

Blog: http://blogs.msdn.com/b/dorischen/

Twitter @doristchen

Email: [email protected]

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

Page 3: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

Blog http://blogs.msdn.com/dorischen

Page 4: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

As of March 2012, IDC

Page 5: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Page 6: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

twitter #wins8camp http://bit.ly/wins8cheatsheet Blog http://blogs.msdn.com/dorischen PAGE 7

Page 7: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

App container

HTML host process

Internet Explorer

Web

platform

TAB

App code

Web platform

Windows

runtime

App code

PA

GE

Page 8: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

Blog http://blogs.msdn.com/dorischen

Page 9: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

demo

Page 10: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Page 11: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

Blog http://blogs.msdn.com/dorischen PAGE

12

Page 12: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

twitter #wins8camp http://bit.ly/wins8cheatsheet Blog http://blogs.msdn.com/dorischen PAGE 13

Page 13: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

twitter #wins8camp http://bit.ly/wins8cheatsheet Blog http://blogs.msdn.com/dorischen PAGE 14

Page 14: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Page 15: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

/* Re-arrange and hide/show content */

/* */

/* …*/

/* …*/

Full screen

Snap

Fill

Portrait

PAGE 17

Page 16: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Page 17: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

twitter #wins8camp http://bit.ly/wins8cheatsheet Blog http://blogs.msdn.com/dorischen PAGE 21

Page 18: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

twitter #wins8camp http://bit.ly/wins8cheatsheet Blog http://blogs.msdn.com/dorischen PAGE 22

Page 19: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Page 20: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

The development tools are FREE!

If you use a higher SKU, it just works!

Page 21: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

demo

Page 22: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Page 23: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

Blog http://blogs.msdn.com/dorischen PAGE

28

Page 24: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

Blog http://blogs.msdn.com/dorischen PAGE

32

Page 25: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Page 26: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

demo

Page 27: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

Blog http://blogs.msdn.com/dorischen PAGE

40

Page 28: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

"Code for touch, get mouse and pen for free!"

Page 29: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Page 30: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Page 31: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

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

}

...

}

Page 32: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

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;

}

};

Page 33: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

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

}

...

}

Page 34: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

demo

Page 35: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Page 36: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Page 37: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

• 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

Page 38: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

HTML5/JS developers (Game)GameMaker - family of products that caters to entry-level developers and seasoned game development professionals to create cross platform games

Page 39: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

HTML5/JS developers (Game): Construct 2 (Game)

Construct2 - cross platform game development for beginners

Page 40: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

HTML5/JS developers (Game)GameSalad – create cross platform games rapidly with no code

Page 41: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Page 42: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Page 43: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

YOUR IDEA.

YOUR APP.

30 DAYS.

You can develop a Windows 8 app in 30 days—

and we’re here to help.

Week 1 App design

Week 2 Coding your app

Week 3 Making your app shine

Week 4 Get published

• 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

Page 44: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

Join http://bit.ly/FreeStoreReg Publish your app to the Windows Store and/or Windows Phone Store between

December 20, 2012 through February 28, 2013 and qualify for the following rewards:

1. A store registration reimbursement* AND a copy of Halo 4 for Xbox 360!

2. A chance to win one of 12 Xbox 360 consoles with Kinect. The more apps you enter,

the more chances you'll have to win.

3. The Grand Prize: Three devs with the best apps will win an ultimate backstage pass to Microsoft Studios and spend the day with the Windows 8 Games Studios team—makers of Windows 8, Windows Phone 8 and XBOX-enabled games!

Page 45: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

http://bit.ly/HTML5Wins8Camp

http://bit.ly/CampInBox

Windows 8 Cheat Sheethttp://bit.ly/wins8cheatsheet

http:/dev.windows.comPAGE

61

Page 46: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

PAGE

62

• 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• http://www.beautyoftheweb.com/

Page 47: Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3

http://blogs.msdn.com/b/dorischen/archive/2012/10/02/transform-your-html-css-javascript-apps-into-windows-8-application.aspx

http://msdn.microsoft.com/en-us/library/windows/apps/hh700404.aspx

http://msdn.microsoft.com/en-us/library/windows/apps/hh465380.aspx

http://msdn.microsoft.com/en-us/library/windows/apps/hh465373.aspx