검색결과 리스트
webapi에 해당되는 글 1건
- 2012.08.08 Web Service VS Web API
글
ASP.NET WEB API라는것을알게되어이에대해공부를하던중에아래와같은질문이생겼다.
WebAPI가정확히무엇인가?
그래서 Web API에대해정의를찾아보니아래와같았다.
WebAPI는웹을통해 API를제공하여프로그램적인기능을외부에서손쉽게사용하도록하여관련서비스를개발할수있도록제공하는공개된 API이다.
정의를보고나니다른질문이생겼다.
WebService와 Web API의다른점이무엇인가?
A Web service isa method of communication between two electronic devices over the Web (Internet).
Web API isa development in Web services (in a movement called Web2.0) where emphasis has been moving away from SOAP based services towards representational state transfer (REST) based communications.
참고 : http://en.wikipedia.org/wiki/Web_service
Web Services- that's standard defined by W3C, so they can be accessed semi-automatically orautomatically (WSDL / UDDI). The whole thing is based on XML, so anyone cancall it. And every aspect of the service is very well defined.
There'sparameters description standard, parameter passing standard, response standard,discovery standard, etc. etc. You could probably write 2000 pages book that'ddescribe the standard. There are even some "additional" standards fordoing "standard" things, like authentication.
Despite thefact that automatic invoking and discovery is barely working because clientsare rather poor, and you have no real quarantee that any service can be calledfrom any client.
Web API istypically done as HTTP/REST, nothing is defined, output can be eg. JSON/XML,input can be XML/JSON/or plain data. There are no standards for anything =>no automatic calling and discovery. You can provide some description in textfile or PDF, you can return the data in Windows-1250 instead of unicode, etc.
For describing the standard it'd be 2 pages brochure with some simple info andyou'll define everything else.
Web isswitching towards Web API / REST.
Web Services are really no better than WebAPI. Very complicated to develop and they eat much more resources (bandwidtchand RAM)... and because of all data conersions(REQUEST->XML->DATA->RESPONSE->XML->VALIDATION->CONVERSION->DATA)very slow.
Eg. InWebAPI you can pack the data, send it compressed and un-compress+un-pack on theclient. In SOAP you could only compress HTML request.
참고 : http://programmers.stackexchange.com/questions/38691/difference-between-web-api-and-web-service
위의두글을찾아보고내린결론은 SOAP WebService (Soap WebService만들기및테스트)를전통적인 Web Service라고하고, Web API를 Restful (WCF Restful WebService)으로봐야한다는것이다.
(물론위의결론은틀릴수있으므로빨간색으로처리해두니지나가시는나그네님중에서정확히아시는분이있다면조언부탁합니다. 두 개념의 비교 자체가 우스운 일이 아니길 바라면서...)
Restful을위의예에서는 WCF로만들었는데, ASP.NET Web API는MVC로만든다고하니 ASP.NET Web API나 MVC는나중에공부하기로하고이렇게정리하려고한다.
'-- ASP.NET' 카테고리의 다른 글
asp.net encoding 환경설정 (0) | 2012.09.06 |
---|---|
Web Role Remote IP Filtering (0) | 2012.09.04 |
ajax password strength check (0) | 2012.06.21 |
ASP.NET Ajax Accordion (0) | 2012.06.21 |
마스터페이지 (master page) (0) | 2012.06.21 |
RECENT COMMENT