This post originated from an RSS feed registered with PHP Buzz
by Alan Knowles.
Original Post: Of Silly Acronyms and XUL World domination...
Feed Title: Smoking toooo much PHP
Feed URL: http://www.akbkhome.com/blog.php/RSS.xml
Feed Description: More than just a blog :)
The highlight of this week was Sean's post describing how to use a Firefox extension to hide posts on planet-php, While I dont really agree with him that the ability to hide stuff is usefull (There's a scroll button on the right of the browser baby...!), It would far better if it would replace the current moronic acronyms being used by the PHP community...
AJAX = "using XMLhttpRequest" Rest = "using Plain old POST and GET!"
It's become like reading badly written code. The author makes up short names for everything, then 3 years later, it's gone out of fashion, and no-one has a clue what they where talking about (I clean floors with Ajax!)
I've been using XMLhttpRequest for quite a while with Plain old POST and GET to send and receive data for XUL applications. Ocassionally this spreads back to plain old HTML, doing things like auto address filling, postcode retreival.
In comparison to the complexity of SOAP or XMLRPC, 95% of web calls do nothing more than send some data, and recieve some data.. = which amazingly enough is what POST and GET do... Sending data via a standard HTTP request, just like a HTML form does, involves libraries which are much smaller than SOAP/XMLRPC.. and receiving data back can be flexible, a simple function may return a number or ERROR:......, a more compex one a simple XML document... - the great thing about these solutions is they are a breeze to debug.. - no more hunting down why SOAP types dont match on your client and app server...
Unfortunatly, As I have so painfully found, Javascript on IE is practically unusable, a place where undocumented, unexpected behaviour rules! (hint: try grabbing and setting the class name of a html element). This unfortunatly relegates using XMLhttpRequest to nothing more than 'pretty add-ons', unless you are prepared to invest a considerable amount of time working around IE's bugs. Often it's easier to go the simpler route, and Ban IE.
This week also brought up an interesting discussion at the office, on XUL and IE. I suggested that during the porting of some of the ASP(.net) applications to PHP, we also migrated them from (IE)HTML to XUL. This did bring up some questions like
what if the user is in an internet cafe and needs to use the applications?
do they have to install Firefox?
In reality they are ridiculous questions, Say bye-bye to security if you expect people to use them from an internet cafe... (even though Firefox has had a few minor security issues, none have been actively exploited yet, unlike it's competion.) So introducing Firefox to an office saves time, not adds it.. I also saw that someone had written a XUL ActiveX component for IE.. (so there is potential for the mentally challenged corporate types..)
But it did bring me on to thinking, that there are still some sites out there that only work in IE!, (HKMC is my latest example of idiots in Hong Kong = click the Check your eligabilty button). So why not start creating Mozilla only sites (preferably using XUL).. If the big names = planet-php / artima / etc. stopped supporting plain old HTML, IE would dissapear to a final and well deserved death... (and given a 15 year track record, I'd be amazed if IE7 was any better).
So beware, this blog may turn XUL only one day....... on our murder IE campaign....