Platform for Metro Style
Apps
Agenda
Introduction to Windows 8
Experience
Introduction to Windows Run-time
Store & developer
opportunity
You’ll leave understanding:
The Windows 8 Platform investments
Windows 7
As of //build 2011
450,000,000 copies of Windows 7 sold
Windows 7 consumer usage greater than XP
Internet Explorer 9 is the fastest growing
Windows 7 browser
542,000,000 people signing into Windows Live
services
Changing world of computing
Form factors and user interactions models create
new scenarios and opportunities
Mobility means devices you use while carrying,
not just devices you carry
App developers want rich connectivity and
sharing capabilities, connection to customers
Services are intrinsic in all software
Windows reimagined
New fast
and fluid
Start screen
Everything great about
Windows 7 we made
even better
Touch,
mouse,
keyboard
Great experience across all
hardware
Tablets to
laptops to
all-in-ones
Highest
power to
the most
efficient
chipset
Touch,
mouse,
keyboard
Windows 8 reimagined
demo
Windows 8 Experience
Fast and fluid user experience
Responsive, alive, beautiful
Immersive and full-screen
Focuses attention on your apps
Touch-first with full keyboard and mouse
Enables your choice of interaction
Web of apps working together
Apps are connected to each other and the cloud
Experience for all PC devices and architectures
No compromise across new form factors, desktops and laptops
Platform Investments
Key Investments
New Windows Runtime (WinRT)
New App Execution Environment
New Windows 8 User Experience
Windows Store
Windows Run-time (WinRT)
Windows 8 Platform
Metro style Apps
HTML
JavaScri
pt
C
C++
C#
VB
Desktop Apps
Win3
2
.
NET
/ SL
Internet
Explore
r
Communicatio
n
& Data
Application Model
Devices &
Printing
WinRT APIs
Graphics &
Media
S
y
st
e
m
S
e
rv
ic
e
s
JavaScript
(Chakra)
C
C++
C#
VB
XAML
HTML / CSS
V
ie
w
M
o
d
e
l
C
o
n
tr
o
lle
r
Windows Core OS Services
C
o
re
demo
Hello WinRT in C++
What did we see…
WinRT APIs are native
XAML used from C++
Portable C++ code
Metro style application APIs
Fundamentals
Application
Services
Threading/Timers
Memory
Management
Authentication
Cryptography
Globalization
Devices
Geolocation
Portable
Sensors
NFC
User Interface
SVG
Tiles
Input
Accessibility
Printing
HTML5/CSS
XAML
DirectX
Controls
Data Binding
Communications & Data
Memory
Management
XML
Networking
SMS
Notifications
Streams
Contracts
Local & Cloud Storage
Web
Media
Playback
Capture
PlayTo
Visual Effects
WinRT in C#
demo
What did we see…
WinRT APIs are asychronous
WinRT APIs provide rich access to device,
OS and services
WinRT APIs feel natural in C#, Javascript
and C++
The C# code you have to write
today…
[
DllImport
(
"avicap32.dll"
,
EntryPoint=
"capCreateCaptureWindow"
)]
static extern int
capCreateCaptureWindow(
string
lpszWindowName,
int
dwStyle,
int
X,
int
Y,
int
nWidth,
int
nHeight,
int
hwndParent,
int
nID);
[
DllImport
(
"avicap32.dll"
)]
static extern bool
capGetDriverDescription(
int
wDriverIndex,
[
MarshalAs
(
UnmanagedType
.LPTStr)]
ref string
lpszName,
int
cbName,
[
MarshalAs
(
UnmanagedType
.LPTStr)]
ref string
lpszVer,
int
cbVer);
// more and more of the same
The C# code you get to write on
Windows 8
using
Windows.Media.Capture;
var
ui =
new
CameraCaptureUI
();
ui.PhotoSettings.CroppedAspectRatio =
new
Size
(4, 3);
var
file =
await
ui.CaptureFileAsync(
CameraCaptureUIMode
.Photo);
if
(file != null)
{
var
bitmap =
new
BitmapImage
() ;
bitmap.SetSource(
await
file.OpenAsync(
FileAccessMode
.Read));
Photo.Source = bitmap;
}
Language projections
Windows
Runtime
Object
(or Component)
Written
in C++, C#, VB
Windows
Metadata
C++ App
P
ro
je
c
ti
o
n
C
LR
C#/VB App
P
ro
je
c
ti
o
n
HTML App
C
h
a
kr
a
P
ro
je
c
ti
o
n
App Execution Environment
Metro style app acquisition
Windows
Store
backend
Package
Manager
Windows
Store
install
Execution
Engine
Extensio
n
Handler
stage
Single instance
store
register
Registration
Information
Building blocks of an app
package
App Manifest contains all
information needed to
deploy
the app
Blockmap contains hashes
of all files within the app
package
Signature validates the
integrity of the app package
AppXManifest.xm
l
BlockMap
Signature
Zip Central
Directory
Files / Assets
.appx
package
App manifest and capabilities
Explicitly declares the app integration
endpoints
File capabilities (music/pictures/videos/documents libraries,
removable storage)
Devices (webcam, microphone, location, sms, proximity);
extensible to new device classes
Network and identity (internet, private network, credentials)
File type associations
App contracts (search, share, etc.)
Contained in appxmanifest.xml;
Visual Studio provides editor
demo
Capabilities
Process Isolation
OS
User data
Devices
Communications
Handlers
Tiles
Cryptography
…
…
B
ro
ke
r
s
Process1
Local context
Web
context
AppData
Local
Temp
Roaming
Contracts
Process2
Local context
Web
context
AppData
Local
Temp
Roaming
D
ire
ct
A
P
Is
Process state transitions
Running
App
Suspende
d
App
suspending
Terminate
d
App
Low
Resources
Code gets to run
No code
runs
App not running
resuming
App gets 5s to
handle suspend
App is not
notified before
termination
Apps are notified
when they have
been resumed
User
Launch
es App
Splash
screen
App data vs. User data
User data
Documents
Photos
Music
Videos
App data
Settings
Files
Session
State
Local
Cache
Roaming
App uses data normally
Data syncs
for the user’s
Microsoft
account
Local
Storage
Windows Store
Unprecedented Reach
Optimized for Discoverability
Transparent Approval Process
Flexible Business Models
Maximizing Developer Revenue
The Windows Store
(more
later)
Hello World in C++/C#/JavaScript
Lab 1
Recap
Windows reimagined
A new Metro style UI where touch is a first-
class citizen along with full mouse-and-
keyboard support
New development models built on WinRT,
including native support for HTML/CSS/JS,
C#/XAML, C++/DirectX
Designed from the chipset up for multiple
form-factors – tablets, laptops, desktops & all-
in-ones
The Windows Store on every device with
a full commerce platform and flexibility