获取 Web 服务并使用 android 来使用它们? [英] Getting a web service and using android to consume them?

查看:27
本文介绍了获取 Web 服务并使用 android 来使用它们?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在 youtube 上查找有关使用 android 使用 Web 服务的信息.大多数视频都是 1 或 2 年前的.这种做法过时了吗?有一个更好的方法吗?目前我在一家公司,我被分配到他们的网络服务的 android 版本.

I have been looking up on youtube regarding Web Services being consume using android. Most of the video are all 1 or 2 years old. Is this doing outdated? is there a better way to do this? currently i am in a company and i was assign to have a android version of their webservice.

有人告诉我使用 Visual Studio 用 sql 创建服务.创建 Android UI 并使用服务来拉取数据.

I was told to create the service with sql using Visual studio. Create the android UI and using the services to pull the data.

我做对了吗?

解决这个问题的更好或理想的方法是什么?

What is the better or ideal way of going about this?

我应该添加 JavaScript 或类似的东西吗?

Should i add JavaScript or something like that?

我一直在研究 RESTful、Soap、Json 和 Wcf.但是,如果我必须从头开始,最好的方法是什么?

I have been looking at RESTful , Soap , Json and Wcf. But what is the best way to go if i have to start everything from scratch?

-我正在使用的程序/系统.

-Programs/System that i am using.

  • Microsoft Visual Studio Express 2013 网页版

  • Microsoft Visual Studio Express 2013 for Web

SQL 服务器

IIS Express

IIS express

Android Studio

Android Studio

*我被告知只有 Visual Studio 的用户框架 4.0

*I was told to only user framework 4.0 for Visual studio

推荐答案

您可以使用 WCF (SOAP)、WCF (RESTful) 或 WebApi 来创建服务,两者各有优缺点.您可能需要花一些时间来查看您的需求,然后决定要开发的服务类型.SOAP 使用使用 XML 的更复杂的消息传递模式,而 REST 使用标准 HTTP 协议和方法来通信和传输数据.但是,如果您计划在各种应用程序(如移动、Web、桌面、客户端脚本交互等)中使用此服务,则可以考虑将该服务开发为 RESTful.更多关于 SOAP 和 RESTful 的信息以及详细的理解你可以参考这个链接了解 SOAP 和 RESTful

You can use WCF (SOAP), WCF (RESTful) or WebApi to create a service, both has it's own advantages and disadvantages. You may want to take some time to look at your requirement and then decide what type of service you want to develop. SOAP uses a more complicated messaging pattern using XML, where as REST uses the standard HTTP protocol and methods to communicate and transfer data. But if you are planning consume this service across of variety of applications like mobile, web, desktop, client side script interaction etc, you may consider developing the service as a RESTful. More information on SOAP and RESTful and for detailed understanding you may refer to this link Understanding SOAP and RESTful

这篇关于获取 Web 服务并使用 android 来使用它们?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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