Arrrggggh, PAIN!

acme on 2002-08-19T14:36:31

If you were at the lightning talks at OSCON, you would know that the website architecture used for the new work project Vx is entirely based upon web services. Yup, SOAP baby. All of it. This is very cool, but until now we were completely deadline oriented. Last week I had a little time to think about writing standalone SOAP clients to the photo album website based upon it. Compare and contrast two days:

Friday: Finally get some time to work on standalone SOAP clients. I study the interface and knock up a standalone command-line SOAP client in Perl in about 100 lines of code. You pass it the image you want to upload and it uploads it via web services (instead of say, web browser upload). Cool:

% bin/upload ~/sheep.jpg
Uploaded /home/acme/sheep.jpg.

I thought a graphical tool would be nice, so I grabbed the office copy of "Learning Perl/Tk" and got a quick Tk app together in about half an hour (it even has a progress bar!). Tk isn't the prettiest thing, but it does the job.

My next step was Wx (Wx/GTK to be more precise). The docs for WxPerl are somewhat lacking, but I dug around in the main WxWindows distribution and eventually got a very nice Wx app together. It looks a lot more polished: the file selector is better, and it has a really good progress dialog.

So that was Friday. I felt good, had built three programs and I loved SOAP. Monday was different. I tried to build apps in languages other than Perl to do the same thing. Granted, I'm a Perl programmer, but I thought it'd be easy.

I start off looking at Java. I download the Apache SOAP toolkit and it requires the Java mail API for reasons I fail to understand (but I don't want to use that!) so I skip and head over to The Mind Electric's Glue, which requires WSDL to do anything. We don't have a WSDL file yet. Next I try Python. I haven't done much Python programming, and I try SOAP.py and ZSI. The former fails most of its remote tests and the latter gives a weird error when connecting to our SOAP::Lite server. Arrrgggh. I though the point about SOAP was that it was SIMPLE. Apparently not. I've given up. I'll let Java and Python programmers do this instead. The pain... the pain...

[Oops, almost forgot] I also completely failed to install PerlTk and WxMac under Mac OS X. Oh, and Camelbones was way too scary :-(


but perl can't do xml..

TeeJay on 2002-08-19T15:27:10

this puts paid to some of the FUD about Java's stronger and 'native' xml support.

Its all very having mature and stable xml support - but I'd rather have perls ability to 'just work'.

acme have you tried with .Net after all thats supposed to be where web services, xml and SOAP are at..

Re:but perl can't do xml..

ziggy on 2002-08-19T16:12:46

this puts paid to some of the FUD about Java's stronger and 'native' xml support.
That's not a fair assessment of what Leon described. Apache-SOAP had this dependency on mail handling, because as we all know, email is a key component in web services (and I'm only half joking).

In reality, the problem is with SOAP. It's a very big spec, difficult to implement fully (and properly!), so there are lots of interoperability problems. Had Vx been coded with Apache-SOAP from the start (in Java), then I suspect that a lot of these integration issues wouldn't crop up (but you'd have to deal with programming it all in Java).

The big problem sounds like the lack of WSDL files for the SOAP services. This is pretty much expected, since WSDL is a statically typed interface spec that can be autogenerated from Java/C# code reasonably easily; doing the same from dynamically typed Perl code is a much more difficult nut to crack. And having the WSDL code would help, but wouldn't eliminate all of the interoperability headaches between SOAP implementations.

At least SOAP::Lite just works. :-)

Re:but perl can't do xml..

acme on 2002-08-19T16:35:53

Right, Perl is just too dynamic for WSDL really. That's why Pierre thought up the very clever WSDL::Generator, so all we need to do is figure out why it doesn't work with 5.8 and then run the test suite with it installed. With any luck, a fully-specced WSDL will fall out. I'll try again when we have this...

another happy user

jouke on 2002-08-19T15:28:43

glad to see you've also discovered wxPerl :)

CamelBones

Matts on 2002-08-19T19:17:03

What did you find scary about CamelBones?

I really liked the ability to just *design* a GUI, and then plug perl events in to it.

Re:CamelBones

ask on 2002-08-19T23:49:46

CamelBones didn't seem scary when I played with it; but I couldn't consistantly grok the interface builder... What reference or tutorial did I miss? :-)

Re:CamelBones

Matts on 2002-08-20T06:38:50

Well so far I just followed the CamelBones tutorials, and then learned extra bits from the Apple docs (which are extensive). I've now also bought a Cocoa programming book, so that should also help quite a bit.