Download presentation
Presentation is loading. Please wait.
4
Simple for you while still delighting your users
7
Fundamentals Communications & Data Media Devices User Interface
8
HTTP APIs Socket APIs Background APIs Data APIs Information APIs Web services
9
HTTP APIs Socket APIs Background APIs Data APIs Information APIs Web services Talk #581 Talk #580 #58 1 Talk #580 #27 0 #13 4 #75 6 #798, … #41 0 #373, 807 #39 6 #78 4
10
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; });
11
Windows.Networking.Connectivity.NetworkInformation.addEventListener("networkstatuschanged", onNetworkChange); function onNetworkChange(event) { if (event.type == "networkstatuschanged") { // It is a good time to reconnect. }
12
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);
13
function 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); }
14
var writer = new Windows.Storage.Streams.DataWriter (socket.outputStream); var myString = "Hello"; writer.writeInt32(writer.measureString(myString)); writer.writeString(myString);
16
Try to Connect Wait for Change Notification (with timer+back off) Use the connection Still Working ? Worked ? YES NO YES
18
Eliminate the “bill shock” surprise factor
20
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’
22
// 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;
23
Normal 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.
25
Deployment is easier
28
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 Messenger Internet (Client & Server) Apps for sharing within the home Home/work networking Connect app together between PCs Near-field proximity
34
Recap
37
HTTP APIs PLAT-581T, Making apps social and connected with HTTP services Web 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 device Background 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 services Socket 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 WCF Other Networking TOOL-588T, Debugging connected Windows 8 apps
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.