开发者

WCF Data Service (ADO.Net Data Service or Astoria Service)

开发者 https://www.devze.com 2022-12-14 07:29 出处:网络
Does Astoria Service Model only support ATOM,JSON,XML,XML+HTTP Are formats like SOAP,WSDL,ASMX outdated? .So when i wish to develop SOAcan i ignore开发者_如何转开发 SOAP,ASMX,WSDL formats?I would ad

Does Astoria Service Model only support

ATOM,JSON,XML,XML+HTTP

Are formats like SOAP,WSDL,ASMX outdated? .So when i wish to develop SOA can i ignore开发者_如何转开发 SOAP,ASMX,WSDL formats?


I would add to the above answer and say there is in-fact a way to discover the metadata about the Data Services (REST) endpoint. Every endpoint includes a service document (just do a GET on the root of the endpoint) that describes the sets exposed by the service. Further, going to the $metadata endpoint from the root of the service (i.e. http://mydomain/myservice.svc/$metadata) returns an XML metadata document that fully describes the service (the sets, types, properties on types, relationships between sets, and service operations).


No, most definitely not!

ASMX = ASP.NET webservices - this is outdated, it was introduced in .NET 1.0 and basically replaced with WCF in .NET 3.0.

BUT: WCF is definitely NOT outdated! WCF is the Microsoft standard way of communicating between two systems. It uses SOAP (including WSDL and XSD) by default, and this is mature and reliable technology which works well in enterprise scenarios where you need things like data integrity, (human and machine readable) service description through WSDL and service metadata, and so forth. SOAP also offers more advanced features like reliable messaging and transactional support.

REST / ADO.NET Data Services is a more lightweight, easier-to-get-at approach at exposing services, but it's lacking in many ways: there's no unified service description available, so you cannot really "discover" what methods and what datatypes the service offer; either you have knowledge yourself, or the service provider gives you a documentation in plain English, but there's no standard way of describing a REST service to the outside world (yet). Also, you don't really know ahead of time what kind of data that service might return - there's no XML schema to stick to - it's more of a "let's hit the service and see what comes back" approach which might work quite OK in some cases, but not really in larger scale, enterprise-style environments.

So to sum up: the SOAP (WSDL,XSD) vs. REST debate is ongoing, both have their reasons to be, and I don't see one of them replacing the other - they're supplanting one another.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号