将Windows Phone 8应用程序连接到远程mysql数据库

将Windows Phone 8应用程序连接到远程mysql数据库

问题描述:

请像我两岁的孩子向我解释如何连接到远程MySQL数据库,传递查询和接收数据.如果需要该信息,我正在使用Linux服务器.我曾经有人在谈论JSON,对JSON进行序列化和反序列化或使用LINQ到JSON,但老实说,这对我来说是希腊语.任何示例代码和参考将不胜感激.

Please explain to me like a two year old on how to connect to a remote MySQL database, pass queries and receive data. I am using a Linux server if that information is needed. I have had people talking about JSON, Serializing and Deserializing JSON or using LINQ to JSON but honestly, this is Greek to me. Any sample codes and references will be appreciated.

电话无法直接与MySQL服务器对话,因此您需要将其分解为更简单的问题来解决-您需要一些东西可以与您的MySQL服务器进行通讯的网络服务器(一种API)上的em>,并将其转换为通过空中发送"的格式.然后,您需要在电话上将某些东西转换成有用的东西并对其进行处理(并可能将其缓存在客户端上).

The Phone cannot talk directly to the MySQL server, so you need to break this down into simpler problems to solve - you'll need something on a webserver (an API) that can talk to your MySQL server, and convert it to a format to send "over the air". You'll then need something on the phone to turn that back into something useful and do something with it (and potentially cache it on the client).

您可以在这里转向意见,实际预算,要求等方面,但是您可以可以构建一个受OAuth保护的RESTful API,该API使用基于HTTP的JSON传递给电话.同样,您可以构建一个SOAP Web服务,然后将其添加为服务参考.甚至将其构建在Azure之上.

This is where you veer into the realms of opinions and your actual budget, requirements, etc. but you could build a RESTful API, secured with OAuth, that uses JSON over HTTP for delivering to the phone. Similarly, you could build a SOAP webservice, and just add it as a Service Reference. Or even build it on top of Azure.