What is the value of separating interface from implementation in internet-based service-oriented computing?

StackOverflow https://stackoverflow.com/questions/14187529

Question

Are the reasons like in normal multi-module application programming - so a client can just use the interface without having to worry about implementation details?

Note that I am talking about WSDI/UDDI/SOAP and not normal application interfaces.

Was it helpful?

Solution

A WSDL has an abstract part and a concrete part and they are separate as to allow the reuse of these definitions. The same contract can be bound to many concrete network protocols and message formats.

This reuse of definitions, in the context of UDDI means one interface, multiple implementations.

One of the idea with UDDI was that needed web services could be discovered at runtime. And you can go inside the registry and look for implementations of a certain WSDL contract:

Beyond the Cookbook: Interfaces and Implementations

[...]

If three different companies have implemented the same WSDL file and a piece of client software has created the proxy/stub code for that WSDL interface, then the client software can communicate with all three of those implementations with the same codebase

[...]

At least that was the theory. In practice it turned out another way.

OTHER TIPS

The short answer is none. When you publish a Web service via a WSDL it doesn't matter how you have implemented it. The client application consuming your service, will generate the appropriate code from the WSDL, whether you have defined an interface for your backend Web service or not. That said, adding an interface to in front of a Web service, is rather a waste of time.

The pointy haired boss decides he'd like the application to work a different way, in a different sequence of screens because:

  1. His wives friend at the tennis club thinks it would work better that way.

  2. Rigorous user testing indicates a higher customer conversion rate based on a different application flow or sequence of usage steps.

  3. You want to provide white-label versions of your website (similar to a franchise).

In the above cases, one would only need to rewrite the graphical elements, the person doing so would not need to know anything about databases, or complex back-end data-processing.

Separating interface and implementation helps you keep your design loosely coupled. You can change the implementation independently from the interface as the requirements change.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top