简体   繁体   中英

REST api vs REST Webservice vs RESTFul web service

REST (Representational State Transfer) is an architectural pattern/style. A service based on REST is called a RESTful service. What is Rest API ? and Is there any difference between Rest API, Rest Web service and Restfull web service ?

A RESTful web service is the implementation of the REST API (Application Programmable Interface) or the REST spec. In this case you are also creating an API with your endpoints that you create. In a sense they are actually the same thing and are just two terms that are interchangeable in the context of your question . The wording may be a little confusing but tl;dr; RESTful Web Service == REST API == REST Web Service for this situation

Outside of the context of the OP's question an API is not the same as a Web Service. An API can mean any interface or library used to interact with anything from code. This can be a smart dishwasher API or Web Sockets or cell phone SMS or even jQuery. In that same sense a Web Service is just a kind of API that provides information over the web.

API meansApplication Programming Interface . A REST API or RESTful API is an API that is compliant to REST. REST is usually implemented using web technology, but REST does not strictly require web technology to be used. An example of a RESTful API is a RESTful web service or a set of RESTful web services.

To summarize:

  • REST API = RESTful API
  • REST Web service = RESTful Web service
  • A set of one or more logically related RESTful Web services is an example of a RESTful API

The difference is merely a linguistic one. The difference between REST and RESTful is like the difference between BEAUTY and BEAUTIful. REST is a noun, whereas RESTful is an adjective.

Mainly, atleast in JAVA EE REST Web service is one with WADL definition like SOAP. and REST api don't have any such definition published

“REST”是一种架构范式,而“RESTFUL”则描述了该范式

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM