REST Web Services
What is web service?
They are services which is
exposed to web and can be access by any programmer to use in their code.They are online API that are called from the code,e.g when you call other classes like SQL,Spring classes from your code in your java application you generally paste jar in lib directory of your java application and everything executes inside a single application.In Web service you have
different pieces of code that are deployed on different machine and you call
those by provided methods by API builders,like Use of FaceBook login for your web site
Web service Characterstic
1. Exchange of data over web: Usually client send request and server send response
client can have it's own logic to display to browser which is protocol when client make request and send message to server so these messaged are in format that both client and server
understands,SOAP web services use soap protocol Simple Object Access Protocol
Question : So what the protocol in REST ?
Answer: It's none
Answer: It's none
REST scan send message in any protocol ,send messages using XML, JSON, Text or any other new format as long as client and serer understand each other.
2. In HTTP there are different method to exchange message to server
Question :What are method in REST to exchange messages?
Answer: It's none
Question :What are method in REST to exchange messages?
Answer: It's none
3.Service Definition
What Service Definition when you are implementing any API you need know what API does and what it's return type , what to send parameter and what method to call.
In case of SOAP,WSDL(Web Service Definition Language) its the document which contain all the
information about API.
Question: What in case of REST ?
Answers : It's none
Answers : It's none
There are only Guidelines that are need to keep in mind in order to build REST web service but not any definition (so no standards).There is no rule to implement REST.
In case of SOAP for soap there are rule and if any soap
service do not follows any rule then that is not SOAP web service.
REST stands for Representational State Transfer
Concepts of REST are closely related to HTTP, HTTP(Hyper Text Transfer Protocol) you know is
everywhere on the internet every time you make request HTTP request is made to
server and server return HTTP response.Rest is inspired by HTTP specification So to understand REST so you have to understand HTTP concepts
itself.
Thanks for reading in next tutorial i'll cover HTTP concept. Till then stay healthy..
Thanks for reading in next tutorial i'll cover HTTP concept. Till then stay healthy..
I like it buddy
ReplyDeleteThanks bro!!
ReplyDelete