simple for you while still delighting your users
TRANSCRIPT
![Page 1: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/1.jpg)
www.buildwindows.com
Creating connected apps that work on today's networks
Peter Smith Program Manager Microsoft Corporation
PLAT-785T
![Page 2: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/2.jpg)
www.buildwindows.com
Agenda
How to create a great connected app• Simple for you while still delighting your users• Eliminate “bill shock” surprise factor for users• Ease deployment hassles & boost user confidence
You’ll leave with• Examples and code snippets that you can use when
building your apps• Tips and techniques to make it easier to build great
connected apps
![Page 3: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/3.jpg)
www.buildwindows.com
Photo viewer
demo
![Page 4: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/4.jpg)
Simple for you while still delighting your users
![Page 5: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/5.jpg)
www.buildwindows.com
We all want to make rich, connected apps without a lot of coding.
![Page 6: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/6.jpg)
www.buildwindows.com
The Windows 8 Metro style app platform is designed just for that.
![Page 7: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/7.jpg)
www.buildwindows.com
FundamentalsAuthenticat
ionCryptograp
hyGlobalizati
on.NET Win32App
Lifetime
Communications & Data
Contracts XML Web
NetworkingNotification
s
Local & Cloud StorageMedia
Capture
PlayTo
Devices
Sensors
Geolocation Portable
Devices
NFC
User InterfaceHTML5 /
CSSXAML DirectX Controls
Input Accessibility Printing
Data Binding
Tiles
Streams
Background Transfer
SVG
AtomPub
SMS
Printer
Visual Effects
Transcoding
APIs make it simple to build Metro style apps
![Page 8: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/8.jpg)
www.buildwindows.com
HTTP APIs
Socket APIs
Background APIs
Data APIs
Json XML Streams
DataReader/DataWriter
Cost
Information APIsDownlo
ad
Web services
Skydrive
TCP sockets
UDP sockets
SSL socketsWeb
Sockets
AtomPubRSS
Network Information
Proximity sockets
Live ID
Upload
APIs make it simple to build Metro style apps
Xbox Live Azure
HttpWebRequest
HttpClient
XHR
IXHR
WCFAtom
RTCPush
NotificationCost
![Page 9: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/9.jpg)
www.buildwindows.com
HTTP APIs
Socket APIs
Background APIs
Data APIs
Json XML Streams
DataReader/DataWriter
Cost
Information APIsDownlo
ad
Web services
Skydrive
TCP sockets
UDP sockets
SSL socketsWeb
Sockets
AtomPubRSS
Network Information
Proximity sockets
Live ID
Upload
APIs make it simple to build Metro style apps
Xbox Live Azure
Web Services
HttpClient
XHR
IXHR
WCFAtom
RTCPush
NotificationCost
Talk #581
Talk #580
#581
Talk #580
#270
#134
#756
#798, …
#410
#373, 807
#396
#784
![Page 10: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/10.jpg)
HTTP APIs: Syndicating a News Feed
var syndicationClient = new Windows.Web.Syndication.SyndicationClient();
syndicationClient.retrieveFeedsAsync(uri).then(function (feed) { this.title = feed.title.text; this.image = feed.imageUri; this.summary = feed.subtitle.text; this.lastUpdatedTime = feed.lastUpdatedTime;});
![Page 11: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/11.jpg)
Information APIs: Network ChangeWindows.Networking.Connectivity.NetworkInformation .addEventListener("networkstatuschanged", onNetworkChange);
function onNetworkChange(event) { if (event.type == "networkstatuschanged") { // It is a good time to reconnect. }}
![Page 12: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/12.jpg)
var uri = new Windows.Foundation.Uri ("http://example.com/data.iso");var folder = Windows.Storage.KnownFolders.documentsLibrary;folder.createFileAsync("download.iso").then(function (file) { var downloader = new Windows.Networking .BackgroundTransfer.BackgroundDownloader(); downloader.startDownloadAsync(uri, file). then(function () { // Got the file with name 'file'. }, onError, onProgress);}, onError);
Background APIs: BackgroundTransfer
![Page 13: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/13.jpg)
Sockets APIs: WebSocketsfunction quickLaunch() {
socket = new Windows.Networking.Sockets.StreamWebSocket();
socket.connectAsync(uri).then(function () {
writer = new Windows.Storage.Streams.DataWriter
(socket.outputStream);
writer.writeString("f");
writer.storeAsync().then(
function () { socket.close(); socket = null; }, onError);
}, onError);
}
![Page 14: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/14.jpg)
Data APIs: using DataWriter
var writer =
new Windows.Storage.Streams.DataWriter (socket.outputStream);
var myString = "Hello";
writer.writeInt32(writer.measureString(myString));
writer.writeString(myString);
![Page 15: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/15.jpg)
www.buildwindows.com
People want to take your app everywhere.
![Page 16: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/16.jpg)
www.buildwindows.com
Work smoothly across networks
Try to Connect
Wait for Change Notification
(with timer+back off)
Use the connection
Still Workin
g?
Worked?
YES
NO NO
YES
![Page 17: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/17.jpg)
www.buildwindows.com
Network change awareness in Photo Viewer
demo
![Page 18: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/18.jpg)
Eliminate the “bill shock” surprise factor
![Page 19: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/19.jpg)
www.buildwindows.com
Users take their apps everywhere!
![Page 20: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/20.jpg)
www.buildwindows.com
Let’s end “bill shock” for users
Mythbuster Adam Savage fights $11,000 bill with Twitter army
Teen runs up dad’s cell bill to nearly $22,000
Customer Gets $62,000 Bill for Downloading Movie
Canadian man racks up $85,000 cell phone bill
FCC: 1 in 6 cell phone users have had ‘bill shock’
![Page 21: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/21.jpg)
www.buildwindows.com
Windows 8 exposes network cost information – more visibility means
less surprises
![Page 22: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/22.jpg)
Sample: getting cost information// Use NetworkInformation.getInternetConnectionProfile().// You can also get this on a per-socket basis.var cost = new Windows.Networking.Connectivity
.NetworkInformation.getInternetConnectionProfile()
.getConnectionCost();
cost.networkCostType; // One of: unrestricted, unknown, fixed, variable.
cost.approachingDataLimit;
cost.overDataLimit;cost.roaming;
![Page 23: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/23.jpg)
www.buildwindows.com
Customize your app to network typeNormal
• Network state:• unrestricted• unknown
• Behavior: No restrictions on data transfer.
• Examples: stream HD, download hi-res pictures, retrieve mail attachments.
Conservative
• Network state:• fixed• variable
• Behavior: Transfer “less” data. Provide user override option.
• Examples: stream lower quality video, download low-res pictures, only retrieve mail headers.
Opt-In
• Network state:• roaming• overDataLimit
• Behavior: Transfer no data. Prompt user to override.
• Examples: no mail retrieved, video stops, can’t get weather info by default.
![Page 24: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/24.jpg)
www.buildwindows.com
Cost awareness in Photo Viewer
demo
![Page 25: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/25.jpg)
Deployment is easier
![Page 26: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/26.jpg)
www.buildwindows.com
You want to install your app but have to handle firewalls.
![Page 27: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/27.jpg)
www.buildwindows.com
Windows 8 Metro style apps will install with firewall rules – automatically!
![Page 28: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/28.jpg)
www.buildwindows.com
Capabilities for the apps you want to build
• Social networking apps• Syndication Apps• Apps using web services like maps, weather
Internet (Client)
• Peer to Peer applications like Instant MessengerInternet
(Client & Server)
• Apps for sharing within the homeHome/work networking
• Connect app together between PCsNear-field proximity
![Page 29: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/29.jpg)
www.buildwindows.com
People want to try new apps.
![Page 30: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/30.jpg)
www.buildwindows.com
But people aren’t confident: what will this app do?
![Page 31: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/31.jpg)
www.buildwindows.com
Capabilities solve this, too.
![Page 32: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/32.jpg)
www.buildwindows.com
Recap: capabilities make deployment easier, and increase user confidence.
![Page 33: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/33.jpg)
www.buildwindows.com
Network capabilities in Photo Viewer
demo
![Page 34: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/34.jpg)
Recap
![Page 35: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/35.jpg)
www.buildwindows.com
Great apps are connected.
![Page 36: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/36.jpg)
www.buildwindows.com
Windows 8 provides a rich platform for enabling great connected experiences
![Page 37: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/37.jpg)
www.buildwindows.com
Related sessions
HTTP APIs• PLAT-581T, Making apps social and connected with HTTP servicesWeb Services• PLAT-134C, The complete developer's guide to the SkyDrive API• PLAT-756T, Building Xbox LIVE games for Windows 8• APP-784T, Power your app with Live services• SAC-798T, Building Web APIs in Windows Azure with WCF to reach any deviceBackground APIs• APP-396T, Using tiles and notifications• APP-410T, Real time communication: keep your Metro style app connected whether it is
running or suspended• PLAT-581T, Making apps social and connected with HTTP servicesSocket APIs• PLAT-270T, Connecting and sharing with near field communication• PLAT-373C, Building real-time web apps with HTML5 WebSockets• PLAT-580T, Building Windows runtime sockets apps• SAC-807T, Building real-time web apps with WebSockets using IIS, ASP.NET and WCFOther Networking• TOOL-588T, Debugging connected Windows 8 apps
![Page 38: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/38.jpg)
www.buildwindows.com
For more information
Documentation & articles• Networking• Managing network communications with sockets
Contact• Please visit the forums on the Windows Dev Center at
http://forums.dev.windos.com
![Page 39: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/39.jpg)
www.buildwindows.com
• Feedback and questions http://forums.dev.windows.com
• Session feedbackhttp://bldw.in/SessionFeedback
thank you
![Page 40: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/40.jpg)
© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to
be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
![Page 41: Simple for you while still delighting your users](https://reader035.vdocument.in/reader035/viewer/2022062321/56649ebd5503460f94bc6d75/html5/thumbnails/41.jpg)