Why not just add http get support in config and that's done with the advantage that the service will be dual both SOAP AND REST?
What's all the buzz around rest ? What WCF will bring to this ?
I mean what's the difference from the viewpoint of a REST client application if I just set in my web.config for my asmx webservice to being able to accept get rest-like syntax
<webServices>
<protocols>
<add name="HttpGet" />
</protocols>
</webServices>
and a WCF REST impleme开发者_Python百科ntation http://geekswithblogs.net/.NETonMyMind/archive/2008/02/04/119291.aspx ?
seems nobody can really answer ... is it because it's hard or is it my question is stupid :)
Client only sees url (encapsulation principle) so why would I bother for more ? And what's the more that's still not clear :)
Other problem: if we switch to WCF, will we need to change url ? If yes that means all our hundred partners clients would be broken and I'll have to notify them of our change ?
WCF is nothing to do with the REST. You can build your own REST services without using WCF & SOAP stuff.. Check out this sample REST service build in .Net 2.0
and Check out the excellent .Net open source REST implementation
To understand more about REST, read these
- http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm
- http://en.wikipedia.org/wiki/Representational_State_Transfer
- What exactly is RESTful programming?
- REST / SOAP endpoints for a WCF service
- Understanding REST: Verbs, error codes, and authentication
To your comment:
if I have already an asmx webservice that can be converted to REST just in one line of configuration file ?
ASMX services are build upon SOAP, one more layer over HTTP. REST is simply a HTTP based, You can access(or call) your business resources the way you access the normal URLs. No more abstractions.
In REST, resources are identified by persistent identifiers(URLs).
For ex in products catalog system, by using asmx you create set of functions to add,update,delete products. like addProduct(),updateProduct, etc..
But in REST, you will be having single point of access, like http:\mysystem\prodcuts. To retrieve,add,update,delete products, you will be using respective HTTP verbs (GET,POST,PUT,DELETE) on the same URL.
So you cannot just convert asmx to REST, since both solves the problems in different way.
精彩评论