windows 8 coding, tools & windows azure mobile … · windows 8 coding, tools & windows...
TRANSCRIPT
Peter KirchnerTechnical Evangelist
Microsoft Deutschland
blogs.msdn.com/pkirchner
twitter.com/peterkirchner
Windows 8 Coding, Tools & Windows Azure Mobile Services 27.02.2013
Windows 8
Installation von Apps
Store anatomy
Windows Store app acquisition
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
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
Ausführung
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
Process Isolation
Entwicklung
Demos & Dokumentation
Umfangreiche Beispiele im Windows 8 SDK
http://code.msdn.microsoft.com/windowsapps
Windows Dev Center
http://msdn.microsoft.com/windows/apps
Windows 8 Platform
Windows Runtime APIs
Language projections
Roaming
Implementing Search
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
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
Implementing Search
• Search contract sample (Windows SDK)
Implementing Share
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
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
Data Package
Plain text
Formatted text
URI
HTML
Images
Files
Custom data formats
Implementing Share
• Sharing content source app sample (Windows SDK)
• Sharing content target app sample (Windows SDK)
Live Tiles
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)
Live Tiles
Notification Queuing
Secondary Tiles
Live Tiles
• App tiles and badges sample (Windows SDK)
• Secondary tiles sample (Windows SDK)
Toast Notifications
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
Toast Templates
Toast notifications use the same
template architecture as Live
Tiles
Rich set of rendering options
available
Toast Notifications
• Scheduled notifications sample (Windows SDK)
• Toast notifications sample (Windows SDK)
Windows Notification Service(WNS)
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
Push Notification Overview
1. Request Channel URI
2. Register with your
Cloud Service
3. Authenticate & Push
Notification
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
What is Windows Azure Mobile Services?
Key ScenariosWindows Azure Mobile Services are ideal for:
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…
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
Server Logic
Supported Modules + Globals
mssql
request
console
push
tables
statusCodes
mssql.query('select top 1 * from statusupdates',
{ success: function(results) {
console.log(results);
}
}
);
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)
Push Notification Lifecycle Overview
1. Request Channel URI
2. Register with your Cloud Service
3. Authenticate & Push Notification
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
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
Windows Azure Mobile Services
• www.windowsazure.com/mobile
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
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