将Windows Phone 8应用程序连接到远程mysql数据库 [英] Connecting a windows phone 8 application to remote mysql database

查看:87
本文介绍了将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服务器对话,因此您需要将其分解为更简单的问题来解决-您需要一些东西,并将其转换为通过空中发送"的格式.然后,您需要在电话上将某些东西转换成有用的东西并对其进行处理(并可能将其缓存在客户端上).

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.

这篇关于将Windows Phone 8应用程序连接到远程mysql数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆