Java RestAPI 和 Restful webservice 的区别
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18902421/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Difference Between RestAPI and Restful webservices
提问by user2266817
I am new to web-services. Could someone help me in understanding the difference between REST API and a Restful web-service in java. I have developed a web-application which is based on only servlets and jsp. Now the same application has to be developed using REST API. What is the difference between developing a web app with just servlets and jsp and developing a webapp with REST API. Can someone provide links to good tutorials where I can learn more about REST API with samples.
我是网络服务的新手。有人可以帮助我理解 REST API 和 Java 中的 Restful Web 服务之间的区别吗?我开发了一个仅基于 servlet 和 jsp 的 Web 应用程序。现在必须使用 REST API 开发相同的应用程序。仅使用 servlet 和 jsp 开发 Web 应用程序与使用 REST API 开发 Web 应用程序之间有什么区别。有人可以提供指向优秀教程的链接,我可以在其中通过示例了解有关 REST API 的更多信息。
采纳答案by Viji
A RESTful web API (also called a RESTful web service) is a web API implemented using HTTP and REST principles. It is a collection of resources
Reference : http://en.wikipedia.org/wiki/Representational_state_transfer
参考:http: //en.wikipedia.org/wiki/Representational_state_transfer
Sometimes, some organization might show little difference, Between REST API and Restful web services. For eg, Rest API might be common for everyone to use the data with same endpoint.
有时,某些组织可能会在 REST API 和 Restful Web 服务之间表现出很小的差异。例如,Rest API 可能对每个人来说都是通用的,以使用具有相同端点的数据。
Restful web services may comes with custom modification for specific requirement and endpoint will be different.
Restful Web 服务可能会针对特定需求进行自定义修改,并且端点会有所不同。