windows 8 coding, tools & windows azure mobile … · windows 8 coding, tools & windows...

53
Peter Kirchner Technical Evangelist Microsoft Deutschland [email protected] blogs.msdn.com/pkirchner twitter.com/peterkirchner Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013

Upload: ngoque

Post on 07-Apr-2018

218 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Peter KirchnerTechnical Evangelist

Microsoft Deutschland

[email protected]

blogs.msdn.com/pkirchner

twitter.com/peterkirchner

Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013

Page 2: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Windows 8

Page 3: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Installation von Apps

Page 4: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Store anatomy

Page 5: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Windows Store app acquisition

Page 6: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Building blocks of an app package

App Manifest contains all information needed to deploythe app

Blockmap contains hashes of all files within the app package

Signature validates the integrity of the app package

Page 7: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

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

Page 8: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Ausführung

Page 9: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Process state transitions

App gets 5s to handle

suspend

App is not notified

before termination

Apps are notified

when they have been

resumed

User

Launches

App

Splash

screen

Page 10: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Process Isolation

Page 11: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Entwicklung

Page 12: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Demos & Dokumentation

Umfangreiche Beispiele im Windows 8 SDK

http://code.msdn.microsoft.com/windowsapps

Windows Dev Center

http://msdn.microsoft.com/windows/apps

Page 13: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Windows 8 Platform

Page 14: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Windows Runtime APIs

Page 15: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Language projections

Page 16: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Roaming

Page 17: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Implementing Search

Page 18: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Search Anatomy

1. Search box is scoped to the main app on screen

2. Query suggestions provided by the main app on screen•Autocompletes to terms for

which the app has search results

3. List of installed Metro style apps that have implemented the search contract

Page 19: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

4. Result recommendations•Must include a thumbnail and title

• Indicates a strong or exact match result

•Takes users directly to the details of the result

5. Results•Show the count or not found

•Be pertinent

•Allow search refinement

with filters for example

Search Anatomy

Page 20: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Implementing Search

• Search contract sample (Windows SDK)

Page 21: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Implementing Share

Page 22: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Informationen teilen

Quell-App bietet Informationen zum Teilen an

Quell-App muss Ziel-Apps nicht kennen

Ziel-App empfängt Informationen und verarbeitet diese

Ziel-Apps muss Quell-Apps nicht kennen

Windows 8 orchestriert Kommunikationsfluss

Apps kommunizieren nicht direkt miteinander

Page 23: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Sharing From Source to Target

User selects “Share”,

active app is sent event

Activated for sharing

Registers with the

DataTransfer Manager

Filters list of Target

Apps and Quicklinks

User selects Target

App or Quicklink

Processes

DataPackage contents

Reports Complete

Completes Async

calls and returns

Receives event and

fills DataPackage

Activate Target

as kind shareTarget

Page 24: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Data Package

Plain text

Formatted text

URI

HTML

Images

Files

Custom data formats

Page 25: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Implementing Share

• Sharing content source app sample (Windows SDK)

• Sharing content target app sample (Windows SDK)

Page 26: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Live Tiles

Page 27: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Basic Tiles

Tap on tile to launch or switch to an app

Static default tile specified in app manifest

Both sizes can have live updates Square (1x1) Wide (2x1)

Page 28: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Live Tiles

Page 29: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with
Page 30: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Notification Queuing

Page 31: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Secondary Tiles

Page 32: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Live Tiles

• App tiles and badges sample (Windows SDK)

• Secondary tiles sample (Windows SDK)

Page 33: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Toast Notifications

Page 34: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Toast Notifications

Toast notifications deliver

transient messages outside the

context of the app

Use toast notifications to get

user’s attention immediately

User is in control and can

permanently turn off toast

notifications from your app

Allows quick navigation to a

contextually relevant location in

your app

Toast notifications are easy to

invoke from your app or from

the cloud

Page 35: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Toast Templates

Toast notifications use the same

template architecture as Live

Tiles

Rich set of rendering options

available

Page 36: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Toast Notifications

• Scheduled notifications sample (Windows SDK)

• Toast notifications sample (Windows SDK)

Page 37: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Windows Notification Service(WNS)

Page 38: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Windows Notification Service

Enables delivery of tile and toast notifications over the internet.

Tile updates and notifications shown to the user even if your app is not running.

WNS handles communication with your app

Scales to millions of users

WNS is a free service for your app to use

Page 39: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Push Notification Overview

1. Request Channel URI

2. Register with your

Cloud Service

3. Authenticate & Push

Notification

Page 40: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Stay Connected

• Background task sample (Windows SDK)

• Push and periodic notifications client-side sample (Windows SDK)

• Raw notifications sample (Windows SDK)

• Windows Azure Mobile Services

Page 41: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

What is Windows Azure Mobile Services?

Page 42: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Key ScenariosWindows Azure Mobile Services are ideal for:

Page 43: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Structured Storage

Structured Storage with SQL Database

If using single database apps are partitioned by schema

AppX.Todoitem

AppY.Todoitem

Manage data in

Portal

SQL Portal

SQL Management Studio

REST API…

Page 44: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Server Logic

Automatic service REST API generated for

storage

Dynamic Schema on/off

Ability to author server logic that intercepts

CRUD operation pipeline

Rich querying capability

Page 45: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Server Logic

Supported Modules + Globals

mssql

request

console

push

tables

statusCodes

mssql.query('select top 1 * from statusupdates',

{ success: function(results) {

console.log(results);

}

}

);

Page 46: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

REST API to SQL type mappings

JSON Value T-SQL Type

Numeric values (integer, decimal, floating point)

Float

Boolean Bit

DateTime DateTimeOffset(3)

String Nvarchar(max)

Page 47: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Push Notification Lifecycle Overview

1. Request Channel URI

2. Register with your Cloud Service

3. Authenticate & Push Notification

Page 48: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Push Notifications

Integrates with WNS to provide Toast, Tile and Badge notifications

Portal captures your WNS client secret and package SID

push.wns.* provides:

clean easy object model to compose notifications

Performs auth against WNS for you

Page 49: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Auth*

Authenticate against Windows Live

Table level permissions for each CRUD operation

Everyone

Anyone with the Application Key

Only Authenticated Users

Only Scripts and Admins

More granular control with server side scripts

user.level: {admin, authenticated, anonymous}

user.userId: id or undefined if not authenticated

Page 50: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Windows Azure Mobile Services

• www.windowsazure.com/mobile

Page 51: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Free offer during preview

Running on shared instances

10 Mobile

Services 1GB SQL

Database

No SLA during Preview. Only small instances available. Can upgrade to a reserved instance at 33% discount from normal Pay-As-You-Go rates during Preview.

Fro

m W

A F

ree Tria

l

Page 52: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with

Ressourcen für App-Entwickler

KOSTENLOSER APP-SUPPORT

Ihr direkter Einstieg www.msdn-online.de/myapp

App-Entwickler Hotline 0800 – 6087338 (kostenfrei aus dem dt. Festnetz)

E-Mail-Support [email protected]

KOSTENLOSE

VERANSTALTUNGEN

www.msdn-online.de/win8events

www.msdn-online.de/events

STUDENTEN-

ANGEBOTE

www.techstudent.de

MSDN DEVELOPER

CENTER

www.msdn-online.de/windows

www.msdn-online.de/windowsphone

www.msdn-online.de/azure

Page 53: Windows 8 Coding, Tools & Windows Azure Mobile … · Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013. ... Process state transitions App gets 5s to handle ... with