Wednesday, March 4, 2015

Web services - Part1

What is Web services ?

As per W3C definition a Web Service is a "a software system designed to support interoperable machine-to-machine interaction over a network."
where Interoperable machines means one macchine(system) can be using php application while another is using jsp or asp etc and network is a computer network which allows computers to exchange data.

In simple terms : A web service is a function that can be accessed by other programs over the web (Http).

A web service differs from a web site in that a web service provides information consumable by software rather than humans. As a result, we are usually talking about exposed JSON, XML, or SOAP services.Web services are a key component in "mashups". Mashups are when information from many websites is automatically aggregated into a new and useful service. For example, take real stock data provided by another site and combine it with a fake trading application to create a stock-market "game".

Again, a web service is something that a website chooses to offer to those who wish to read, update and/or delete data from your website. You might call it a "backdoor" to your data. Instead of presenting the data as part of a webpage it is provided in a pre-determined way where some of the more popular are XML and JSON. There are several ways to communicate with a webservice, some use SOAP, others have REST'ful web services, etc.

Why to use Web services ?

The main purpose of Web services is to allow communication between distributed applications.Before Web services other technologies existed that met the functionality of today´s web service like COM, DCOM, CORBA etc. the disadvantages of these technologies were
1. Dependency on certain platform e.g. for a client to use a method on a remote computer, both the client and the server should have had the appropriate DCOM or CORBA libraries installed on their computers.
2. There are some firewall restrictions on using DCOM as it was designed to use the TCP/IP protocol over a LAN or WAN.DCOM passed it's data as binary messages on non-standard ports. This meant many firewalls blocked such traffic.

Web services resolved these issues. let's see the benefits of Web services :

1. Heterogeneous Communication :  you can use any Web services client environment to talk to any Web services server environment, that is a web service client can be developed on J2EE environment and Web services server or service provider can be developed on .NET or Unix environment.As long as the application that provides the functionality is packaged as a Web service each of these systems can communicate with any other.

2. Ease to consume and easy to expose : Web Services are built on the top of existing and widely adopted Internet protocols such as HTTP, XML, TCP/IP , HTML).So, its easy to consume a Web service as client and expose a Web service as a Web service provider.

3. No Firewall restriction : Web services communicate using the XML.Since XML is a text based protocol that all applications can understand and Firewalls do not block Text information.

In my next blog we will see Web Services Standards and Architecture .

                                                                                                          Web services standards >  
                                                                                                          

No comments:

Total Pageviews