1

I am not sure if this is the correct place to ask but since there are a lot of questions of this kind i ll go ahead and ask.

A year ago i developed an iOS application that was connecting to a server with HTTP requests exchanging JSON files etc. I was told at that time that the server was a web (REST) service. I didnt care much since for me was just a black box.

The last months i am developing a hybrid mobile application where i use native code + jquery mobile for the front end part and php + mysql for the back end part. The application is about registering new users to the data base , having users to subscribe in various kinds of events , get notifications on them etc. So for all the communication between the front ent(client) and back end(server) i make http requests(POST) , ajax calls using json files.

Is this a RESTfull Web Service? I am a bit confused on the definition of REST. According to wikipedia REST is :

REST-style architectures conventionally consist of clients and servers. Clients initiate requests to servers; servers process requests and return appropriate responses. 

So is what i am building a Restfull Web Service? Also do we call Rest only the server part or in general the client-server architecture?

Is it just a web Service? And if yes what kind of web service?

Johny Jaz
  • 875
  • 2
  • 13
  • 26
  • Sounds like you are probably following some of the conventions of a RESTful API without strictly following it. For one thing, you only POST to a RESTful API when you want to add a new resource. It sounds like you might be using POST to retrieve records. For reading resources you should use GET, and updating you should use PUT. See http://stackoverflow.com/questions/671118/what-exactly-is-restful-programming for more info. In answer to your question, is it a web service, I would say yes, with an ad-hoc implementation that probably doesn't fit into one of the more well known categories. – lreeder Jun 19 '13 at 18:17
  • Could you please give me an example of a service that is REst and one that is not? I still cant see the difference really.. – Johny Jaz Jun 20 '13 at 08:05
  • A RESTful API will operate on its domain objects as resources, using URIs to define those resources. The CRUD operations will be defined by the HTTP operations GET, PUT, POST, DELETE, and occasionally HEAD. One well documented REST API is the Amazon S3 API. See http://docs.aws.amazon.com/AmazonS3/latest/API/APIRest.html. – lreeder Jun 20 '13 at 22:40

1 Answers1

0

there is no difference when you invoke a controller (aka web service) from browser through http or from a client code (java, .NET or any language). when you want to invoke a service from outside world from your code.. you have choice of soap or rest .. soap is protocol, where as REST is an architecture style.. so REST is methodology of calling a service (which is simple http POST or GET call) from outside world .. not necessarily from a browser .. it may from client code which acts as browser to get response from outside world service..this is based on my experience..

pappu_kutty
  • 2,378
  • 8
  • 49
  • 93