For sockets, System.Net for WP7 was upgraded for incoming listener sockets and Winsock for native development. But use the WinRT API adapted for Windows Phone
Windows.Networking.Sockets
On Windows 8 only, instead of System.Net.WebClient, use
System.Net.Http.HttpClient (totally async and efficient)
Windows.Web.Syndication.SyndicationClient
Windows.Web.AtomPub.AtomPubClient
WP8 needs to use WebClient and HttpWebRequest using TaskFactory.FromAsync() and extension methods.
WP8 does not support
new Task-based methods on desktop Windows 8 .NET for Windows Store Apps and .NET 4.5
which allow networking calls
as an asynchronous operaton using a Task object HttpClient API:
WebClient.DownloadStringTaskAsync(),
DownloadFileTaskAsync(),
UploadStringTaskAsync(), etc.
HttpWebRequest.GetResponseAsync()
On C# 5.0. The abstraction for managing interactions with asynchronous APIs is a Promise object which provides a mechanism to schedule work to be done on a value that has not yet been computed.
A promise implements a method for registering callbacks for state change notifications, named then.
myWebService.get("http://www.contoso.com") .then( function (result) { /* do something */ }, function (error) { /* handle error */ }, function (progress) { /* report progress */ } );
Instead of writing a single get action that force your code to wait for response.
AT&T provides developers (who pay $100 per year) its API Platform SDK for Microsoft .NET wrapper classes. All its modules use the ATT_MSSDK.RequestFactory class to manage connections and calls to the AT&T API Platform.
AT&T's Speech API converts audio messages to text. See my notes on Speech to Text> and Text to Speech>
AT&T's Device Location API it returns longitude and latitude coordinates along with acceptableAccuracy. It also supports A-GPS, speeding up the time it takes to pinpoint a device's location.
AT&T's Notary API signs payload content so that recipients can trust that it is unaltered and actually from the person who sent it.
AT&T's Send Push Message API makes use of WAP-enabled phones to simple WAP pages on smaller screens and limited input options.
AT&T's Send Push Message API
ASMX SOAP 1.1 web services using ASP.NET is considered old school now.
WCF requires use of BasicHttpBinding.
In Windows Phone projects, Add Reference automatically generate proxy classes.
For high-latency, slow, intermittent wireless data connections, the recommendation now is using lightweight REST + JSON Web Services.
SAMPLE CODE: Weather Forcast make asynchronous calls and processes data to the weather web service in a Windows Phone using the HttpWebRequest class.
SAMPLE CODE: Windows Phone 7 app calling a Representational State Transfer (REST) service using Windows Azure Active Directory Access Control (also known as Access Control Service or ACS).
SAMPLE CODE: Windows Phone 7 Twitter Silverlight 4 app and VS 2010.
Open standards: JSONP (JavaScript Objection Notation with padding) is used in client-side JavaScript webpage code to interact directly with the Live Connect REST API, with OAuth 2.0 authentication.
To exchange data with Microsoft web services (Hotmail, Windows Live Messenger, Microsoft SkyDrive, etc.). REFERENCE: Use the LiveSDK in your app referencing JavaScript Live Connect API for Windows 8 and web WL object (WL for Windows Live)
DOWNLOAD AND INSTALL: LiveSDK.msi (1,192,448 byte)
DO THIS: Use VS11 to open your project. Right-click References. Select Add Reference... Check Live SDK.
Select one of the js.live.net libraries:
<script src="//js.live.net/v5.0/wl.debug.js"></script> <!-- English Debug version --> <script src="//js.live.net/v5.0/wl.js"></script> <!-- English Production version --> <script src="//js.live.net/v5.0/ja/wl.js"></script> <!-- Japanese Production version --> <script src="///LiveSDKHTML/js/wl.js"></script> <!-- For Intellisense -->
Note the library is external.
OData.org V3 web protocol is followed by the WCF Data Services Client Library (DataServicesClient)
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <service xml:base="http://odata.netflix.com/Catalog/ "> <workspace> <atom:title>Default</atom:title> <collection href="Genres"> <atom:title>Genres</atom:title> </collection> <collection href="Titles"> <atom:title>Titles</atom:title> </collection> </workspace> </service>OAuth 2.0 Live Connect SDK
REFERENCE: Core Concepts
OAuth 2.0 is specified with the version number because OAuth 1.0 was a disaster involving PKI certificates.
Metro style apps using JavaScript will have no need to interact with cookies. Cookies are applicable only to web apps.
msdn.microsoft.com/library/live
The Live SDK Developer Guide describes the steps as
DO THIS: Use your Microsoft personal credentials to get an email of settings from the Windows Store Dashboard. Open Outlook.com (Hotmail) to copy the code and paste it on the page.
1) get a client ID
2) define
scope permissions such as wl.basic
First name and last name are obtained from a user's profile using a query using the Identity API
CAUTION: Don't show the user's gender and birth date on the screen. Such information is considered invasion of privacy by some users.
Save personalization settings for the signed-in user's experience on the website. Register a user on that website. Reading contacts
"This app is also used by" the current user's contacts by reading Contacts.