> SOAP is fine for simple stuff. That's what the S stands for. Any kind
> of generic RPC is hard, see CORBA.

SOAP was a great idea, unfortunatly the next versions of SOAP will make the
S (Simple) disappear. The O (Object) has already disappeared. SOAP will not
be an acronym anymore, but simply a word.

Explanations:
I've meet one of the writer of SOAP and WSDL draft specs and this group
doesn't intend to deal with Objects (understand "Object as Class
instances" - and not "Object as a piece of data") across the network.
Moreover, they will abstract even more from the underlying application the
client is calling. They intend to push developers to describe an interface
independant of their application to generate the WSDL file. So, let's say
you write a piece of code:

==========================
package Hello;

sub echo {
        my ($self, $msg) = @_;
        "Hello, I've received $msg";
}

1;
==========================

The simplest way to create a web service would be to create a WSDL file
describing just what you've developped:
a service called "Hello" with a method called "echo" accepting a string and
returning a string. So you could use automated tools to generate the WSDL
file directly from your code (WSDL::Generator for example). Easy.

... Too Easy ...

As you know, it's very important to publish interfaces that are stable and
don't need to be updated each time you change your classes. So it makes
sense to implement a "Facade" pattern (See Design Patterns book). A "Facade"
pattern hides the complexity and exposes a simple interface to the external
world. It is a good practice, but it's up to the developer to decide when to
develop a Facade for his code.

The authors of WSDL & SOAP standards want to make this obligatory
eventually. That means you'll have to create one more abstraction layer
between your code and the rest of the world, even if you don't want to. And,
even worse, if you have already done it, you'll still have to redescribe
everything in WSDL... As far as I understand it, it will make the automated
generation of code to WSDL more difficult... Looking at a WSDL file will
give no clue about the underlying code. SOAP will become more complex as an
effect.

I understand the motivations, but loosing the S (Simplicity) in SOAP is a
big mistake I believe. Having lost the O is already pretty bad.

Pierre Denis


Reply via email to