Web Service vs Web Application

前端 未结 11 564
别跟我提以往
别跟我提以往 2020-12-12 13:13

I know this is an old question and must have been answered hundred times already, but I am not able to find a satisfactory response as yet.

I am creating an applicat

11条回答
  •  醉梦人生
    2020-12-12 13:36

    At a low level web applications and web services are kinda the same thing. They both operatate over http(s). SOAP is just a well defined version of XML. REST is kinda just HTTP. If you wanted to, you could make a web application look like web services and visa versa.

    The main difference would be internal development options based on the platform you are using. If, for example, you are using Visual Studio then adding a WCF Service Application will give you a project which is by default geared towards WCF. But choosing any other application type won't stop you from adding Web Services.

    Using SOAP is generally a better option than plain old xml for these reasons:

    • Your users will be expecting it, and are likely to know how to read it already.

    • Your users' development environments will likely know all about SOAP and be able to interpret it out of the box. (If you provide a WSDL file then many users will be able to use a script to generate your classes in seconds.)

    • Your messages are more likely to be well defined. I am working on a project at the moment where the other side have defined their own random XML structure and it is a nightmare to work with. I never really know what to expect, and there is little consistency between their different message types. At least if they had agreed to conform to SOAP then I might have had a much easier time interpreting their messages.

提交回复
热议问题