简体   繁体   English

C#中Windows Phone的Web服务和服务器-客户端连接

[英]Webservices and Server-Client Connection with Windows Phone in C#

I have a local test server on my pc on which I already filled a MySQL database. 我的电脑上有一个本地测试服务器,上面已经装有一个MySQL数据库。 Now I would like to receive this data with my Windows Phone app and represent the data. 现在,我想通过Windows Phone应用接收此数据并表示该数据。 Currently, I've made ​​it awkward. 目前,我已经很尴尬了。 I have a PHP script on my server that represents the database. 我的服务器上有一个表示数据库的PHP脚本。 The app fetches the source code and parses it with the Html Agility Pack. 该应用程序获取源代码,并使用HTML Agility Pack对其进行解析。

But this version is too complicated right? 但是这个版本太复杂了吧? How can I do it better? 我该如何做得更好? I know something with webservices, but I do not know so much of them. 我对Web服务有所了解,但是我对它们并不了解。 Can someone explain to me in more detail? 有人可以向我详细解释吗? I heard from OData, but what should I do on my Apache Server and what should I do in my C# App? 我曾听过OData的消息,但是我应该在Apache Server上做什么以及在C#App中应该做什么? For the C# App there are examples. 对于C#App,有一些示例。 I feel so dumb because I really know nothing about web-services. 我感到很愚蠢,因为我对Web服务一无所知。 And the most tutorials don't help me. 大多数教程对我没有帮助。

You can implement SOA (Service Oriented Architecture). 您可以实现SOA(面向服务的体系结构)。 You should have a look to WCF : WCF Tutorial for beginners 您应该看看WCF: WCF初学者教程

The idea of web services is pretty simple. Web服务的想法非常简单。 You store some services on a server (services = C# functions) and you consume them on your client (which is you windows phone app). 您将一些服务存储在服务器上(服务= C#函数),然后在客户端(即Windows Phone应用程序)上使用它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM