loge.hixie.ch

Hixie's Natural Log

2005-03-20 17:30 UTC Call an apple an apple

Several years ago, HTML was invented, and a few years later, JavaScript (then LiveScript, later officially named ECMAScript) and the DOM were invented, and later CSS. After people had been happily using those technologies for a while, people decided to call the combination of HTML, scripting and CSS by a new name: DHTML. DHTML wasn't a new technology — it was just a new label for what people were already doing.

Several years ago, HTTP was invented, and the Web came to be. HTTP was designed so that it could be used for several related tasks, including:

People used this for many years, and then suddenly XML-RPC and SOAP were invented. XML-RPC and SOAP are complicated ways of executing remote procedure calls on remote hosts using a structured set of arguments, all performed over HTTP.

Of course you'll notice HTTP can already do that on its own, it didn't need a new language. Other people noticed this too, but instead of saying "hey everyone, HTTP already does all this, just use HTTP", they said, "hey everyone, you should use REST!". REST is just a name that was coined for the kind of architecture on which HTTP is based, and, on the Web, simply refers to using HTTP requests.

Several years ago, Microsoft invented XMLHttpRequest. People used it, along with JavaScript and XML. Google famously used it in some of their Web pages, for instance GMail. All was well, another day saved... then someone invented a new name for it: Ajax.

It's psychotic! People keep creating new ways to refer to existing technologies. The worst of it is it's really confusing to those of us who develop these technologies! The other day a reporter contacted some WHATWG members to ask what the relation between Ajax and WHATWG was. That was the first time I heard the name. And now everyone is talking about Ajax as if it's some sort of new technology, despite the fact that people have been using it for years.

So I have a request: could people please stop making up new names for existing technologies? Just call things by their real name! If the real name is too long (the name Ajax was apparently coined because "HTTP+XML+HTML+XMLHttpRequest+JavaScript+CSS" was too long) then just mention the important bits. For example, instead of REST, just "HTTP"; instead of DHTML just "HTML and script", and instead of Ajax, "XML and script".

Pingbacks: 1 2 3

2005-03-18 01:03 UTC CSS2.1 is CSS2

Just to clarify something about CSS2.1.

The name "CSS2.1" is short for "CSS Level 2, Revision 1". It's an update of the earlier W3C CSS2 Recomendation. CSS2.1 is still "CSS2", it's just the revised version.

When someone asks for a browser to support CSS2, it is implied that what they want is for the browser to support the current revision of CSS2, namely, CSS2 revision 1.

CSS2.1 is in CR, which is the call for implementations stage. It is appropriate for implementors to implement CSS2.1. It is not a draft. The only changes that will be made to the CSS2.1 spec are changes in response to implementors finding errors in the specification, such as contradictory requirements or ambiguities. CSS2 revision 1 is much more implementable than the original CSS2 Recommendation, since it is simply that recommendation, with several years of editorial work applied to fix all the mistakes the working group has found and been told about.

(Note that CSS2.1 and CSS2 are at the same state in the W3C process — they are both at the "call for implementations" stage. The difference is that the name of that stage changed between 1998 and 2004. What used to be called "REC" or "Recommendation" is now called "CR" or "Candidate Recommendation". The new stage currently called "Recommendation", which indicates that the specification has reached a very high level of implementation maturity, didn't exist back in 1998.)

Once again. CSS2 has been updated. The update is called CSS2 revision 1, or CSS2.1 for short. CSS2.1 is still CSS level 2. CSS2.1 is what CSS implementations should be using as reference if they want to implement CSS level 2.

Pingbacks: 1

2005-03-17 23:18 UTC The Other Guys

Last week, Nadia, Alex, and Aly planned to go to Prague to visit the city with a friend of Aly's who is in Prague. Since I've wanted to visit the city for some time, I took the opportunity to go there myself to meet up with them.

Nadia lost her passport, so never made it. The friend with whom we were staying had asked one of his friends, Mike, whether he could house a couple of us, and then went off with Aly to go skiing, so it ended up being Alex, Mike and myself, who had never met before, visiting the city together.

We drank "to random friends", which seemed appropriate.

Prague itself is beautiful. Most of the buildings in the city are very old, many of the roads are paved with cobblestones (and kept that way, unlike in Oslo where cobblestones are repaired by pouring tarmac into the holes). The public transport system is probably the best I've ever seen, in every respect: frequent, punctual, very modern vehicles, cheap, 24 hour service, good coverage, well maintained tracks.

Many people there speak English, more so than in Germany, although less so than in Oslo. It snowed most of the time we were there.

On Saturday I visited The Castle, met up with Mike and Alex, and then visited The Clock, The Bridge, and The Wall. On Saturday evening we went to a tiny Jazz club and listened to a local band called "Vertigo Quintet", who were very good. On Sunday we did some more sightseeing. One building we passed, the Dancing House or something, looked very funky.

It's like a big broken plastic building.

I have a theory as to why it looks the way it is. I picture the following scene, a few months before construction began: the architect looks at his carefully constructed paper and plastic model sitting on the desk where he is about to present it to his customers and their investors. He carefully lays a white sheet over the model, after making one final check.

He then goes down to meet them at his office's reception, so that he can escort them to his office. In the meantime, the catering staff enter the office and bring the drinks for the meeting. Before leaving, the caterer sits back on the desk in the middle of the room, admiring the view out of the window. A crunching sound emanates from under the sheet, and the caterer jumps up in panic, smoothes down the sheet, and runs out of the office.

In walks the architect and his customers and their investors. He begins talking about how the design is a brilliant symbol of power and modern design, a carefully calculated speech that forstalls any objections that the customers might make, since he doesn't want to spend another six months designing a new building. As he finishes his explanations for the design, he yanks the sheet covering the model, showing the model in all its crumpled and broken glory. "Amazing!" exclaims the customer, who was taken in by the speech, before even looking at the model. "I love it!", says the lead representative from the investor's side, for the same reason. The other representatives all agree that this is clearly a brilliant design, not wanting to cross their bosses.

The customers agree to the design, and leave, before the architect has any chance to explain that this is not the design he had in mind.

On Sunday evening we played Settlers of Catan Travel Edition. Great game. I bought it a few weeks ago but this was the first time I'd played it (Alex brought it with him, by the way, not me!). Kam, Wilhelm and I played it on Tuesday as well. It is good.

Then Aly and her friend came back from skiing and we all went bar-hopping. We settled on a cocktail bar where I sampled a number of drinks, although to be honest I thought the strip club we tried before it would have been more fun.

On Monday we visited the zoo, where a lovely cat came and sat on me and purred, much to my happiness. And there were other cool animals too, I guess.

Altogether, I liked Prague very much.

2005-03-08 21:18 UTC XForms myths

I'm getting tired of hearing XForms advocates say things that are either misleading or clearly wrong, so here's a quick list of myths, or misleading truths, about XForms, which I have heard recently (most particularly during the multiple demos of XForms software at the plenary in Boston last week).

XForms is declarative

XForms has declarative aspects, just like HTML. But it isn't exclusively declarative. XForms in fact introduces a primitive XML-based scripting language (called XForms Actions) to perform imperative actions.

For example, you can use the setfocus element to set the focus to another element, or the load element to make the UA follow a link.

Scripting is bad for accessibility

False. Scripting doesn't hurt accessibility. What hurts accessibility is when semantically meaningless elements are given some sort of device-specific behaviour (for example, making a div into a checkbox or a scrollbar, or using the font element for headers).

Script is harder to maintain than XPath expressions

False. It depends entirely on what you're doing. The reason most JavaScript on the Web is a mess is because it is badly written; the same would happen to XPath if the same authors used that instead.

HTML mixes presentation and content — XForms doesn't

False. HTML doesn't mix presentation and content — authors do. XForms doesn't prevent the two from being mixed, in fact one of the big things people are pushing these days is SVG+XForms, which is the ultimate mix of presentation and content.

XForms is better than HTML because it is media-independent

False. Both HTML and XForms are as media-independent as each other. If XForms is better it has nothing to do with one or the other being media-independent.

HTML mainly specifies how the control should look, while XForms specifies what the control should do

False. HTML doesn't specify how the controls should look at all.

HTML has limitations, so it had to be replaced with XForms

False. It's easier to fix HTML than to replace it with an entirely new language.

HTML requires authors to use hacks; XForms doesn't because is cleanly designed

False. HTML doesn't require authors to use hacks, browser bugs do. And there's no reason to believe that XForms UAs will be any less buggy than HTML UAs, if it's the same programmers writing both UAs.

To demonstrate some of these points, I took the XForms Calculator example, which was used as an example of some of XForms' power at the W3C Plenary last week, and made an HTML version.

Note that I didn't fix any of the bugs in the sample — there are a number of ways in which this demo is broken. I just converted the existing XHTML1+XForms+XForms Actions+XPath to the exact equivalent HTML4+JavaScript+DOM to see how it would compare.

Feature XForms version HTML version
Media independent? Yes Yes
Mixes content and presentation? Yes Yes
Mixes logic and UI? Yes Yes
Could be written so that the presentation, UI, and logic layers were all separated? Yes Yes
Uses imperative scripting constructs? Yes, e.g. to set the operation of the "=" button:
<xf:toggle case="add"/>
Yes, e.g. to set the operation of the "=" button:
operation = add;
Uses declarative constructs? Yes, e.g. to register an event listener:
<xf:action ev:event="DOMActivate">...</xf:action>
Yes, e.g. to register an event listener:
onclick="..."
Markup for the cell that contains the "9" button
<td>
 <xf:trigger>
  <xf:label>9</xf:label>
  <xf:action ev:event="DOMActivate">
   <xf:setvalue ref="/equation/displaybuffer"
                value="/equation/displaybuffer * 10 + 9"/>
   <xf:setvalue ref="/equation/display"
                value="/equation/displaybuffer"/>
  </xf:action>
 </xf:trigger>
</td>
<td>
 <button onclick="display = displaybuffer
                          = displaybuffer * 10 + 9; update();">
  9
 </button>
</td>
Number of namespace prefixes 174 0
File size 9.4KiB 3.9KiB

Pingbacks: 1

2005-03-08 16:05 UTC Desperate Measures

It finally got to me. The amount of spam I was receiving finally hit a critical point. I was off the grid for a couple of days, and of the 938 e-mails I had when I got back, half were from automated systems (like Bugzilla), and half were spam, with the remainder (like half a percent or something) being from the three or four dozen mailing lists I'm subscribed to. I think there was one interesting e-mail out of the 938.

So. All my mail now goes through Razor, Spam Assassin (set to a pretty low tolerance level), and GMail's spam filters, before being redirected into my inbox. I don't plan on checking for false positives too much, so if you want me to read your mail, I would encourage:

GMail in particular seems to have no compunction about flagging valid mail as spam if it looks even slightly boring.