Friday, November 30, 2007

Is WSDL really a problem ?

I was reading a "REST : avoiding mistakes of SOAP toolkits" post from Steve Loughran. The post was not very different from other similar posts on the subject but there were at least 3 reasons I really wanted to comment. I might be stepping over a thin ice here :-), but I simply can't resist.

So here it goes. Steve 'Ant' Loughran says in his post that "Sanjiva 'Wsdl' Weerawana has stuck some slides comparing REST and WS-*". LOL. I hope Steve will appreciate it.

The post itself is quite interesting, and I think Steve actually concludes that the problem is not really to do with the use of description languages like WSDL but to the way the code generation works.

Lets forget about WSDL 1.1, SOAP encoding, and code-first services and the fact that one can have 100 operations described in WSDL. The problem of dealing with the generated code is universal and spans any type of services and both client and server runtimes, irrespectively of what description language you're using. While having no generated code makes the consumption of data more robust, the code generation is here to stay nonetheless. And there must be a way to make runtimes dealing with populating generated types smarter and client runtimes dealing with such types more adaptable to ignorable changes. And if changes are not ignorable it does not make that much of a difference what approach is used.

But it's really the Steve's 'association' with Ant which I wanted to comment upon in the context of the REST vs WS-* discussion.

Steve says in his "Migrating from Maven to Ant" post (I had hard time finding it, I remember reading it but couldn't find, Steve's blog shows the latest 20 pages, I found it on page 46, after I was about to give up :-)) :

"Maybe I should document how to move back from Maven back to Ant...Personally, I see many advantages of Ant above Maven, most of which come from the fact that the tool lets you do more complex things in your build process. Maven assumes that you are building and shipping components; Ant dictates less. Admittedly, this is personal opinion, but I getting tired of 'ant-sucks-maven-rules' propaganda"

I remember when I was reading it I was feeling the same. I didn't like Maven disrupting my comfort level I had with Ant. I really liked reading Java Development With Ant , it one of the best pragmatic books I've read, and I liked it as much as I liked Michael Kay's XSLT book. Because it taught me to think in Ant and not turn it into a programming language as far as dealing with dependencies is concerned. Then Maven came in. I still don't know how to write a simple 'mojo'. But it actually works and the strange thing is that many many projects use it, people complain but it delivers. Maven takes the dependency and build management to the extreme. If necessary you can go to the antrun plugin but doing so seems so low-level after dealing with Maven, or rather after Maven looking after all you need, as far as setting up target directories, etc, is concerned.

Now, in the above quote from Steve, replace 'Ant' with Web Services and 'Maven' with REST.
Sounds familiar :-) ? Sorry, may be it's only myself who finds the Ant vs Maven arguments so similar to the ones one can hear in REST vs WS debates

No comments: