Friday, November 19, 2010

Joomla means carnage

Man oh man. I just got done futzing around with an XML RPC service plugin for Joomla. What a nightmare, like slogging up to your neck in feces for four hours.

Thing is, it isn't that complicated a problem, but trying to do things the "right" way is what makes it virtually impossible to accomplish.

First, there is little published information that is in any way self-consistent. Please don't tell me about the so-called "Master ..." book for Joomla. It is spotty at best. The information might be there, but it is so poorly organized that you have to jump around in the book to patch it together, making it that much more difficult to judge if you've gotten the pieces right.  Still, one can muddle through part of the way on that.

Second, how do you test it?  There is no admin side functionality for testing the RPC interfaces you enable. Isn't it a little bit mission critical to know if they work?

Third, none of the Joomla APIs appear to be very stable. Write something custom for it, and you're most  certainly guaranteed that custom code will break when you update. At least, you'll have to test it thoroughly before updating any production system that uses your code.

Fourth, debugging this stuff is one epic hack after another, just for the debug environment. I tried the PHP XMLRPC debugger and finally had to give up after being roadblocked in three completely different ways.

First, the xmlrpc feature had been left out of the "hardened" php test server.

Then the Javascript based debugger started firing off "OPTION" requests because the test server was running on the local network (The standards working group that came up with the rule of sending an OPTIONS header aught to be taken out back and stoned for that particular hack. At least, the browser should warn you it is deliberately ignoring the method of your request and pretending to be brain-dead.)

Then, when things didn't work, the debugger doesn't give you details, it just says "Didn't receive 200 OK from remote server. (send failed)". OK, um, DUH. What failed?

Well, best not to continue. Down that path lies madness.

No comments: