non-RESTful vs. RESTful

21,831

Solution 1

in part A, what you wrote was just a HTTP end point. Its not a REST 'service'. Maybe you can check this link out for more explanation : What is the difference between HTTP and REST? Also, this link provides more info related to that - What is the advantage of using REST instead of non-REST HTTP?

Solution 2

REST is an architectural style (not a protocol like SOAP, not a technology itself or even not an implementation, it is basically a set of a rule), This architecture offers some constraints for using HTTP. If you stick by this architectural constraints while using HTTP, it is called RESTful, otherwise, it is not-RESTful.

list of these architectural constraints here. resource and more details wikipedia

Share:
21,831
Admin
Author by

Admin

Updated on September 03, 2020

Comments

  • Admin
    Admin over 3 years

    I am really new to programming, and having some trouble understanding the concept of RESTful APIs. I've read about REST and RESTful APIs. I've looked through the questions already asked here in SO, but can't seem to get any better understanding of the subject.

    In my network programming class I'm working with socket programming. There are two parts, part A and part B, in the task.

    In part A I've programmed a server that responds to GET and POST. The server either retrieves the file asked for by the client, or writes to the file. (HTTP-protocol is used).

    In part B I'm to use HTTP to implement a RESTful application. Basically it is a message server with the ability to handle GET, POST, PUT and DELETE. In this part the server is to create and interact with an xml-file. I understand how the methods work. But what I really don't understand is the following:

    Why is the server in part A non-RESTful, while it is RESFTful in part B?