A good way to send the results from a MySQL query over a Web Service?

坚强是说给别人听的谎言 提交于 2019-12-25 00:37:40

问题


I've been trying to figure out a good and easy way to send the results of a MySQL Query over my Web Service.

There is a lot of good methods that I've looked into, like Data Transfer Object, but I would like to keep it as simple as possible. At this point simply getting this to work has a higher priority. :)

Any help or documentation is welcome, even on more difficult topics, but as mentioned above the simpler the better at this point.


回答1:


when you say expose your results, do you also mean dynamic querying? such as Wcf Data Services

However be careful on what and how you expose information. It is a pain to go back and fix it.

for SOA or a 3 physical Tier I would consider using

  • Service Layer
  • Data transfer objects, they are great, exposing data directly can cause issues with maintainability/Changeability

to help with DTO's look at AutoMapper, it was designed for it.

if I have missed a point, add a comment

ps here is a great list of helpful patterns PoEAA Catalogue



来源:https://stackoverflow.com/questions/4137605/a-good-way-to-send-the-results-from-a-mysql-query-over-a-web-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!