Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.