Tuesday, September 1, 2009

What is a Web Service ?


Before we explore about web services, lets pay attention to the lay man definition for the term - 'Service'. As I look for its definition in my Soft copy of Wordweb, it displays the Noun form of 'Service' as 'Work done by one person or group that benefits another'. Now, in programming terms - I can safely fit this definition as an application or subprogram that executes a unit a work as part of a business process implementation.

To standardise this definition furtherwe say that the service has got some characteristics as

- Loosely coupled. The service provider and consumer are loosely bound with each other. So, in a way - the consumer can easily shift to any other provider without issues.
- Separation of concerns so as to have an encapsulation of implementations. What would this mean > Ah... Well here, it means that as long as the interface (discussed below) remains constant, consumer or provider of service can change their implementation patterns without forcing the other party to make corresponding changes.
- Now, the common question that may strike us at this time is how would a consumer know about how to call this service made available by the provider. For exactly this reason, there is a service contract defined by the interface that the associated service implementation has to honour. WSDL (Web Services Definition Language) provides the standard way to expose the interface definition and the contract (operations performed).

I guess, we are ready to define Web Services now :
A web service is a discrete, reusable software component that is accessed programmatically over the Internet to return a response. Interaction with a Web service is based on a set of standard protocols and technologies called Web services. The term Web Services describes a standardized way of integrating Web-based applications using the open standards.

For Web Services, data and functionality is exchanged in XML format, SOAP [Simple Object Applications Protocol] is used to transfer the data, WSDL is used for describing the services available and UDDI is used for listing what services are available (like a telephone directory listing the names).

More on SOAP, WSDL and UDDI in next post. ;)

No comments:

Post a Comment