1

Correct me if I'm wrong but I've heard that communicating with a database in Windows 8 will more than likely be done with WCF when working with C#/XAML.

If this is true then will this also be the case when working with HTML5/JS?

Jim G.
  • 8,006
  • 3
  • 35
  • 66
Ein Doofus
  • 357
  • 1
  • 5
  • 11

1 Answers1

3

On December 14th, 2011, Microsoft MVP Morten Nielsen said:

You can use HttpClient to download pretty much anything from the web. Why don't you configure your WCF service to return data as JSON, and use the DataContractJsonSerializer to deserialize the results?

In an HTML5/JS application, the DataContractJsonSerializer class obviously won't be available, but the balance of his advice still applies.


TL;DR

  • Configure your WCF service to return data as JSON.
  • And use a Javascript library such as datajs or jQuery on the client-side to communicate with your WCF service.

Emphasis: Microsoft may provide helper Javascript libraries to communicate with WCF services, but don't hold your breath. [Heck, they've already ruffled a few feathers by dropping the System.Data namespace for XAML apps.]

Until you hear otherwise, use a popular Javascript library to make it happen on the client-side.

Jim G.
  • 8,006
  • 3
  • 35
  • 66