4

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.

blalasaadri
  • 5,990
  • 5
  • 38
  • 58
user2266817
  • 147
  • 2
  • 7
  • 17
  • The difference? The amount of code you need to write yourself. – BalusC Sep 19 '13 at 18:36
  • Here is a list with REST API with samples [https://www.google.co.uk/#q=REST+API+with+samples] Here – TheEwook Sep 19 '13 at 18:37
  • Related question (which is I think after all the same as you're trying to ask, but then much better phrased): http://stackoverflow.com/questions/7874695/servlet-vs-restful/ – BalusC Sep 19 '13 at 18:38
  • 1
    Thanks for the quick reply.That implies RestAPI and Restful webservices are one and the same.As am new to technology I could not phrase the question properly. – user2266817 Sep 19 '13 at 18:48

1 Answers1

2
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

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.

Restful web services may comes with custom modification for specific requirement and endpoint will be different.

Viji
  • 2,629
  • 1
  • 18
  • 30
  • :Thanks Viji.suppose am developing a webapplication in which I start an executable file from webpage instead of command line. This am doing by using Runtime.getExec() method using servlets. Can the same functionality be developed using REST API. Please let me know if I need to put this as a seperate question – user2266817 Sep 19 '13 at 19:08
  • Yes you can do it in web service and again, its depends on what response you want. – Viji Sep 19 '13 at 19:14
  • :Let us say that when I start the .exe file from webpage it gets started and show details like-.exe file is started and its status,like if it is active or shutdown – user2266817 Sep 19 '13 at 19:18
  • :Thanks for the quick reply. I appreciate it. – user2266817 Sep 19 '13 at 19:20