Sunday, October 21, 2018

Web services tutorial for beginners

Web services are an important software concept. In order to get a basic knowledge of web services, view my 7-minute long, Web Services Tutorial with examples and more details, or read on...

What is web service? A web service is a software service that is provided via the web by one device to another device. Web services provide useful information like weather, stock market information, exchange rates and so on. A web service is a software application running on the web service provider. Web services do not have a user interface.

The technologies used to write the service provider and the client (consumer) of the web service may be different. This works because the service provider and client communication uses standard data formats like XML or JSON. For instance, a Linux web server may provide a web service to a Windows web server. The latter then uses the data it receives from the web service in its user interface that is shown to end-users. 

Why web services are needed? There are many advantages of web services:
  1. Web services are built with service-oritented architecture. The web service client just needs the web service URL to send requests.
  2. The server and the client may be located in different places.
  3. The server and the client may be written in different technologies like Java, PHP, C# etc. or be running on different operating systems like Unix, Linux, Windows etc.
  4. Web services are written to be consumed by other software applications. The client gets just the needed data in the response. This is easier for the client than having to extract data from a web page, which contains presentation elements too.
How web services work? This is explained in my graphic below:

There are two types of web services - SOAP and RESTful:

SOAP (Simple Object Access Protocol) web services - SOAP web services use XML for communication between the server and the client. You can write SOAP web service using different web service technologies. Since SOAP web services use XML data format, they are slow. Also, only WSDL (Web Services Description Language) is available to discover them.
Note: WSDL gives the message specification, methods' specifications and the location of the web service. The WSDL uses XML to describe the web service by showing web service methods and how the web service client can call them.

RESTful (Representational State Transfer) web services - RESTful web services are completely stateless. They can choose from plain text, HTML, XML or JSON data formats for communication between the server and the client. RESTful web services can also be written using different web service technologies. But they are faster because they don't need to follow the many standards that the SOAP web services need to follow. This means that they are better suited for consumption by mobile devices with less bandwidth. RESTful web services are much more popular than SOAP web services.

1 comment:

  1. I am a dietician and nutritionist in Dr Namita Nadar diet clinic. I also want to share some information to those who are looking for Best Dietitian For Weight Loss In Noida.
    Then Dr Namita Nadar diet clinic helps you to Weight Loss/ Management, Toning & Sculpting, Resistance Training, Muscle Building, Mobility / Flexibility, Planning & Periodisation for Acting and TV Roles Speed, Strength and Power Development,Nutritional Advice.

    Visit us at:-
    http://www.drnamitanadardietclinic.com/

    ReplyDelete