我应该始终使用网络服务吗?
大家好,
我正在设计一个客户端-服务器应用系统。服务器提供 2 个功能:上传和下载图像。客户端(可能是 Iphone、Android、WP7...)使用这些功能向最终用户提供。
此时,我可以将服务器设计为网页(例如upload.php、download.php)以及webservices。两种方法都适合我。
我的问题是:我的设计使用网络服务或网页技术中的哪一个?为什么?
谢谢。
HI all,
I am designing an client - server application system. The Server provide 2 features: upload and download images. The clients (maybe Iphone, Android, WP7, ...) use these features to provide to end-users.
At this time, I can design the server as web-pages (such as upload.php, download.php) as well as webservices. Both ways work fine for me.
My question is: which one I use webservices or web-pages technical for my designing? And why?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
老实说,为此使用 SOAP 之类的东西似乎是很多不必要的努力。您可以使用表单编码数据和正确的查询字符串参数非常轻松地完成此任务,而无需经历构建 SOAP 信封和编写所有 XML 的麻烦。诚然,我描述的系统非常接近 REST Web 服务,所以我想这取决于您所说的“Web 服务”的含义。不管怎样,考虑到您所概述的相对简单的系统,我认为 SOAP 之类的东西不会给您带来很好的投资回报。
To be honest with you, using something like SOAP for this seems like a lot of unnecessary effort. You can very easily accomplish this using form encoded data and the right query string parameters without going through the trouble of building SOAP envelopes and writing all of the XML. Granted, the system I described is very close to a REST webservice, so I suppose it depends on what you mean by "webservice." Either way though, given relatively simple system you've outlined, I don't think something like SOAP will give you a very good return on your investment.