Top Banner
Session 2 Daryl Rudolph
32
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Windows 8 DevUnleashed - Session 2

Session 2

Daryl Rudolph

Page 2: Windows 8 DevUnleashed - Session 2

Session II Agenda

• Sensors and Location• Web Services

• Azure• Rest• Odata

• Data binding / Sample Data• Isolated Storage• Data Roaming

Page 3: Windows 8 DevUnleashed - Session 2

Sensors and Location

Know your surroundings

Page 4: Windows 8 DevUnleashed - Session 2

Opportunities for sensor and location apps

• Make user experiences more relevant to the user’s location

• Enhance apps by adapting to the surrounding environment

• Every app can use simple sensor gestures• Easily create casual games and apps that use

sensors• Use sensor fusion to implement cutting edge apps

Page 5: Windows 8 DevUnleashed - Session 2

Sensor Fusion inputs and outputs (9-Axis)

Pass-Through

Accelerometer

3D Acceleromete

r

3D Gyro

3D Magnetomete

r

Sensor Fusion

Gyro

Compass

Inclinometer

Device Orientation

Page 6: Windows 8 DevUnleashed - Session 2

Windows.Devices.Sensors Namespace

Accelerometer

Gyro

Light Sensor

Raw Sensor Data

Inclinometer

Device Orientation

Compass

Sensor Fusion Data

Page 7: Windows 8 DevUnleashed - Session 2

Intermediate motion sensor scenarios

• Casual games• Labyrinth: Accelerometer• Gyro for twisting response

Page 8: Windows 8 DevUnleashed - Session 2

Basic app scenarios for sensors

RotateShake Flip

Page 9: Windows 8 DevUnleashed - Session 2

Light-aware apps – render for lighting

Dark

Indoors

Outdoors

Page 10: Windows 8 DevUnleashed - Session 2

Demo

NO DEMO Unless you have a sensor enabled laptop.Using Location in your application

Page 11: Windows 8 DevUnleashed - Session 2

LocationWhere am I??

Page 12: Windows 8 DevUnleashed - Session 2

Location scenarios

• Location• Search points of interest (POI)• Geo-tag photos and other content• Navigation• Location aware notifications

• weather, news , sports, coupons

• Many others…

Page 13: Windows 8 DevUnleashed - Session 2

Declare the need for Geolocation

Page 14: Windows 8 DevUnleashed - Session 2

Location-based user experience

Page 15: Windows 8 DevUnleashed - Session 2

Demo

Where am IUsing Location in your application

Page 16: Windows 8 DevUnleashed - Session 2

Communications and Data

Services, Isolated Storage, Data Roaming

Page 17: Windows 8 DevUnleashed - Session 2

DevicesSensor

sGeolocatio

nPortabl

eNFC

Communications & DataContracts

XML

Web

SMSNetworking

Notifications

Local & Cloud Storage

Streams

Background

Transfer

User InterfaceHTML5/

CSSXAML DirectX Controls

InputAccessibili

tyPrinting

Data Binding

TilesSVG

Windows 8 style application APIs

FundamentalsApplication

ServicesAuthenticati

onCryptograph

yGlobalizati

onMemory

ManagementThreading/Timers

MediaVisual Effects

Playback

PlayTo

Capture

Page 18: Windows 8 DevUnleashed - Session 2

DevicesSensor

sGeolocatio

nPortabl

eNFC

Communications & DataContracts

XML

Web

SMSNetworking

Notifications

Local & Cloud Storage

Streams

Background

Transfer

User InterfaceHTML5/

CSSXAML DirectX Controls

InputAccessibili

tyPrinting

Data Binding

TilesSVG

Windows 8 style application APIs

FundamentalsApplication

ServicesAuthenticati

onCryptograph

yGlobalizati

onMemory

ManagementThreading/Timers

MediaVisual Effects

Playback

PlayTo

Capture

Page 19: Windows 8 DevUnleashed - Session 2

Data Options In Detail• WCF Custom Services

• SOAP• REST

• Web Api• Part of MVC 4

• Local• Windows.Storage• SQLite

Page 20: Windows 8 DevUnleashed - Session 2

Demo

Show me the dataPulling a Rest Service into your application

Page 21: Windows 8 DevUnleashed - Session 2

Sample DataShow me something.

Page 22: Windows 8 DevUnleashed - Session 2

Demo

Show me the dataPulling a Rest Service into your application

Page 23: Windows 8 DevUnleashed - Session 2

Great apps deliver a continuous experience for your

customers as they switch between apps and PCs

Page 24: Windows 8 DevUnleashed - Session 2

Many ways to enable a continuous experience on one PC

Registry

Your Custo

m Format

Settings XML

and .ini Files

Cookies

Page 25: Windows 8 DevUnleashed - Session 2

Across many PCs?

Registry

Your Custo

m Format

Settings XML

and .ini Files

Cookies

Page 26: Windows 8 DevUnleashed - Session 2

Continuity across many PCs: today

• Register a domain• Setup your services and infrastructure• Figure out security and user management• Build sync infrastructure• Scale your service for millions of users

Or…

appData.roamingSettings.values[“restaurant”] = “Mario’s”;

Page 27: Windows 8 DevUnleashed - Session 2

App data vs. user data

User data

Documents

Photos Music Videos

App data

Settings

FilesSession State

Local Cache

Page 28: Windows 8 DevUnleashed - Session 2

One PC vs. many PCs

Local

Large caches for offline use

Offline storage for HTML5 based apps

Temporary data and device specific configuration data

Roaming

Small, key-value pairs for app settings

User context like where they left off in a book or video

Small configuration files in your custom format

Page 29: Windows 8 DevUnleashed - Session 2

How roaming works

LocalStora

ge

• Data syncs for the user’s Microsoft account

• App uses data normally

Page 30: Windows 8 DevUnleashed - Session 2

Demo

Saving to Isolated StorageFolder it

Page 31: Windows 8 DevUnleashed - Session 2

Hands-On Lab 2

Extending the Application

Page 32: Windows 8 DevUnleashed - Session 2