Published 2005-05-28 11:07:04

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....



Mentioned By:
google.com : silly acronyms (65 referals)
google.com : april (63 referals)
www.phpdeveloper.org : PHPDeveloper.org: PHP News, Views, and Community... (61 referals)
google.com : december (56 referals)
www.planet-php.net : Planet PHP (51 referals)
google.com : XMLHttpRequest Binary (28 referals)
google.com : XUL IE (22 referals)
google.com : XUL ActiveX (21 referals)
www.phpn.org : Of Silly Acronyms and XUL World domination... (19 referals)
www.phpdeveloper.org : PHPDeveloper.org: PHP News, Views, and Community (18 referals)
google.com : ajax binary data (16 referals)
google.com : stupid acronyms (16 referals)
www.midgard-project.org : Midgard Project - Midgard - Start at the top and reach higher (13 referals)
google.com : xmlhttprequest binary data (13 referals)
weblabor.hu : Of Silly Acronyms and XUL World domination... | Weblabor (12 referals)
www.phpn.org : Of Silly Acronyms and XUL World domination... - Alan Knowles (9 referals)
google.com : ajax binary (7 referals)
weblabor.hu : Weblabor | a fejlesztői forrás (5 referals)
planet.debian.org.hk : Debian HK : Debian @ Hong Kong (5 referals)
google.com : acronyms in the world (5 referals)

Comments

-
What's your problem with setting a class name in IE?
#0 - David ( Link) on 2005-05-28 17:05:48 Delete Comment
IE bugs
The problem with setting class attributes in IE, is that it doesnt behave as expected (which is a common problem the more js work you do..)

x = document.getElementById('someid');
x.setAttribute('class','someclass');

- In Mozilla, this is predictable.
- In IE, guess what... (and guessing is mostly what you do in IE!!)
#1 - Alan Knowles ( Link) on 2005-05-28 18:03:42 Delete Comment
Er, undocumented?
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/setattribute.asp

And of course you could just do:

x.className = 'someclass';

I'll give you that it's painful to debug JS in IE, but I don't think there's any need to be overly anti-MS.

BTW, how do you do your "Mentioned by" section? HTTP_Referer?
#2 - Richard Heyes ( Link) on 2005-05-28 20:11:37 Delete Comment
..
"painful to debug JS in IE"

Hmm, Microsoft Script Debugger, far better than anything i've seen for Mozilla/Firefox.

http://www.microsoft.com/downloads/details.aspx?FamilyId=2F465BE0-94FD-4569-B3C4-DFFDF19CCD99&displaylang=en

XUL isn't that great. XAML looks far more promising, especially if Mono picks it up.

#3 - Ren ( Link) on 2005-05-28 21:48:03 Delete Comment
REST
REST is more than just using POST and GET. It's a widely adopted term (unlike AJAX) based on Roy Fielding's dissertation from 2000:

http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm

I can send a POST request where the content is an XML document, and that would violate REST. In fact, it seems that most people who talk about it don't quite understand what REST means.
#4 - REST ( Link) on 2005-05-29 00:16:09 Delete Comment
REST
Agree iwth the previous comment. REST is about _correctly_ using POST and GET.
#5 - Gonzalo ( Link) on 2005-05-29 01:05:22 Delete Comment
OK, I'll bite
So sites which don't conform to a W3C standard but work on IE are bad but sites which don't conform to a WC3 standard but work on Mozilla are good?

(Posted using whatever crazy version of OPERA is on this 3-year-old Zaurus)
#6 - Aaron Wormus ( Link) on 2005-05-29 01:38:18 Delete Comment
AJAX and binary data
AJAX isn't not only for Plain POST and GET, it could support binary too ... Binary data could be sent using base64 encoding.
#7 - Hatem ( Link) on 2005-05-29 13:47:34 Delete Comment
Uh...what?
Other stupid acronyms we don't need:

CPU
CAT-5
RAM
XML
HTML
PHP
USA
UK

I read blogs and see people using these acronyms, and it's like reading bad code. Why don't they just use the full names so everyone is on the same page?

Eh...yeah. I've seen some people who dislike the term Ajax, but you don't offer any argument against the term whatsoever. Your only arguments are against acronyms as a whole.

Why is it even an issue? Some people use the term Ajax. Use it, or don't. The more fuss you make about it, the more it looks like you spend your time making fusses about shit that is completely irrelevant. The term isn't going anywhere, and it doesn't affect you: no one is forcing you to use it.
#8 - Chris ( Link) on 2005-05-30 01:02:37 Delete Comment
Ug.
This post reads like a "How to talk like a slashdotter" manual.

JUst say "separation of content and presentation" a few times, and you're in.

IE isnt perfect, and neither is ANY browser.
Either way, you're not going to kill off 90% of the browser share market any time soon.

(And I think it's pretty sad when a sites goal becomes eliminating a browser, rather than offering something of worth...)
#9 - Nate Cavanaugh ( Link) on 2005-05-30 02:50:45 Delete Comment
Put this to REST
REST actually refers to use of GET, POST, PUT and DELETE, and the implied authentication mechanisms involved.
#10 - RCA ( Link) on 2005-07-28 22:19:33 Delete Comment

Add Your Comment

Follow us on