<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
<title>QuirksBlog</title>
<link rel="alternate" type="text/html" href="http://www.quirksmode.org/blog/" />
<modified>2010-02-09T10:24:55Z</modified>
<tagline></tagline>
<id>tag:www.quirksmode.org,2010:/blog//1</id>
<generator url="http://www.movabletype.org/" version="3.14">Movable Type</generator>
<copyright>Copyright (c) 2010, ppk</copyright>

<entry>
<title>The iPhone obsession</title>
<link rel="alternate" type="text/html" href="http://www.quirksmode.org/blog/archives/2010/02/the_iphone_obse.html" />
<modified>2010-02-09T10:24:55Z</modified>
<issued>2010-02-08T12:13:20Z</issued>
<id>tag:www.quirksmode.org,2010:/blog//1.1831</id>
<created>2010-02-08T12:13:20Z</created>
<summary type="text/plain"><p>Since my attempts at capturing web developers&amp;#8217; hearts and minds by
publishing
fundamental
research
have failed miserably but my thirst for attention continues unabated,
today I will once more shout at iPhone developers. That&amp;#8217;s
proven to work.

More specifically, today I will shout at web developers who think that delicately inserting an
iPhone up their ass is the same as mobile web development.

Before we start, a little thought experiment. Suppose I proposed the following:


	IE6 is today&amp;#8217;s most advanced browser. (Note: this was actually
	true back in 2000. Please bear with me.)
	IE6&amp;#8217;s market share is about 80%.
	The other browsers are way worse than IE6, and developing for them is a pain;
	something we&amp;#8217;re not interested in and are a bit afraid of.
	Therefore we will develop websites exclusively for IE6.


Would you agree with those sentiments, even if we&amp;#8217;re back in 2000 and IE6 is really
the best browser we have?

Or would you reply that our sites should work as well as they can in all browsers
through the use of web standards, progressive enhancement, and all the rest
of the best practices we&amp;#8217;ve been preaching for the past ten years?

I distinctly remember a time when we web developers cared about such concepts.
But those times are long gone.
</p></summary>
<author>
<name>ppk</name>
<url>http://www.quirksmode.org/</url>
<email>ppk@xs4all.nl</email>
</author>
<dc:subject>Mobile</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://www.quirksmode.org/blog/">
<![CDATA[<p>Since my attempts at capturing web developers&#8217; hearts and minds by
<a href="/blog/archives/2010/02/persistent_touc.html">publishing</a>
<a href="/blog/archives/2010/02/the_touch_actio.html">fundamental</a>
<a href="/blog/archives/2010/02/do_we_need_touc.html">research</a>
have failed miserably but my thirst for attention continues unabated,
today I will once more shout at iPhone developers. That&#8217;s
<a href="/blog/archives/2009/11/apple_is_not_ev.html">proven to work</a>.</p>

<p>More specifically, today I will shout at web developers who think that delicately inserting an
iPhone up their ass is the same as mobile web development.</p>

<p>Before we start, a little thought experiment. Suppose I proposed the following:</p>

<ol>
	<li>IE6 is today&#8217;s most advanced browser. (<strong>Note</strong>: this was actually
	true back in 2000. Please bear with me.)</li>
	<li>IE6&#8217;s market share is about 80%.</li>
	<li>The other browsers are way worse than IE6, and developing for them is a pain;
	something we&#8217;re not interested in and are a bit afraid of.</li>
	<li>Therefore we will develop websites exclusively for IE6.</li>
</ol>

<p>Would you agree with those sentiments, even if we&#8217;re back in 2000 and IE6 is <em>really</em>
the best browser we have?</p>

<p>Or would you reply that our sites should work as well as they can in all browsers
through the use of web standards, progressive enhancement, and all the rest
of the best practices we&#8217;ve been preaching for the past ten years?</p>

<p>I distinctly remember a time when we web developers cared about such concepts.
But those times are long gone.</p>
]]>
<![CDATA[<h3>Warning! iCandy will damage your brain!</h3>

<p>Nowadays we live in a fantasy world that focuses exclusively on one platform,
and does so exclusively for reasons of eye candy.</p>

<p>We laughingly disown every single principle the web standards movement has ever stood for
in the past ten years in order to swoon and drool over Apple&#8217;s iCandy
and happily accept the reality distortion field that emanates from it.</p>

<p>The iPhone has become an obsession.
If we don&#8217;t pay attention, we&#8217;ll have a mobile web that only works on the
iPhone. And then we&#8217;ll have the <em>real</em> mobile web that wasn&#8217;t
made by us and doesn&#8217;t give a shit about web standards and best practices.</p>

<p>Worse, it seems web developers are happy with this state of affairs. It seems web developers
are <em>congratulating themselves</em> on excluding 85% of the smartphone users.
They certainly
never bother to check their sites in S60 WebKit, the largest smartphone
browser in the world.</p>

<p>Fucking dimwits.</p>

<p>We&#8217;re doing exactly the same as ten years ago.
We now say &#8220;iPhone&#8221; instead of &#8220;IE6,&#8221; but otherwise nothing&#8217;s changed.</p>

<p>No, wait, there&#8217;s one more change: the iPhone has <em>far less</em> mobile market share
now than IE6 had desktop share back then.</p>

<h3>Stats</h3>

<p>Let&#8217;s illustrate that last remark with some
<a href="http://communities-dominate.blogs.com/brands/2010/02/phone-market-shares-for-year-of-2009-and-last-quarter-2009.html"
	class="external">smartphone sales</a> stats:</p>

<ol>
	<li>Nokia: 39%</li>
	<li>RIM: 20% <span class="smaller">(BlackBerry)</span></li>
	<li>Apple: 15%  <span class="smaller">(this 15% is obviously <em>far</em> more important than
	the previous 59%)</span></li>
	<li>HTC: 5%</li>
	<li>Other: 21% <span class="smaller">(Samsung is expected to make a major jump this year)</span></li>
</ol>

<div class="floater smaller nolines">
<p>Let&#8217;s break these sales stats down by continent. Asia excluding Japan first:</p>

<ol>
	<li>Nokia: 75%</li>
	<li>Apple: 8%</li>
	<li>HTC: 6%</li>
	<li>RIM: 4%</li>
	<li>Samsung: 3%</li>
	<li>Motorola: 2%</li>
</ol>


<p>Western Europe:</p>

<ol>
	<li>Nokia: 48%</li>
	<li>Apple: 20%</li>
	<li>RIM: 15%</li>
	<li>HTC: 10%</li>
	<li>Samsung: 5%</li>
	<li>SonyEricsson: 1%</li>
</ol>

<p>Finally North America:</p>

<ol>
	<li>RIM: 51%</li>
	<li>Apple: 29%</li>
	<li>HTC: 6%</li>
	<li>Palm: 5% (probably includes PalmOS devices)</li>
	<li>Nokia: 4%</li>
	<li>Samsung: 2%</li>
	<li>Sharp: 1%</li>
</ol>

<p>Apple is second in every market, but the <em>least</em> difference with the market leader
is 22% in North America.</p>

<p>Source: <a href="http://www.morganstanley.com/institutional/techresearch/pdfs/mobile_internet_report.pdf"
	class="external">Morgan Stanley Mobile Internet Report</a> (48Meg PDF) p. 160</p>

<p>North Americans are parochial in their choice of a smartphone. One more reason why
the North American market has zero predictive value for the rest of the world.</p>

<p>Oddly, Europeans buy
relatively more Asian smartphones, while Asians buy relatively more European smartphones.</p>

<p>The Japanese market is so very different from all the others that I left it out. Besides,
a full 20% of Japanese smartphone sales fall in an unspecified &#8220;others&#8221; category.
Apple is fourth with 10% of sales.</p>

<p>The Japanese are even more parochial than the Americans when
it comes to selecting a smartphone, but that&#8217;s partly caused by the unique shape the
mobile space has in that country. None of the Western manufacturers has truly created an inroad
in the most advanced mobile market in the world.</p>

<p>Incidentally, the Japanese market <em>does</em>
have predictive value for the rest of the world, but it&#8217;s sometimes <em>so</em> advanced
that it&#8217;s hard to understand.</p>

</div>

<p>And here are the smartphone OS stats, also from Tomi Ahonen (whose
<a href="http://communities-dominate.blogs.com/brands/" class="external">blog</a>
I highly recommend, by the way):</p>

<ol>
	<li>Symbian: 45% <span class="smaller">(all of Nokia plus a bit of SonyEricsson and Samsung)</span></li>
	<li>BlackBerry: 20%</li>
	<li>iPhone: 15% <span class="smaller">(this 15% is obviously <em>far</em> more important than
	the previous 65%)</span></li>
	<li>Windows Mobile: 6% <span class="smaller">(HTC, Samsung, SonyEricsson)</span></li>
	<li>Android: 4% <span class="smaller">(HTC, Samsung, SonyEricsson, Motorola, Google)</span></li>
	<li>Other: 10% <span class="smaller">(Various Linux builds, Palm, as well as really obscure stuff.
	Will be reinforced by Samsung Bada during this year.)</span></li>
</ol>

<p>Despite the platform having only 15% sales market share we all want our mobile
websites to look exactly like an iPhone app and
we only want to use iPhone features.</p>

<p>We want to happily live forever in our fantasy world that&#8217;s filled to overflowing
with fucking iPhones, and where Nokias or BlackBerries aren&#8217;t welcome. Our
rationalisation machine is running overtime to maintain this illusion and filter
away reality.</p>

<p>We&#8217;re a bunch of lousy amateurs, that&#8217;s what we are.</p>

<p>No &#8220;mobile web development&#8221; specialist ever mentions Nokia ever.
After all, Nokia only sells more smartphones than BlackBerry and Apple
combined, so there&#8217;s no reason to mention it.</p>

<p>Mentioning Nokia is the mark of the rude boor. The man of discernment mentions the iPhone. And
mentions it and mentions it and mentions it. And then mentions the iPad, to show he is open
to non-iPhone devices. The bigger the better.</p>

<p>Oh, and don&#8217;t bring up Android. Yes, it&#8217;s an excellent system, and yes, it could have
a bright future ahead of it, but right now it doesn&#8217;t amount to anything in the global market.
It certainly won&#8217;t serve as a &#8220;Hey, I do multiple platforms&#8221; alibi.</p>

<p>15% + 4% = 19%</p>

<p>Turn off the fucking reality distortion field.</p>

<style>

p.but {
	color: #666666;
	display: list-item;
}

</style>

<h3>Arguments</h3>

<p>&#8220;But ... but ... &#8221; I hear you sputter. Sputter on. You&#8217;re wrong.</p>

<h4>UX</h4>

<p class="but">	But the iPhone has the best user experience of any phone!</p>

<p>True. So what?</p>

<p>Whole flocks of web developers swear that their Mac is far more
user-friendly than any Windows machine that will ever be invented. Still, do they develop websites only for Macs?</p>

<h4>Safari</h4>

<p class="but">But Safari iPhone is the best mobile browser!</p>

<p>True. So what?</p>


<p>Firefox is the best desktop browser. (Or Opera, or Safari, or whatever.) Do you develop sites exclusively for Firefox?</p>


<h4>CSS enhancements</h4>

<p class="but">But Safari supports amazing CSS-driven graphic capabilities!</p>

<p>True. So what?</p>

<p>Use these capabilities, by all means. Just don&#8217;t depend on them. Don&#8217;t stare
at them obsessively for hours on end and then decide you&#8217;ve made your site &#8220;mobile
compatible.&#8221;</p>

<p>There&#8217;s this thing called progressive enhancement. It&#8217;s a neat trick that allows you
to use the iPhone&#8217;s capabilities without damaging the experience of users of other phones.</p>


<h4>Traffic market share</h4>

<p class="but">But Safari iPhone has about 50% of mobile internet traffic market share! You can&#8217;t
	ignore that, can you?</p>

<p>Watch me ignore it.</p>

<p>First, so what? No, let me rephrase that: So <em>fucking</em> what?
Since when does web development mean leaving 50% of your mobile users
out in the cold? Since when is &#8220;I only support browsers with a large market
share&#8221; a valid argument? (Answer: since we have an iPhone up our ass.)</p>

<p>Next, I&#8217;m not so sure if it&#8217;s true. Mobile browser detection is really hard.
None of the reports I&#8217;ve read so far show
<em>how</em> they detect browsers. Lots of mobile browsers have <code>iPhone</code> in
their UA strings to work around browser detects that obsessed web developers have set up.
Do all traffic market share reporters work around that problem? Most probably do, but we can&#8217;t be sure.</p>

<p>Besides, what will happen when the operators abandon the
economically untenable flat rate for iPhone data traffic? Will iPhone users
maintain their current traffic market share when they have to pay as they go?</p>

<h4>US doesn&#8217;t matter</h4>

<p>Next, many market share reports apply only to the US market, and it&#8217;s exactly these
reports that are discussed most by the influential American tech bloggers.</p>

<p>The real mobile battle, however, will take place in Europe and Asia. The US is a sideshow.
Unfortunately it&#8217;s extraordinarily hard to convince people, both Americans
and non-Americans, of that fact. So let&#8217;s try again:</p>

<p>Contrary to every single other technical advance of the last 50 years, mobile did not start
in the US, and the US has always been somewhat behind Asia and Europe. For instance,
SMS only <em>really</em> took off with the Obama campaign, while the rest of
the world became addicted to it years ago.</p>

<div class="floater smaller">
<p>Source: <a href="http://www.morganstanley.com/institutional/techresearch/pdfs/mobile_internet_report.pdf"
	class="external">Morgan Stanley Mobile Internet Report</a> (48Meg PDF) p. 75</p>
</div>

<p>While North America has 17% of the world&#8217;s internet users, it has only
7% of the world&#8217;s mobile users. Europe (22%) and Asia (45%) have the same figure for both.</p>

<p>The US market doesn&#8217;t have any predictive value for the rest of the world, either,
because Nokia is absent. It&#8217;s just a small niche market.</p>

<p>That means that, contrary to every other branch of tech, American mobile opinions just
aren&#8217;t very important to the rest of the world. For the American market, yes, of course they matter.
For all other markets, don&#8217;t listen to them.</p>

<p>The problem is that too much of the rest of the world takes its cues from
the well-read US tech bloggers that have made obsessing over Apple and Google while
being blissfully unaware of the rest of the mobile ecosystem into a fine art.</p>

<p>In the medium run the problem will solve itself. Either the US bloggers will catch up
with mobile reality, or they will cease to be read. I&#8217;m guessing the former.
They&#8217;re not stupid.</p>

<h4>Our fault</h4>

<p>But with all that said I still have no reliable traffic market share figures. So let&#8217;s accept that 50% of
	all mobile web traffic comes from the iPhone. Or 30%. Or 70%. Whatever. Far more than its
	sales market share, in any case.</p>

<p>Point is, <em>that&#8217;s our fault</em>.</p>

<p>I can vividly imagine an S60 WebKit user getting tired of shitty websites whose developers
	were too busy playing with their iPhones to bother with the largest worldwide
	smartphone browser.</p>

<p>We web developers are doing an <em>amazingly</em>
	lousy job right now. We have to start serious mobile testing instead
	of just playing around with our iPhone for a few minutes before declaring
	our site fit for mobile.</p>

<p>Supporting all browsers is the <em>whole fucking point</em> of being a
	good web developer, and I&#8217;m going to force you to do it even if I have to personally
	swear at each of you individually.</p>

<h3>Remove iPhone from ass</h3>

<p>I&#8217;m sick of the travesty that calls itself &#8220;mobile web development&#8221;
but mostly amounts to Apple-obsessed idiots with iPhones so far up their asses that
their brains are starving for oxygen.</p>

<p>Do you <em>ever</em> see any mainstream mobile web development article that talks
about S60 WebKit or the (lousy) BlackBerry browser? Due to our iPhone obsession we are
deliberately not paying any attention to a user group that&#8217;s four times as large as
the iPhone.</p>

<p>We have come full-circle back to developing for only one browser. Worse, we are
congratulating ourselves on that bit of cleverness.
Christ, do we <em>really</em> have to go through
the whole standards movement <em>once again?</em></p>

<p>True, the default browsers on Nokia and (especially) BlackBerry phones are less advanced than
Safari iPhone, but so what? Dealing with them is the job we signed up to do. Besides,
Nokia and BlackBerry are fully aware of the situation, and  I expect significant improvements
during this year. And if not, there&#8217;s always Opera.</p>

<p>As to traffic, Nokias and BlackBerries may consume less that their fair share,
but as I said earlier <em>that&#8217;s our fault</em>. We can&#8217;t use the mess
we created as an excuse to create an even larger mess. Besides, which web developer ignores
85% of his potential users? (The answer, obviously, is: one with an iPhone up his ass.)</p>

<h3>Work to do</h3>

<p>Web developers should take a look at their sites on a Nokia and a BlackBerry
and fix whatever&#8217;s wrong. It isn&#8217;t
<em>that</em> hard to get your hands on a testing device. Just ask around or use
<a href="http://perfectomobile.com" class="external">PerfectoMobile</a>. (I do not
trust emulators, so I don&#8217;t recommend their use.)</p>

<p>Install Opera Mini on the device, and also install Opera Mobile if you have a Nokia.
Check in both. The native browsers are more important, though.</p>

<p>Oh, and remember: Fixing a site
for a browser does <em>not</em> mean making sure the complete feature set works in that browser.
Use progressive enhancement. Lots and lots of it. Especially on BlackBerry.
That&#8217;ll keep you sane.
</p>

<p>Finally, I&#8217;ll be monitoring new mobile web publications, and
I&#8217;m thinking of instating an &#8220;iPhone Up Ass Award&#8221; for the
mobile web development article that ignores reality most
effectively. You have been warned.</p>

<p>If you write an article about mobile web development, I expect you to devote
a significant chunk of it to one or two specific Nokia or BlackBerry phones.
Show you can look further
than just the latest fad and see the mobile web in its entirety.</p>

<p>To those who <em>still</em> want to blather about seamless UX and
swoonworthy CSS and all the rest of the bullshit: why don&#8217;t you fuck the fuck off
and go wank your stupid iThingy elsewhere?
If you&#8217;re not interested in universal access you&#8217;re not a real
web developer and you don&#8217;t belong on the mobile web.</p>

<p>As for the rest of us, we&#8217;ve got work to do.</p>
]]>
</content>
</entry>
<entry>
<title>Do we need touch events?</title>
<link rel="alternate" type="text/html" href="http://www.quirksmode.org/blog/archives/2010/02/do_we_need_touc.html" />
<modified>2010-02-05T13:21:13Z</modified>
<issued>2010-02-05T13:19:46Z</issued>
<id>tag:www.quirksmode.org,2010:/blog//1.1830</id>
<created>2010-02-05T13:19:46Z</created>
<summary type="text/plain"><p>One reaction I received about my touch research was: Do we really need
the touch events? Can&amp;#8217;t we just fire the mouse events when a touch action occurs? After all,
touch and mouse events aren&amp;#8217;t that different.

That&amp;#8217;s a fair question. It deserves a fair answer.
</p></summary>
<author>
<name>ppk</name>
<url>http://www.quirksmode.org/</url>
<email>ppk@xs4all.nl</email>
</author>
<dc:subject>Mobile</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://www.quirksmode.org/blog/">
<![CDATA[<p>One reaction I received about my <a href="/blog/archives/2010/02/the_touch_actio.html"
	>touch research</a> was: Do we really need
the touch events? Can&#8217;t we just fire the mouse events when a touch action occurs? After all,
touch and mouse events aren&#8217;t <em>that</em> different.</p>

<p>That&#8217;s a fair question. It deserves a fair answer.</p>
]]>
<![CDATA[<h3>The problem</h3>

<p>Right now, iPhone and Android support the touchstart, touchmove, and touchend events. Let&#8217;s say my
<a href="/browsers/touch.html">advice</a> is accepted and future browsers also
support the touchenter, touchleave, and touchhold events.</p>

<p>The point here is that this series of events isn&#8217;t that different from the mouse events.
Respectively, mousedown, mousemove, mouseup, mouseover, and mouseout fulfill the same role as
the first five touch events. The touchhold event does not have a direct mouse equivalent,
but it basically fulfills the same function as a right-click detection script.</p>

<p>So if mousedown is really the same as touchstart, why bother with new events? Can&#8217;t
we just write a mousedown script that is triggered when the user depresses his mouse button
OR touches the screen?</p>

<h3>The issues</h3>

<p>As far as I can see there are three fundamental issues involved:</p>

<ol>
	<li>Touch interaction is different from mouse interaction. Not hugely different, but different
	enough to warrant separate events.</li>
	<li>It MUST be possible to write ONE single JavaScript file that works optimally in any
	circumstances, on the desktop, in a mobile browser, or in a widget manager, with the user
	using the touchscreen, the mouse, or the keyboard, as he sees fit. That implies the
	web developer MUST be able to distinguish between mouse-driven and touch-driven interaction.</li>
	<li>The mouse events have already been implemented as legacy events in all touchscreen browsers. They
	all fire after the user releases the screen.</li>
</ol>

<p>Let&#8217;s study these issues a bit further.</p>

<h4>Issue 1: difference</h4>

<p>Although at first sight it seems as it touchstart is equal to mousedown, touchmove to mousemove,
and touchend to mouseup, this is not really the case.</p>

<p>Take a look at my <a href="http://www.quirksmode.org/m/tests/scrollayer2.html">second scrolling layer script</a>.
It was written for touchscreen phones, and works perfectly if the browser supports the touch
events. Currently only iPhone and Android do.</p>

<p>I added the mousedown event to touchdown, mousemove to touchmove, and mouseup to touchup. Try
it in a normal desktop browser. You&#8217;ll find that, although the script works,
the interaction just doesn&#8217;t make
sense. The mouse events aren&#8217;t <em>quite</em> the same as the touch events, even though
they&#8217;re pretty similar.</p>

<p>For more fun, try using it with a touchpad.</p>

<p>If you <em>really</em> want to have fun, try the script on a Nokia S60v3 device, which has
a pseudo-cursor and implements the mouse events exactly like desktop browsers. The script works
... in a way.</p>

<p><strong>Question</strong> to UX experts: how <em>should</em> the scrolling layer work when
the user has a mouse?</p>

<p>In other words, we need a different interaction model for desktop browsers. That requires us to
first make a distinction between mouse-driven and touch-driven browsers. But how?</p>

<h4>Issue 2: one file</h4>

<p>There&#8217;s one extra requirement: I absolutely want to be able to deliver one single JavaScript
file that contains all the scripts necessary for all interactions. And obviously I do not want to
use a browser detect at all in order to determine whether a certain browser needs the mouse or
the touch version.</p>

<p>So how do we distinguish between the two? Simple: see if a touchstart event fires. If it does,
the browser is certain to be a touchscreen device and we should disable the mouse events.</p>

<p>It would work something like this:</p>

<pre>
var testEl = [the element you want to do something with];
testEl.onmousedown = function () {
	// initialize mouse interface
}
testEl.ontouchstart = function () {
	<strong>testEl.onmousedown = null;</strong>
	// initialize touch interface
}
</pre>

<p>This works fine. The touchstart event fires before the mousedown event, and therefore we
can wipe the mousedown event handler before it&#8217;s ever executed.</p>

<p>A really proper script would have a third interaction model for using the keyboard. I haven&#8217;t
written that yet because it&#8217;s somewhat more tricky than the touch/mouse one. I
will have to deal with S60v3, where the &#8220;arrow&#8221; keys guide a pseudo mouse cursor
across the screen and both the mouse and the key events fire. Besides, the user may alternate
between the keyboard and either a mouse or a touchscreen.</p>

<p>Still, we can use a similar trick here: we know that the user is using a mouse if the mousemove
event is detected. More specifically, if <em>two</em> mousemove events are detected within a
short period of time. After all, all mobile touchscreen browsers will fire one (and only one) mousemove
event when the user releases the screen, and that does <em>not</em> constitute evidence for
a mouse-based interface.</p>

<p>Of course we can only distinguish them if keyboard use fires different events than mouse use. As
we know it does: the keydown, keypress, and keyup events have long been supported by all browsers.
Imagine a browser in which depressing a key would fire a <em>mousedown</em> event!</p>

<p>This sort of distinguishing between different interaction models is only possible if the three
models use different events. If the touch actions would also use the mouse events, it would be
impossible to distinguish between the two.</p>

<h4>Issue 3: prior art</h4>

<p>Finally, let&#8217;s repeat it once more, <em>all touchscreen browsers</em> (with the sole
exception of the two Vodafone Widget Managers) already fire <em>all</em> mouse events in
one long cascade when the user releases the screen.</p>

<p>We shouldn&#8217;t require all browsers to change this behaviour. First of all it doesn&#8217;t
make sense, and secondly they won&#8217;t all do it, leaving us stuck with an impossible
situation where some browsers support the mouse events as if they&#8217;re a desktop browser,
and others as if they&#8217;re a touch browser. That&#8217;s a recipe for disaster.</p>

<h3>Separate touch events</h3>

<p>So I strongly believe that all mobile touchscreen browsers MUST (in the sense of RFC 2119)
support separate touchstart, touchmove, and touchend events and relegate the mouse events to
legacy status.</p>

<p>Web developers will benefit from this since they can easily distinguish between the various
interaction modes and create scripts that are suited to every one of them.</p>
]]>
</content>
</entry>
<entry>
<title>Persistent touch event objects</title>
<link rel="alternate" type="text/html" href="http://www.quirksmode.org/blog/archives/2010/02/persistent_touc.html" />
<modified>2010-02-03T22:09:44Z</modified>
<issued>2010-02-03T21:58:32Z</issued>
<id>tag:www.quirksmode.org,2010:/blog//1.1829</id>
<created>2010-02-03T21:58:32Z</created>
<summary type="text/plain"><p>It turns out to be possible to handle the touchmove and touchend events with data obtained
from the touchstart event object. It is not necessary to access the touchmove and touchend event
objects, as long as you continue to have access to the touchstart one.

Apparently, the touchstart event object persists in browser memory even when the event has long
ended. More importantly, it continues to be updated with information about the current touch action.

This is interesting. It&amp;#8217;s also profoundly different from the desktop, where a similar
trick with the mousedown, mousemove, and mouseup events definitely does not work.

Both iPhone and Android display this behaviour. Therefore future implementations of the
touch events should, too.
</p></summary>
<author>
<name>ppk</name>
<url>http://www.quirksmode.org/</url>
<email>ppk@xs4all.nl</email>
</author>
<dc:subject>Mobile</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://www.quirksmode.org/blog/">
<![CDATA[<p>It turns out to be possible to handle the touchmove and touchend events with data obtained
from the touchstart event object. It is not necessary to access the touchmove and touchend event
objects, as long as you continue to have access to the touchstart one.</p>

<p>Apparently, the touchstart event object persists in browser memory even when the event has long
ended. More importantly, it continues to be updated with information about the current touch action.</p>

<p>This is interesting. It&#8217;s also profoundly different from the desktop, where a similar
trick with the mousedown, mousemove, and mouseup events definitely does <em>not</em> work.</p>

<p>Both iPhone and Android display this behaviour. Therefore future implementations of the
touch events should, too.</p>
]]>
<![CDATA[<p>See <a href="http://www.sitepen.com/blog/2008/07/10/touching-and-gesturing-on-the-iphone/"
	class="external">Touching and Gesturing on the iPhone</a> for more information on
how the touch events work on the iPhone. </p>

<h3>An error</h3>

<p>While tinkering with my <a href="/m/tests/scrollayer.html">scrolling layer</a> test page I
found out that I&#8217;d made an error in the first version. Oddly, this first version worked
absolutely fine on both iPhone and Android; that&#8217;s why I didn&#8217;t notice the error at first.</p>

<p>I just plain forgot to give the <code>e</code> argument to the touchend function.
The script got its touchend information from the touchstart event object:</p>

<pre>
var testEl = [the scrolling layer];

testEl.ontouchstart = function (<strong>e</strong>) {
	// do stuff
	var origin = getCoors(e);
	testEl.ontouchmove = moveDrag;
	testEl.ontouchend = function () { &lt;-- forgot the e
		var end = getCoors(<strong>e</strong>);    &lt;-- e is touchstart object
		// do stuff
		testEl.ontouchmove = testEl.ontouchend = null;
	}

	function moveDrag(e) {
		var currentPos = getCoors(e);
		// move layer
	}

	function getCoors(e) {
		var coors;
		if (e.touches && e.touches.length) { 	// iPhone
			coors = e.touches[0].clientX;
		} else { 				// all others
			coors = e.clientX;
		}
		return coors;
	}
}
</pre>

<p>I found the error because I wanted to make the script
<a href="/m/tests/scrollayer2.html">desktop-compatible</a> in order to prove that from
an interaction point of view it makes no sense to just swap the mouse events in place
for the touch events.</p>

<p>I added mousedown, mousemove, and mouseup event handlers, saw an abrupt stop in Firefox
instead of the smooth stop, and discovered the missing <code>e</code>. Incidentally, this
proves that the mouse events do
not have persistent event objects (something we&#8217;ve known for 10 years, but still).</p>

<h3>Using one touch object</h3>

<p>My curiosity played up. Apparently, handling the touchend event with information
obtained from the touchstart event object works fine. Could I rewrite the script so that it <em>only</em>
uses the touchstart event object, and entirely ignores the touchmove and touchend objects?</p>

<p>The answer turns out to be Yes. The <a href="/m/tests/scrollayer3.html">following script</a>
works fine on iPhone and Android:</p>

<pre>
var testEl = [the scrolling layer];

testEl.ontouchstart = function (<strong>e</strong>) {
	// do stuff
	var origin = getCoors();
	testEl.ontouchmove = moveDrag;
	testEl.ontouchend = function () {
		var end = getCoors();
		// do stuff
		testEl.ontouchmove = testEl.ontouchend = null;
		setTimeout(checkOneLastTime,1000);
	}

	function moveDrag() {
		var currentPos = getCoors();
		// move layer
	}

	function getCoors() {

		// e refers to the touchstart event object
		// even if the getCoors function is called
		// ontouchmove or ontouchend. Works fine

		var coors;
		if (<strong>e</strong>.touches) { 			// iPhone
			coors = <strong>e</strong>.touches[0].clientX;
		} else { 				// all others
			coors = <strong>e</strong>.clientX;
		}
		return coors;
	}

	function checkOneLastTime() {
		alert(getCoors())	// works! event object still there
	}
}
</pre>

<p>In other words, the original touchstart event object persists even when
the touchstart event itself has long ended. Even better, it continues to be updated with
new information, such as the current touch coordinates.</p>

<p>I also read out the touchstart event coordinates one second after the touchend event
fired, i.e. when the entire touch action had totally and irretrievably gone. The event
object was still there, although its coordinates weren&#8217;t updated any more and it
ignored new touch actions.</p>

<p>I also tested whether the same is possible with the touchmove event. The answer
is Yes: a similar trick that uses a touchmove event object to retrieve information about
the touchend event works.</p>

<p>One could think that there is in fact only one single event object that all touchstart, touchmove,
and touchend events use. This turns out not to be the case (though it&#8217;s an interesting
idea).</p>

<p>When I added the missing <code>e</code> to the first version of the script it stopped
working on the iPhone. The script now used the touchend event object, which did not contain
the <code>touches</code> list because there were no longer any touch actions going on. I had
to move to the <code>changedTouches</code> list to get the coordinates I need.</p>

<p>This proves that all events still cause unique objects to be created: the touchstart
one contains a <code>touches</code> list; the touchend one doesn&#8217;t.</p>

<p>Concluding, you can easily handle the touchmove and touchend
events by using the information contained in the touchstart object. There is no need
to access the touchmove and touchend event objects.</p>

<p>I wonder if this has performance implications. It probably won&#8217;t; the touchmove and touchend
event objects must be constructed anyway, since the browser has no way of knowing we won&#8217;t use
them. (Unless you use only one single event object for an entire touch action sequence.)</p>
]]>
</content>
</entry>
<entry>
<title>The touch action</title>
<link rel="alternate" type="text/html" href="http://www.quirksmode.org/blog/archives/2010/02/the_touch_actio.html" />
<modified>2010-02-03T10:46:31Z</modified>
<issued>2010-02-02T16:39:43Z</issued>
<id>tag:www.quirksmode.org,2010:/blog//1.1828</id>
<created>2010-02-02T16:39:43Z</created>
<summary type="text/plain"><p>Over the past few weeks I have done some fundamental research into the touch action and
its consequences, and it&amp;#8217;s time to present my conclusions in the form of the
inevitable compatibility table. I have also written an
advisory paper that details what browser vendors must do in order to
get by in the mobile touchscreen space. Finally, I discuss a few aspects of my research in this article.

Disclosure: This research was ordered and paid for by Vodafone. Nokia, Microsoft, Palm, and RIM
have helped it along by donating devices to me.

When a user touches the screen of a touchscreen phone, sufficient events should fire
so that web developers know what&amp;#8217;s going on and can decide what actions to
take. Unfortunately most mobile browsers, especially Opera and Firefox, are severely
deficient here.

The touch action is way overloaded, and most browsers
have trouble distinguishing between a click action
and a scroll action. Properly making this distinction is the only way of creating a truly
captivating mobile touchscreen browsing experience.

The iPhone&amp;#8217;s touch event model is excellent and should be copied by all
other browsers. In fact, these events are so important that I feel that any browser that does
not support them by the end of 2010 is out of the mobile browser arms race. There&amp;#8217;s only
one problem with the iPhone model, and it&amp;#8217;s relatively easy to fix.

I have created a drag-and-drop script that works on iPhone and Android
as well as the desktop browsers,
a multitouch drag-and-drop script that works only on
the iPhone, and a scrolling layer script that
forms the basis of faking position: fixed on iPhone and Android, who do not
support that declaration natively.

I will hold a presentation on my research at the DIBI conference, Newcastle upon Tyne, 28th April. It will likely
include future discoveries and thoughts.
</p></summary>
<author>
<name>ppk</name>
<url>http://www.quirksmode.org/</url>
<email>ppk@xs4all.nl</email>
</author>
<dc:subject>Mobile</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://www.quirksmode.org/blog/">
<![CDATA[<p>Over the past few weeks I have done some fundamental research into the touch action and
its consequences, and it&#8217;s time to present my conclusions in the form of the
<a href="/m/touch.html">inevitable compatibility table</a>. I have also written an
<a href="/browsers/touch.html">advisory paper</a> that details what browser vendors must do in order to
get by in the mobile touchscreen space. Finally, I discuss a few aspects of my research in this article.</p>

<p><strong>Disclosure</strong>: This research was ordered and paid for by Vodafone. Nokia, Microsoft, Palm, and RIM
have helped it along by donating devices to me.</p>

<p>When a user touches the screen of a touchscreen phone, sufficient events should fire
so that web developers know what&#8217;s going on and can decide what actions to
take. Unfortunately most mobile browsers, especially Opera and Firefox, are severely
deficient here.</p>

<p>The touch action is <em>way</em> overloaded, and most browsers
have trouble distinguishing between a click action
and a scroll action. Properly making this distinction is the only way of creating a truly
captivating mobile touchscreen browsing experience.</p>

<p>The iPhone&#8217;s touch event model is excellent and should be copied by all
other browsers. In fact, these events are so important that I feel that any browser that does
not support them by the end of 2010 is out of the mobile browser arms race. <del>There&#8217;s only
one problem with the iPhone model, and it&#8217;s relatively easy to fix.</del></p>

<p>I have created a <a href="/m/tests/drag.html">drag-and-drop</a> script that works on iPhone and Android
as well as the desktop browsers,
a <a href="/m/tests/drag2.html">multitouch drag-and-drop</a> script that works only on
the iPhone, and a <a href="/m/tests/scrollayer.html">scrolling layer</a> script that
forms the basis of faking <code>position: fixed</code> on iPhone and Android, who do not
support that declaration natively.</p>

<p>I will hold a presentation on my research at the <a href="http://www.dibiconference.com/"
	class="external">DIBI conference</a>, Newcastle upon Tyne, 28th April. It will likely
include future discoveries and thoughts.</p>
]]>
<![CDATA[<p>Related files:</p>

<ul>
	<li><a href="/browsers/touch.html">Browser vendor advisory paper</a> on the touch events.</li>
	<li><a href="/m/touch.html">Compatibility tables</a>.</li>
	<li><a href="/m/tests/touch.html">Test page</a>.</li>
</ul>

<h3>Problems with the touch actions</h3>

<p>One of the most serious problems of the current touchscreen interfaces is that the
touch action is <em>way way</em> overloaded. When the user touches the screen he may want to start
a click action, a scroll action, or a resize action. Distinguishing correctly between
these three actions is what sets a good touchscreen interface apart from a bad one.</p>

<p>This is especially important with regard to the click action. Far too often, an intended
click on an element does not work because the user moves his finger a tiny little bit
during the action, and the operating system concludes he wants to perform a scroll action
instead. The page does not really scroll because the user does not really move his finger,
but the click action is canceled, and this results in a seemingly unresponsive interface.</p>

<p>This problem is especially severe in the Samsung WebKit that runs in the Samsung H1 and M1
Widget Manager, but it occurs on other operating systems, too.</p>

<p>Only iPhone and Palm have <em>really</em> solved this problem; the other browser vendors are
in various stages of catching up.</p>

<h3>Current state</h3>

<p>Events can be divided into three groups:</p>

<ol>
	<li><strong>Touch events</strong> that describe the exact actions of the user on the screen without
	reference to the result of these actions. Examples: touchstart, touchmove, touchend.</li>
	<li><strong>Interface events</strong> that describe the result of the touch action. Examples: click, resize,
	scroll, contextmenu.</li>
	<li><strong>Legacy events</strong> that fire because many sites depend exclusively on them.
	Examples: mouseover, mousedown, mousemove, mouseup.</li>
</ol>

<p>The touch events are supported only by iPhone and Android, in that order. Even multitouch Androids
do not support more than one series of touch events (i.e. more than one finger) at a time.</p>

<p>All browsers support the legacy events, although some don&#8217;t support all of them. Still,
this is largely irrelevant.</p>

<p>The real chaos is in the interface event group. Most WebKit-based browsers support most events
reasonably well, but all others, including Opera and Firefox, don&#8217;t support them at all or
make a mess of them. That&#8217;s annoying, because it&#8217;s these events that actually tell
us what the user is trying to achieve.</p>

<h4>Touch events</h4>

<p>The touch events are touchstart, touchmove, and touchend. As you&#8217;d expect the first
fires once when the user initially touches the screen, the second continuously while the user is
moving his finger, and the third when the user releases the screen.</p>

<p>See <a href="http://www.sitepen.com/blog/2008/07/10/touching-and-gesturing-on-the-iphone/"
	class="external">Touching and Gesturing on the iPhone</a> for more information on
how the touch events work on the iPhone. I do not repeat this background information in any of
my articles.</p>

<p>All browsers MUST (in the sense of RFC 2119) support these events at their earliest opportunity.
Any browser that does not support them by the end of 2010 is out of the mobile browser race.</p>

<p>The touch events are currently supported only by iPhone and Android.
There are a few differences between their models:</p>

<ol>
	<li>The iPhone also supports the gesture events, which fire when more than one
	finger touches the screen. I&#8217;m not yet totally sure how useful they will be;
	I&#8217;d like to see (or create) a practical test script first.</li>
	<li>The iPhone stores information about the touch, notably the coordinates, in
	a special <code>touches</code> interface, while the Android stores them directly
	on the event object itself.<del>Google is right, and Apple is wrong. I explain why in my
	<a href="/browsers/touch.html">advisory paper</a>.</del></li>
</ol>

<p>There is also the touchcancel event that fires when the user&#8217;s touch is &#8220;canceled.&#8221;
I haven&#8217;t yet studied it; I feel that it&#8217;s useful only in a very few edge cases.</p>

<p>The touchmove and touchend events also fire when the touch action moves out of the
element where the touchstart event took place.</p>

<p>If a touch action moves into an element, touchstart generally fires. I&#8217;m wondering
if we should use touchenter instead, which in turn presupposes the existence of a
touchleave event.</p>

<p>I&#8217;m also wondering whether we need a touchhold event, and whether the touch events
should return an <em>area</em> instead of just a coordinate of a single pixel.</p>

<h4>Interface events</h4>

<p>The interface events fire when the user actually takes an action instead of aimlessly touching
the screen. These actions include:</p>

<ol>
	<li>Clicking on a link or otherwise activating an element. The click event should fire.</li>
	<li>Scrolling. The scroll event should fire.</li>
	<li>Zooming. We need a new zoom event for this situation. Currently a few browsers fire
	a resize event instead, but that&#8217;s not good enough, and it might be that resize should
	be assigned to another situation entirely. I need to do more research on this.</li>
	<li>Calling up a context menu. The contextmenu event should fire. More in general we might
	need a touchhold event that fires when the user touches the screen and holds his finger
	in place, whether or not a context menu pops up.
	On the other hand, this event is pretty easy to fake in JavaScript.</li>
</ol>

<p>Browser compatibility is a bloody mess:</p>

<ol>
	<li>The click event fires in all browsers.</li>
	<li>The scroll event does not fire in Opera, Samsung WebKit, Firefox, MicroB,
	and NetFront when the user scrolls.</li>
	<li>The zoom event does not exist yet; I&#8217;ve invented it during my research. We need
	it badly, though.</li>
	<li>The contextmenu event does not fire when a context menu appears in Opera,
	Android, MicroB, or NetFront. It fires correctly on Iris and IE. The other browsers
	do not have a touch-based context menu.</li>
</ol>

<h4>Legacy events</h4>

<p>Current websites are created exclusively for desktop, and they use the legacy events
extensively. Since mobile browsers want to give their users access to the &#8220;fixed&#8221;
web, they have to support these legacy events.</p>

<p>Still, the touchscreen environment is not the same as the desktop environment. Most
notably, a mouse action on the desktop is <em>not</em> equivalent to a touch action on
a phone. The user of a touchscreen phone needs to touch the screen for pretty much any action
(zoom, scroll, click), something that is not true for a mouse.</p>

<p>This is how the legacy events work currently:</p>

<ol>
	<li>If a touchstart and a touchend action occur on (roughly) the same coordinates this constitutes
	a touchclick action. The legacy events are fired, as is the click event.</li>
	<li>The legacy events are mouseover, mousemove, mousedown, and mouseup. The event
	order may differ, but that doesn&#8217;t matter. In addition
	the <code>:hover</code> styles, if any, are applied to the element.</li>
	<li>Only one mousemove event fires.</li>
	<li>When a touchclick action occurs on another element, the mouseout event is fired on
	the original element and the <code>:hover</code> styles are removed.</li>
	<li>The dblclick event is not supported. (It&#8217;s totally useless, anyway.)</li>
	<li>The Vodafone Widget Managers fire the mousedown event when the user initially
	touches the screen.</li>
	<li>S60 Widget Manager (Opera-based) and IE try to fire continuous mousemove events.</li>
	<li>Thus, the S60 Widget Manager in theory allows a mousedown/mousemove-based drag-and-drop.
	In practice performance is so painful that I advise you not to bother.</li>
	<li>iPhone and S60 WebKit cancel the rest of the events if a DOM change occurs onmouseover
	or onmousemove. I&#8217;m sure this is a good idea in the short run, but the mobile space
	will have to emancipate itself from the &#8220;fixed web&#8221; and this rule
	must eventually disappear.</li>
	<li>BlackBerry and NetFront do not support the mouseover and mousemove events.</li>
	<li>Palm, Samsung and Firefox do not support the mousemove event.</li>
</ol>

<h3>Drag-and-drop and position: fixed</h3>

<p>In addition to the <a href="/m/tests/touch.html">official test page</a> I created the
following tests:</p>

<ol>
	<li>A <a href="/m/tests/drag.html">drag-and-drop</a> script that works on iPhone and Android
	in addition to the desktop browsers. The trick here is removing the mouse events when the
	browser turns out to support the touchstart event.</li>
	<li>A <a href="/m/tests/drag2.html">multitouch drag-and-drop</a> script that works only on
	the iPhone. Android does not support more than one finger at a time.<del>The iPhone
	handles the touch event properties wrongly.</del></li>
	<li>A <a href="/m/tests/scrollayer.html">scrolling layer</a> script that works on the iPhone and Android.
	<a href="http://remysharp.com/"
		class="external">Remy Sharp</a> pointed out that it also contains the solution to
	getting <code>position: fixed</code> to work on the iPhone and Android.
	Essentially, if you make this script vertical instead of horizontal it&#8217;ll create a scrollable
	layer between &#8220;fixed&#8221; panels. There are various tricky bits involved, though, and
	I&#8217;ll have to return to this problem later. Still, we now have the basic solution.</li>
</ol>

<h3>iPhone clickable area</h3>

<p>I suspect that on the iPhone the actual clickable area is slightly
shifted downwards with regard to the visible HTML element. That is, a click just below the
element may also be counted as a click on the element itself. This does not go for the area
just above the element.</p>

<p>To try it for yourself, use the <a href="/m/tests/drag2.html">multitouch drag-and-drop</a>.
Try it in normal vertical orientation first, and try to touch the element as low as possible.
Then turn the device 180 degrees and try again. You&#8217;ll find that you have to touch
the HTML element distinctly higher now.</p>

<p>I&#8217;m still trying to figure out how to officially prove that Apple does this; maybe
I&#8217;ve misinterpreted the test results.</p>

<h3>iPhone documentation is lousy</h3>

<p>Finally, during my research I noticed time and again how unbelievably lousy Apple&#8217;s
Safari iPhone documentation site is. I advise developers to use my pages instead &#8212; as usual.</p>

<p>Part of the problem is the content; once you get to the correct page you will find a terse
summary of the situation that is correct as far as it goes but mostly leaves out stuff that
doesn&#8217;t fall exactly in the page&#8217;s topic, even if it&#8217;s closely related.</p>

<p>Worse, the invention of the cross-reference has taken Apple completely by surprise.
I wish I could say it&#8217;s scrambling to catch up, but it isn&#8217;t. No cross-references
whatsoever. Anywhere.</p>

<p>Try it yourself. Go to <a href="http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariJSRef/TouchEvent/TouchEvent.html"
	class="external">the TouchEvent page</a>. It contains absolutely zero reference to
the crucial TouchList interface that exposes useful information about the touch events. There
is in fact a workable page about TouchList. Try to find it from the TouchEvent page. You
won&#8217;t.</p>

<p>Alternatively, try finding the same information from the
<a href="http://developer.apple.com/safari/library/navigation/index.html"
	class="external">Safari Reference Library home page</a>. Search works &#8212; if you know
what to search for. The official navigation is absolutely useless.</p>

<p>Apple&#8217;s pseudo-frames or something also drive me crazy. The keyboard
focus does not snap to the actual documentation page, which means I initially can&#8217;t scroll.
(Firefox)</p>

<p>Apple, please fix.</p>
]]>
</content>
</entry>
<entry>
<title>Changes</title>
<link rel="alternate" type="text/html" href="http://www.quirksmode.org/blog/archives/2010/01/changes_1.html" />
<modified>2010-01-15T13:57:40Z</modified>
<issued>2010-01-15T13:53:16Z</issued>
<id>tag:www.quirksmode.org,2010:/blog//1.1822</id>
<created>2010-01-15T13:53:16Z</created>
<summary type="text/plain"><p>Well, a new year has started, and it&amp;#8217;s tradition to give an overview of where you&amp;#8217;re standing. So here&amp;#8217;s mine.

As longtime readers may remember, I was totally burned out at the end of both 2007 and 2008. I&amp;#8217;m happy to report that that trend has been broken; although I was glad to have a little holiday at the end of 2009, I returned to work without noticeable problems. So that&amp;#8217;s good.

However, I have decided that certain aspects of my professional life are in need of a change; notably my public speaking and my compatibility tables.

Basically I&amp;#8217;m going off the conference track for a while in order to spend more time with my mobile phones.

I will honour agreements made beforehand, which means I&amp;#8217;ll speak at the following occasions:


	Transmissions 3, Manchester, 28th of January, together with Chris Mills. The focus of this meeting will be the mobile Web.
	Technique Retreat, 29th to
	31st of January in Morecambe, near Manchester. Here I&amp;#8217;ll be a trainer and workshop leader. If you want to do a bit of JavaScript or mobile web development with me around to help you, sign up. There&amp;#8217;s still a few tickets left.
	Dutch: Sessie op de Howest te Kortrijk over het mobiele web, in de week van 29 maart.
	The DIBI conference in Newcastle upon Tyne, 28th of April. I&amp;#8217;ll speak about the mobile Web.
	It&amp;#8217;s possible one item will be added to this list.


After that, though, I will be very reticent in accepting new speaking gigs.

I will also make some changes to my compatibility tables because the kind of tests I&apos;ve been doing in the pas ten years are not really suited for mobile browsers.</p></summary>
<author>
<name>ppk</name>
<url>http://www.quirksmode.org/</url>
<email>ppk@xs4all.nl</email>
</author>
<dc:subject>Personal</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://www.quirksmode.org/blog/">
<![CDATA[<p>Well, a new year has started, and it&#8217;s tradition to give an overview of where you&#8217;re standing. So here&#8217;s mine.</p>

<p>As longtime readers may remember, I was totally burned out at the end of both 2007 and 2008. I&#8217;m happy to report that that trend has been broken; although I was glad to have a little holiday at the end of 2009, I returned to work without noticeable problems. So that&#8217;s good.</p>

<p>However, I have decided that certain aspects of my professional life are in need of a change; notably my public speaking and my compatibility tables.</p>
]]>
<![CDATA[<h3>Conferences</h3>

<p>Basically I&#8217;m going off the conference track for a while in order to spend more time with my mobile phones.</p>

<p>I will honour agreements made beforehand, which means I&#8217;ll speak at the following occasions:</p>

<ol>
	<li><a href="http://www.digitalsparksnw.com/transmissions/"
		class="external">Transmissions 3</a>, Manchester, 28th of January, together with <a href="http://my.opera.com/chrismills/blog/" class="external">Chris Mills</a>. The focus of this meeting will be the mobile Web.</li>
	<li><a href="http://www.techniqueretreat.com/" class="external">Technique Retreat</a>, 29th to
	31st of January in Morecambe, near Manchester. Here I&#8217;ll be a trainer and workshop leader. If you want to do a bit of JavaScript or mobile web development with me around to help you, sign up. There&#8217;s still a few tickets left.</li>
	<li>Dutch: Sessie op de Howest te Kortrijk over het mobiele web, in de week van 29 maart.</li>
	<li>The <a href="http://www.dibiconference.com/" class="external">DIBI</a> conference in Newcastle upon Tyne, 28th of April. I&#8217;ll speak about the mobile Web.</li>
	<li>It&#8217;s possible one item will be added to this list.</li>
</ol>

<p>After that, though, I will be very reticent in accepting new speaking gigs. The problem is not the speaking itself or hanging around at conferences with interesting people and beers, but the travel.</p>

<p>I have to travel to D&uuml;sseldorf at least once per month, and that&#8217;s OK because it&#8217;s always interesting and I&#8217;m also paid for this effort. Besides, I can do it by train.</p>

<p>Conference travel usually involves flying, though, and the latest round of air-travel-related hysterics starts to grate on my nerves. Once more we see an addition of pointless security measures that won&#8217;t make us much safer but will annoy the hell out of everybody in addition to cheerfully violating every single aspect of our privacy.</p>

<p>I object to the whole scare stuff; this is exactly what the bad guys want, and right now authorities around the world are being, well, authoritative and authoritarian in order to reinforce the terrorists&#8217; message. Stupid idiots.</p>

<p>I especially object to the requirement to put bananas in my ears for the entire duration of the flight in order to scare away the terrorists.</p>

<p>So I&#8217;ve decided not to come to SxSW this year. It will be hard on me once the happy tweets start to come in, but flying to the US is becoming less and less attractive, as is the formal content of SxSW. (The parties will be great, I trust.) I have no further US travel planned this year, and as far as I&#8217;m concerned I will not plan any, either.</p>

<p>In addition, conference speaking involves a significant investment of time, and I find myself less and less willing to do that, mostly because it leaves me too little time to do the fundamental mobile research I&#8217;m paid to do and want to do. Besides, I have an awful lot of writing to do about the mobile space, and that, too, is something that&#8217;s suffering from my being on the road so often.</p>

<p>Finally, I&#8217;ve given up JavaScript speaking entirely, and that has reduced my value as a speaker. Traditional web conferences aren&#8217;t really interested in the mobile Web as yet. That&#8217;ll change, but not this year.</p>

<p>Theoretically this loss of speaking gigs could be offset by invitations for mobile conferences, but it turns out that the mobile world has a strong cultural bias against paying flight and hotel for speakers.</p>

<p>So I&#8217;ll have significantly less conferences this year than the past few years. Actually I&#8217;m looking forward to that.</p>

<h3>Compatibility tables</h3>

<p>The second change is my view of my <a href="/compatibility.html">compatibility tables</a>.</p>

<p>A year ago I already noticed that I became less and less interested in measuring the desktop browsers&#8217; compatibility. Everybody just supports all the standards, even IE, and in my last round of desktop testing I did not encounter even one juicy new bug. Great for web development, boring for me.</p>

<p>I&#8217;ve been into the mobile Web for eleven months now, and there&#8217;s little chance I&#8217;ll ever return to the &#8220;fixed web&#8221; and its fast-decreasing problems. That will have consequences for the tables.</p>

<p>When I started my mobile research last March I automatically opened my desktop test pages on mobile phones and as usual started to create tables with test results. There were far less problems than I expected; even purportedly bad browsers such as BlackBerry, NetFront and Obigo supported quite a bit of CSS and JavaScript.</p>

<p>However, now that I&#8217;ve worked on the mobile browsers for a while it&#8217;s becoming increasingly apparent that I&#8217;ve been testing for the wrong stuff.</p>

<p>What I&#8217;m doing in the tables is atomic feature testing. Does browser X support the <code>+</code> selector, or <code>querySelectorAll</code>, or whatever? It turns out that this is the wrong question for mobile.</p>

<p>Mobile browsers have trouble not so much with atomic support, but with supporting the unified whole of web technologies. The BlackBerry browser scores surprisingly well on an atomic level, but once you actually send it a medium-complex JavaScript it gives up and hangs. That&#8217;s something you&#8217;ll never figure out when you only run tests like mine.</p>

<p>So I&#8217;ve started to change my focus. For the past two months I&#8217;ve been doing fundamental research into several areas:</p>

<ol>
	<li>Window and viewport width, with emphasis on media queries. If you use <code>@media all and (max-width: 400px)</code>, exactly which element is measured to see if it&#8217;s smaller than 400px? The answer turns out to be so complicated that I have to redo all my tests to make sure I&#8217;m right. It seems I found at least three different models.</li>
	<li>If you touch the screen of a touchscreen, exactly what happens? Which events fire? How does the browser distinguish between a click and a scroll action? (The short answer is: badly.) I&#8217;m not yet ready with this research; creating the test page took more time than I thought.</li>
	<li>HTML5 (according to my own definition). This is going slowly. How do you test the online and offline events on mobile phones? Ideally, I&#8217;d have to break the data connection without changing anything on the phone itself, because that&#8217;s what will happen in practice. But how?</li>
</ol>

<p>These examples show that my mobile research will have to move beyond the relatively simple tests I&#8217;ve been doing on the desktop for so long.</p>

<p>In turn, that means that I have to change my compatibility tables somehow. I&#8217;m not yet sure how I&#8217;m going to change them and whether I will give up desktop research entirely.</p>

<p>I will continue to host the old ones even if I decide not to update them any more, so you can still come here to find answers to the more basic compatibility questions. But expect some changes to the tables. </p>
]]>
</content>
</entry>
<entry>
<title>HTML5 means whatever you want it to mean</title>
<link rel="alternate" type="text/html" href="http://www.quirksmode.org/blog/archives/2010/01/html5_means_wha.html" />
<modified>2010-01-11T10:43:31Z</modified>
<issued>2010-01-11T10:40:06Z</issued>
<id>tag:www.quirksmode.org,2010:/blog//1.1821</id>
<created>2010-01-11T10:40:06Z</created>
<summary type="text/plain"><p>Last Friday I found evidence for increasing confusion about what
the HTML5 spec actually is. I don&amp;#8217;t have any doubts
on that score: HTML5 is anything you want it to be as long as it&amp;#8217;s
new and cool.

In  a discussion on the WHAT-WG IRC channel
Jeremy got fed up
with the fact that he can&amp;#8217;t just point people at the spec
during his HTML5 evangelism:


I&apos;m doing my damndest to evangelise HTML5 to front end developers and designers but you guys don&apos;t make it easy.
[...]
As if this stuff wasn&apos;t confusing enough for authors already. Now they have to put up with stupid spec obfuscation for the sake of some minor semantic victory for someone somewhere.
[...]
The WHATWG couldn&apos;t make the spec more author-unfriendly if they tried.


Inevitably, it was pointed out that specs aren&amp;#8217;t meant
for developers but for browser vendors. That&amp;#8217;s true but unhelpful, just as it has
been for the past ten years. The ritual dance begins anew.

Personally, I&amp;#8217;m not going to take part in the dance this time. I already know
what the outcome is going to be, and I&amp;#8217;m going to skip the rituals.

Because &amp;#8220;HTML5&amp;#8221; is so vaguely defined we web developers can decide for ourselves
what is part of HTML5 and what isn&amp;#8217;t, and that&amp;#8217;s something I&amp;#8217;m looking
forward to. (If spec defenders don&amp;#8217;t like that they should
have been clearer.)

My favourite examples are geolocation and
Web Storage,
which will feature prominently in my upcoming HTML5 mobile
compatibility tables despite the fact that they&amp;#8217;re not in the spec.
They&amp;#8217;re new, exciting, and absolutely vital on mobile.
They&amp;#8217;re in my HTML5 spec.

HTML5 is the continuation of Web 2.0 by other means, just as Web 2.0 was
the continuation of DHTML.
Apparently we need a vague, all-encompassing term for cool new stuff that we want
browsers to support and clients to buy so we can play with it.

That&amp;#8217;s what HTML5 should be. Because there are new and exciting
things going on, people will start to make
wish lists. Exactly which items on those lists are described in a document called
&amp;#8220;HTML5&amp;#8221; will slowly cease to matter, as long as they have some browser support.

As soon as a certain
feature appears on enough HTML5 lists it will become canonical.
Conversely, the stuff that nobody&amp;#8217;s really interested in will no longer be
HTML5, even if it&amp;#8217;s in a spec with that name.

I consider this a Good Thing. Wisdom of the crowds and all that.
(Again, if spec defenders don&amp;#8217;t like it, they should have been more accomodating
to authors.)

So what&amp;#8217;s in your HTML5 spec? Top three, anyone?</p></summary>
<author>
<name>ppk</name>
<url>http://www.quirksmode.org/</url>
<email>ppk@xs4all.nl</email>
</author>
<dc:subject>HTML5</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://www.quirksmode.org/blog/">
<![CDATA[<p>Last Friday I found evidence for increasing confusion about what
the HTML5 spec actually is. I don&#8217;t have any doubts
on that score: HTML5 is anything you want it to be as long as it&#8217;s new and cool.</p>
]]>
<![CDATA[<p>In  a <a href="http://krijnhoetmer.nl/irc-logs/whatwg/20100108#l-593"
	class="external">discussion</a> on the WHAT-WG IRC channel
<a href="http://adactio.com" class="external">Jeremy</a> got fed up
with the fact that he can&#8217;t just point people at the spec
during his HTML5 evangelism:</p>

<blockquote>
I'm doing my damndest to evangelise HTML5 to front end developers and designers but you guys don't make it easy.<br>
[...]<br>
As if this stuff wasn't confusing enough for authors already. Now they have to put up with stupid spec obfuscation for the sake of some minor semantic victory for someone somewhere.<br>
[...]<br>
The WHATWG couldn't make the spec more author-unfriendly if they tried.
</blockquote>

<p>Inevitably, it was pointed out that specs aren&#8217;t meant
for developers but for browser vendors. That&#8217;s true but unhelpful, just as it has
been for the past ten years. The ritual dance begins anew.</p>

<p>Personally, I&#8217;m not going to take part in the dance this time. I already know
what the outcome is going to be, and I&#8217;m going to skip the rituals.</p>

<p>Because &#8220;HTML5&#8221; is so vaguely defined we web developers can decide for ourselves
what is part of HTML5 and what isn&#8217;t, and that&#8217;s something I&#8217;m looking
forward to. (If spec defenders don&#8217;t like that they should
have been clearer.)</p>

<p>My favourite examples are <a href="http://www.w3.org/TR/geolocation-API/"
	class="external">geolocation</a> and
<a href="http://www.w3.org/TR/webstorage/" class="external">Web Storage</a>,
which will feature prominently in my upcoming HTML5 mobile
compatibility tables despite the fact that they&#8217;re not in the spec.
They&#8217;re new, exciting, and absolutely vital on mobile.
They&#8217;re in <em>my</em> HTML5 spec.</p>

<p>HTML5 is the continuation of Web 2.0 by other means, just as Web 2.0 was
the continuation of DHTML.
Apparently we need a vague, all-encompassing term for cool new stuff that we want
browsers to support and clients to buy so we can play with it.</p>

<p>That&#8217;s what HTML5 should be. Because there are new and exciting
things going on, people will start to make
wish lists. Exactly which items on those lists are described in a document called
&#8220;HTML5&#8221; will slowly cease to matter, as long as they have some browser support.</p>

<p>As soon as a certain
feature appears on enough HTML5 lists it will become canonical.
Conversely, the stuff that nobody&#8217;s really interested in will no longer be
HTML5, even if it&#8217;s in a spec with that name.</p>

<p>I consider this a Good Thing. Wisdom of the crowds and all that.
(Again, if spec defenders don&#8217;t like it, they should have been more accomodating
to authors.)</p>

<p>So what&#8217;s in <em>your</em> HTML5 spec? Top three, anyone?</p>]]>
</content>
</entry>
<entry>
<title>A basic usability test on ten phones</title>
<link rel="alternate" type="text/html" href="http://www.quirksmode.org/blog/archives/2010/01/a_basic_usabili.html" />
<modified>2010-01-18T09:01:44Z</modified>
<issued>2010-01-06T13:05:09Z</issued>
<id>tag:www.quirksmode.org,2010:/blog//1.1819</id>
<created>2010-01-06T13:05:09Z</created>
<summary type="text/plain"><p>B. is an old friend of mine who owns an old Nokia. And when I say old, I mean really
old. It was released somewhere in 2000 or so (the Nokia, not the friendship).
It&amp;#8217;s not a smartphone, to put it mildly, and B. does not use the mobile Web.

Yet.

Pretty soon, however, B. is going to spend a few months in the outlying parts of Indonesia, and
during that time he has to be able to access his business bank account. He was wondering if
a modern mobile phone would fit this use case, and, if so, which one.

When he told me all that I whipped out my iPhone. &amp;#8220;Something
like this, you mean?&amp;#8221; He was suitably impressed, and when I told him I regularly have six
to twelve phones lying around on my desk he practically begged for an opportunity to come by and
try them all in order decide what kind of phone he wants.

That was of course fine by me. User testing is never to be despised, and since B. is not
technical and has no experience with touchscreens to speak of, he is the perfect
test subject.

Last week we held our session, and this entry is the report.

Tested phones: Nokia N97, Samsung M1, HTC Touch Pro (Windows Mobile), SonyEricsson W960i,
Nokia E71, BlackBerry 9500, HTC Pioneer (Android), LG M900, Nokia N900, iPhone.
</p></summary>
<author>
<name>ppk</name>
<url>http://www.quirksmode.org/</url>
<email>ppk@xs4all.nl</email>
</author>
<dc:subject>Mobile</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://www.quirksmode.org/blog/">
<![CDATA[<p>B. is an old friend of mine who owns an old Nokia. And when I say old, I mean <em>really</em>
old. It was released somewhere in 2000 or so (the Nokia, not the friendship).
It&#8217;s not a smartphone, to put it mildly, and B. does not use the mobile Web.</p>

<p>Yet.</p>

<p>Pretty soon, however, B. is going to spend a few months in the outlying parts of Indonesia, and
during that time he has to be able to access his business bank account. He was wondering if
a modern mobile phone would fit this use case, and, if so, which one.</p>

<p>When he told me all that I whipped out my iPhone. &#8220;Something
like this, you mean?&#8221; He was suitably impressed, and when I told him I regularly have six
to twelve phones lying around on my desk he practically begged for an opportunity to come by and
try them all in order decide what kind of phone he wants.</p>

<p>That was of course fine by me. User testing is never to be despised, and since B. is not
technical and has no experience with touchscreens to speak of, he is the perfect
test subject.</p>

<p>Last week we held our session, and this entry is the report.</p>

<p class="smaller">Tested phones: Nokia N97, Samsung M1, HTC Touch Pro (Windows Mobile), SonyEricsson W960i,
Nokia E71, BlackBerry 9500, HTC Pioneer (Android), LG M900, Nokia N900, iPhone.</p>
]]>
<![CDATA[<style>
.phonedata {
	width: 35%;
	float: left;
	margin-right: 15px;
	margin-top: 0;
	margin-bottom: 5px;
	font-size: 90%;
}

div.floater {
	border: 1px dotted #999999;
	border-width: 1px 0;
}

dl.phonedata {
	border: 1px dotted #999999;
	border-width: 1px 0;
	padding-left: 15px;
	padding-top: 10px;
	padding-bottom: 7px;
}

dl.phonedata dt {
	margin: 0;
	float:left;
	margin-right: 5px;
	font-weight: normal;
	color: #666666;
	display: list-item;
}

dl.phonedata dd {
	margin-left: 10px;
	margin-bottom: 3px;
}

div.floater img {
	display: block;
	margin: 10px auto;
}

h3,h4 {
	clear: left;
}

</style>

<h3>Set-up</h3>

<p>B. is not technically inclined, to put it mildly. His knowledge of the Web is best summarised
by this short discussion that ensued when I gave him the HTC Windows Mobile phone:</p>

<dl>
	<dt>Me</dt>
	<dd>[gives Windows Mobile phone with home screen activated]</dd>
	<dt>B.</dt>
	<dd>Ah, Internet Explorer. [Clicks on it while ignoring the Opera logo right next to it]</dd>
	<dt>Me</dt>
	<dd>You know what that is?</dd>
	<dt>B.</dt>
	<dd>Sure, it&#8217;s Microsoft&#8217;s search thingy, right?</dd>
	<dt>Me</dt>
	<dd>Errr ... right ... [pours stiff drink]</dd>
</dl>

<p>On the other hand, B. has an excellent idea of what he needs. He needs access to his bank
account and he has to be able to take common actions.</p>

<p>B. knows his workflow: go to Google, search for the entry page to his banking site, go there,
log in, and do stuff. I warned him he&#8217;d
better skip the first step in Indonesia. The network is bound to be slow, and skipping one
page load is definitely a good idea. I also revealed the existence of bookmarks.</p>

<p>B.&#8217;s target is <a href="https://mijn.ing.nl/internetbankieren/SesamLoginServlet"
	class="external">Mijn ING</a>, which is definitely not the most advanced Dutch banking
site. Most of the problems we encountered were in the later,
password-protected pages, so you can&#8217;t view them in your browser unless you also
bank with ING. (I do, so I might take a shot at researching a few problems.)</p>

<p>We tested ten phones, and in all cases I made sure the phone had a connection and was on the
home screen. After that I handed it over.</p>

<p>The original plan was not to offer B. any further
help, but pretty soon it turned out I had to teach him how to zoom. Not only was he completely unacquainted
with any kind of zooming, but the eight phones that have zooming capability use five different
mechanisms (double-tap, pinch, Android, BlackBerry, and Maemo), and leaving B. to discover them
by himself would have taken far too much time.</p>

<p>I also explained other interface elements I thought might help him. I&#8217;m not sure if
this is good methodology, but it cut down testing time considerably.</p>

<h4>The phones</h4>

<p>As to the actual phones we tested, that was mostly a matter of coincidence. I&#8217;d taken
a lot of touchscreens with me from D&uuml;sseldorf because I&#8217;m doing some complicated
touch research for Vodafone. In addition, all four phones I received as a gift from interested
parties are touchscreens, too.</p>

<p>I&#8217;d have loved to include the Palm Pre in this test, but at the time of writing I have
not yet figured out how to skip the sign-up screen on my locked British one.</p>

<p>I also left out the Samsung F700 because I exclusively use it to torture UX experts.
That brought the total number of phones down to ten.</p>

<p>Nine out of these ten were touchscreens (with the Nokia E71 as the exception). In retrospect
it would have been better if we&#8217;d had one or two more non-touchscreens to test.</p>

<p>I decided on the testing order in advance. On the one hand I wanted to bunch up the phones
I thought good toward the end of the session, because I wanted to see if they&#8217;re really
that much better than all the others in the opinion of an outsider without any experience.</p>

<p>On the other hand I didn&#8217;t want to start with the
very worst phones because that would only depress B. So I started with the most medium phone
I could think of, the N97.</p>

<p>As a practical matter, I had to alternate
wifi-capable phones with SIM-only phones in order to have time to insert the SIM card and start
up the next SIM-only phone while B. was working with a wifi-capable phone. The BlackBerry,
especially, needs a lot of startup time.</p>

<p>Finally, I decided to use the default browser on every phone. I do not believe that many
non-technical users will download another browser when their phone contains one that appears
to be working. Besides, I&#8217;d have to explain the &#8220;other browsers&#8221; concept
to B., and I decided that that would take too much time.</p>

<h3>The testing</h3>

<p>I handed B. the phones in the order they&#8217;re treated below and recorded his impressions.</p>

<h4>Nokia N97</h4>

<dl class="phonedata">
	<dt>OS</dt><dd>Symbian S60v5</dd>
	<dt>Browser</dt><dd>S60 WebKit</dd>
	<dt>Keyboard</dt><dd>hardware</dd>
	<dt>Wifi</dt><dd>yes</dd>
	<dt>Zooming</dt><dd>double-tap</dd>
	<dt>Test result</dt><dd>mostly succeeded</dd>
	<dt>Disclosure</dt><dd>phone on loan from Vodafone</dd>
</dl>

<div class="floater">
	<img src="/pix/phones/Nokia_N97.jpg">
</div>

<p>Starting up an S60 WebKit when you want to use a wifi connection is a total disaster,
so I did that for B., but otherwise I left him to his own devices.</p>

<p>Since this was the very first phone in the test, neither B. nor I had any expectations.
I was mainly curious to see how he worked with the phone. In general this first encounter
went rather well, especially once B. discovered the four-way navigation pad on the left.</p>

<p>In fact, B. took only a few minutes to figure out the single most serious problem with
touchscreen interfaces. He ran into trouble when he wanted to click on something but the
browser scrolled instead, or vice versa. He thought it was just him being dumb, but I could
disabuse him of that notion.</p>

<p>The touch event is <em>way</em> overloaded.
Touching the screen may start a
click, a scroll, or a zoom action, and the less able a browser is to distinguish between these
actions, the lousier the interface appears to be. Handling these distinctions well
is what separates the iPhone from all other phones.</p>

<p>Because the links on the banking site are pretty bunched up B. had to use his nail to click
on links. The discovery of the stylus two phones later helped measurably here. I forgot
to explain zooming to him in this case, but the S60 WebKit zoom is lousy, anyway.</p>

<p>It turns out that the S60 WebKit sometimes crashes on one particular banking page.
I was not able to quickly figure out whether it was a problem with the browser or a
problem with the site.</p>

<h4>Samsung M1</h4>

<dl class="phonedata">
	<dt>OS</dt><dd>Linux</dd>
	<dt>Browser</dt><dd>Opera Mobile</dd>
	<dt>Keyboard</dt><dd>software</dd>
	<dt>Wifi</dt><dd>no</dd>
	<dt>Zooming</dt><dd>double-tap</dd>
	<dt>Test result</dt><dd>succeeded</dd>
	<dt>Disclosure</dt><dd>phone on loan from Vodafone</dd>
</dl>

<div class="floater">
	<img src="/pix/phones/Samsung_M1.jpg">
</div>

<p>I handed B. this phone in natural state, and not with the home screen activated.
He figured out the slider by himself, but then he saw the Vodafone
360 screen (see screenshot), and his first reaction was
&#8220;what a confusing interface.&#8221; Vodafone 360 can indeed be daunting if you hardly know
what a social network is. B. is clearly not part of the M1&#8217;s target audience.</p>

<p>On this phone B. encountered his first software keyboard, and he gave it cautiously positive rating:
it didn&#8217;t work as badly as he&#8217;d feared. Still, later on he revised this opinion.
Especially in portrait mode the keyboard and the individual keys were too narrow.</p>

<p>This phone uses Opera, and this particular Opera has been extended
with several interface features: <a href="http://labs.opera.com/news/2009/03/05/"
class="external">Opera Fingertouch</a>, as well as a zoomer that works by sliding a
block from top (zoom out) to bottom (zoom in). This block becomes visible on double-tap.</p>

<p>B. used Fingertouch intuitively and without commenting on it. Not using it is not an
option: if Opera doesn&#8217;t understand which link you want to click, it fires up
Fingertouch. So B. had to use it, and that turned out not to be a problem.</p>

<p>As to the zoom, it didn&#8217;t really work for B. That is not entirely Opera&#8217;s
fault; one of the M1&#8217;s problems is that the touchscreen may sometimes be a bit
unresponsive when you double-tap or drag the zoom block.</p>

<p>All in all this phone was not a success.</p>

<h4>HTC Touch Pro</h4>

<dl class="phonedata">
	<dt>OS</dt><dd>Windows Mobile 6.5</dd>
	<dt>Browser</dt><dd>IE</dd>
	<dt>Keyboard</dt><dd>hardware</dd>
	<dt>Wifi</dt><dd>yes</dd>
	<dt>Zooming</dt><dd>double-tap or menu</dd>
	<dt>Test result</dt><dd>succeeded</dd>
	<dt>Disclosure</dt><dd>phone is a gift from Microsoft</dd>
</dl>

<div class="floater">
	<img src="/pix/phones/HTC_TD2.jpg">
</div>

<p>It was when I handed him this phone that B. and I had the short conversation I quoted
at the start of this article. He started up IE
and surfed to his banking account without many problems.
I had to point out where IE hides its menu, but then he started using IE&#8217;s sliding zoom,
which is similar to Opera&#8217;s, except that this phone&#8217;s way
more responsive.</p>

<p>B. absolutely loved the stylus that comes with this phone, and went back to the M1 and
N97 to test whether it also worked there. He kept trying it with all other phones, too,
and decided to get one no matter what kind of phone he would eventually buy.</p>

<p>He was also glad he could once again work with
a hardware keyboard. So glad, in fact, that he started using the arrow keys on the hardware keyboard
in order to scroll the page, just as you would on a desktop computer.</p>

<p>My notes say that these keys don&#8217;t work, but when I retested it they worked as
expected. However, there&#8217;s a perceptible pause in IE before the scrolling starts. Maybe
that&#8217;s what threw us off track.</p>

<p>My particular Touch Diamond has one extremely annoying bug: when you press the &#8220;1&#8221;
on the hardware keyboard, the phone goes back to the home screen. This is especially funny
when your banking user name contains a &#8220;1.&#8221; Fortunately I knew we could use the
software keyboard to type the offending character; it&#8217;s unlikely B. would have figured
that out by himself.</p>

<p>As far as I&#8217;m concerned the idiot who thought up this &#8220;feature&#8221; should be
taken behind a shed and shot. I asked B. not to consider it when judging the phone.</p>

<h4>SonyEricsson W960i</h4>

<dl class="phonedata">
	<dt>OS</dt><dd>Symbian UIQ</dd>
	<dt>Browser</dt><dd>Opera Mobile</dd>
	<dt>Keyboard</dt><dd>numerical</dd>
	<dt>Wifi</dt><dd>no</dd>
	<dt>Zooming</dt><dd>none</dd>
	<dt>Test result</dt><dd>more or less succeeded</dd>
	<dt>Disclosure</dt><dd>phone on loan from Vodafone</dd>
</dl>

<div class="floater">
	<img src="/pix/phones/SE_W960i.jpg">
</div>

<p>This phone is by far the oldest we tested, and it&#8217;s easy
to see that age does make a difference in the mobile space. Not that it doesn&#8217;t work,
but everything is a bit cranky, and both the OS and the browser (Opera 8.65) are older ones.</p>

<p>This is also the single tested phone with a numerical keyboard. That was no
problem; B. has been using them exclusively for years and is way faster with them than I am.
He commented favourably on the small menu top-right that shows all characters that reside under
a certain key.</p>

<p>On this phone I showed him Opera&#8217;s mobile view, in
which the entire site is displayed in a narrow column that fits the screen. B. clearly
liked it. Unfortunately the site didn&#8217;t: the actual data never showed up in the mobile
view.</p>

<p>Still B. did not like this phone. Too clunky and kludgy.
The only thing I regret is that I plain forgot to point out the scroll wheel on the side.</p>

<h4>Nokia E71</h4>

<dl class="phonedata">
	<dt>OS</dt><dd>Symbian S60v3</dd>
	<dt>Browser</dt><dd>S60 WebKit</dd>
	<dt>Keyboard</dt><dd>hardware</dd>
	<dt>Wifi</dt><dd>yes</dd>
	<dt>Zooming</dt><dd>none</dd>
	<dt>Test result</dt><dd>failed due to site bug</dd>
	<dt>Disclosure</dt><dd>phone on loan from Vodafone</dd>
</dl>

<div class="floater">
	<img src="/pix/phones/Nokia_E71.jpg">
</div>

<p>Now we come to the single phone B. already knew because his girlfriend owns it. As a result
B. is less likely to buy it, although he readily admitted this had nothing to do with
its technical specs.</p>

<p>Again I opened the browser for him due to Symbian&#8217;s serious mishandling of the connection
between wifi and browser.</p>

<p>Now B. had to type in the URL to start. He touched the screen repeatedly, and I had to remind
him that this is the single non-touchscreen phone in the entire test. He asked me how to enter
a URL, and I had to take over the phone and use it in order to remember that you just have to
start typing and the browser relegates your keypresses to the location bar.</p>

<p>B. absolutely loved the four-way navigation and S60&#8217;s pseudo-cursor. It made the interface
much clearer to him, and he couldn&#8217;t possibly go wrong when selecting a link to click.</p>

<p>When we came to the actual target page, though, it turned out not to work. After the normal
header the page said &#8220;fastinnerhtml&#8221; and then nothing.</p>

<p>Now in itself this is a true statement &#8212; I
<a href="/dom/innerhtml.html">proved as much</a> back when nobody had ever heard of performance
testing. Still, it&#8217;s an odd message to show on your site.
I haven&#8217;t yet decided whether the site&#8217;s programmer is a total
idiot or has a wonderful sense of humor.</p>

<p>If the site had actually worked the E71 would have scored very well in B.&#8217;s opinion.</p>

<h4>BlackBerry 9500</h4>

<dl class="phonedata">
	<dt>OS</dt><dd>RIM</dd>
	<dt>Browser</dt><dd>BlackBerry</dd>
	<dt>Keyboard</dt><dd>software</dd>
	<dt>Wifi</dt><dd>no</dd>
	<dt>Zooming</dt><dd>click (in) or hardware Back button (out)</dd>
	<dt>Test result</dt><dd>failed due to browser bug</dd>
	<dt>Disclosure</dt><dd>phone is a gift from RIM</dd>
</dl>

<div class="floater">
	<img src="/pix/phones/BlackBerry_9500.jpg">
</div>

<p>Back to touchscreens. The BlackBerry came next, and pretty soon B. ran into severe interface
problems when trying to click on options in the browser menu.</p>

<p>Now in theory the BlackBerry interface is pretty good. You have to actually depress the
screen in order to activate something, but as soon as your finger touches an option it
lights up in blue.</p>

<p>The problem is that your finger will probably move a few pixels between touching the screen
and clicking on it, and it happens too often that the correct option will highlight, but you&#8217;ll
click on the wrong one because of this finger sliding. This is a generic BlackBerry problem that
holds back an otherwise well thought-out system.</p>

<p>Then, as I knew he would, B. accidentally pressed the hardware button on the left side of the phone.
The screen went white, and after a few seconds a woman&#8217;s voice said &#8220;Sagen Sie einen
Befehl!&#8221; (It&#8217;s a German BlackBerry.) I taught B. the proper response (&#8220;Halts
Maul&#8221;) and warned him not to press the button again.</p>

<p>Login was succesful, but then the site sent the BlackBerry browser a lot of JavaScript,
and that&#8217;s something this browser can&#8217;t handle. It just gave up after a
while, as it&#8217;s wont to do, and the site did not work.</p>

<p>Good thing BlackBerry is going to use a WebKit-based browser in the future.</p>


<h4>HTC Pioneer</h4>

<dl class="phonedata">
	<dt>OS</dt><dd>Android 1.5</dd>
	<dt>Browser</dt><dd>Android WebKit</dd>
	<dt>Keyboard</dt><dd>software</dd>
	<dt>Wifi</dt><dd>yes</dd>
	<dt>Zooming</dt><dd>move finger down and use special menu</dd>
	<dt>Test result</dt><dd>succeeded</dd>
	<dt>Disclosure</dt><dd>phone on loan from Vodafone</dd>
</dl>

<div class="floater">
	<img src="/pix/phones/HTC_Pioneer.jpg">
</div>

<p>Then we came to the Android, and I had high hopes of this phone. Until now B. had only used
touchscreen phones that I knew were flawed in some way or another.
I was curious how he&#8217;d react to a good one. He did not disappoint. His
first remark was: &#8220;Oh, this is a lot better than the previous ones!&#8221;</p>

<p>Still, the more B. used it the less enthousiastic he became. He deplored the lack of a
hardware keyboard and again complained that it was so hard to select a link to click.
When I pointed out the trackball he got the idea immediately but thought
it was far too sensitive. He had to try very hard to use it right. I searched for a trackball
setting, but there doesn&#8217;t seem to be any.</p>

<p>Filling out the login form turned out to be very hard, especially because B. held the phone
in landscape orientation. In that case, one form field and the software keyboard combine
to fill the entire screen, and it&#8217;s not at all clear how to proceed to the next field.</p>

<p>It turned out we had to press the Enter key to exit a text input.
Later on I tried a textarea in landscape mode, and pressing the Enter key (correctly) added
a line break, but didn&#8217;t exit the textarea. It turns out you have to rotate the phone back to portrait mode.
Not ideal.</p>

<p>B. was imperfectly satisfied with this Android. It had given him an idea of how a
proper touchscreen should work, but had let him down when it came to the details, even though
he reached the banking site and could do what he wanted to do.</p>

<h4>LG KM900</h4>

<dl class="phonedata">
	<dt>OS</dt><dd>LG proprietary</dd>
	<dt>Browser</dt><dd>Obigo</dd>
	<dt>Keyboard</dt><dd>software</dd>
	<dt>Wifi</dt><dd><del>no</del> yes</dd>
	<dt>Zooming</dt><dd>pinch</dd>
	<dt>Test result</dt><dd>failed due to Google Web Toolkit</dd>
	<dt>Disclosure</dt><dd>phone on loan from Vodafone</dd>
</dl>

<div class="floater">
<img src="/pix/phones/LG_KM900.jpg">
</div>

<p>When testing the LG phone B. was very happy with the slight vibration that accompanies
every single keypress, but less
so with the total lack of feedback that clicking on a link yields. Did I press the right one?
Is something happening? The LG/Obigo interface doesn&#8217;t give a clue.</p>

<p>Still, we made progress. Until Google pulled its evil trick.</p>

<p>As usual, B. went to Google first in order to search
for the entry link to his site. It turns out that Google in its infinite wisdom sends this
Obigo browser through GWT hell, which causes the banking site to be completely
unusable.</p>

<p>I considered delving deeper into this problem, but first asked B. if he thought this phone
was a serious contender. When he said No we decided to move on to the next one.</p>

<p>Still, the fact that Google messes with web content is unacceptable.
And GWT is an pestilence that should be eradicated from the world.
Expect to hear more of this.</p>

<p class="smaller">Late update: Four days after publishing this article I found out that this phone <em>does</em> support wifi.</p>

<h4>Nokia N900</h4>

<dl class="phonedata">
	<dt>OS</dt><dd>Linux</dd>
	<dt>Browser</dt><dd>MicroB (Gecko-based)</dd>
	<dt>Keyboard</dt><dd>hardware</dd>
	<dt>Wifi</dt><dd>yes</dd>
	<dt>Zooming</dt><dd>move finger in circles or use hardware button</dd>
	<dt>Test result</dt><dd>succeeded</dd>
	<dt>Disclosure</dt><dd>phone is a gift from Nokia</dd>
</dl>

<div class="floater">
	<img src="/pix/phones/Nokia_N900.jpg">
</div>

<p>Then came the Nokia N900, the first Maemo Linux-based phone, which I have high hopes of.
I had to show B. the hardware zoom button at the top of the device, but once he got that
the phone worked well.</p>

<p>So well, in fact, that while I put away the LG phone, poured some more drinks, and made a few notes,
B. had already found, opened and used his banking site.</p>

<p>This was the first phone that he didn&#8217;t need help with at all, even for
a minor issue. It just worked. And that&#8217;s rare.</p>

<p>B. commented again that it&#8217;s so hard on some phones to
distinguish click actions from scroll actions from zoom actions, but that the hardware zoom button
solved most of that problem.</p>

<p>When B. discovered that the HTC Touch Diamond&#8217;s pen also works with the Maemo, he became
even more happy.</p>

<h4>iPhone</h4>

<dl class="phonedata">
	<dt>OS</dt><dd>iPhone</dd>
	<dt>Browser</dt><dd>Safari WebKit</dd>
	<dt>Keyboard</dt><dd>software</dd>
	<dt>Wifi</dt><dd>yes</dd>
	<dt>Zooming</dt><dd>pinch</dd>
	<dt>Test result</dt><dd>succeeded</dd>
</dl>

<div class="floater">
	<img src="/pix/phones/iPhone.jpg">
</div>

<p>Finally, the iPhone. I&#8217;d deliberately saved it for last, and was not disappointed.
I only had to tell him the browser is called Safari, and off he was, logging in and working
with his banking site.
&#8220;Oh,&#8221; B. said, &#8220;so <em>this</em> is how a touchscreen is supposed to work.&#8221;
</p>

<p>Finding and using the site took as little time as it had on the Maemo, and
after B. was done he again tried a click, a scroll, and a zoom action, and commented that this
phone <em>did</em> understand what he was trying to do instead of mostly guessing wrong.</p>

<p>He concluded that he understood the iPhone hype fully now; all the praise was well deserved.</p>

<h3>The verdict</h3>

<p>Finally I asked B. to rank the ten phones from good to bad. This ranking mostly confirmed
the picture I had formed of the phone market, except that the iPhone and especially the Android
ended up lower on the list than I expected.</p>

<ol class="phonedata">
	<li>Nokia N900 (Maemo)</li>
	<li>iPhone</li>
	<li>Nokia N97</li>
	<li>HTC Windows Mobile</li>
	<li>HTC Android</li>
	<li>Nokia E71</li>
	<li>LG KM900</li>
	<li>BlackBerry 9500</li>
	<li>Samsung M1</li>
	<li>SonyEricsson W960i</li>
</ol>

<p>B.&#8217;s most severe problem was the lack of distinction some phones make between a click,
zoom, and scroll action, and this fits seamlessly into the larger picture of the market as a
whole. Of the pure touchscreen devices, only the iPhone has truly solved this problem. The
others are in various stages of catching up with Apple.</p>

<p>B. also had trouble with clicking on the right links because they&#8217;re too bunched
up in his banking site. The most obvious solution to that problem is zooming, and therefore
his top two consisted of the phones that allow for graceful, easy zooming.</p>

<p>More in general, B. is a hardware man. He consistently put the phones with better hardware
controls higher on his list, with the iPhone and the E71 as the only exceptions. He has
also decided to buy a stylus no matter which phone he&#8217;ll eventually get.</p>

<p>In the end, after much deliberation, B. put the Nokia N900 in the top slot above the iPhone.</p>

<p>He was extremely careful to note that he did so only because he
felt that the hardware keyboard and zoom button were most conductive to his personal
goal of accessing and working with his online banking site. He could imagine that the
iPhone would be better suited for other purposes.</p>

<p>This confirms my hunch that Nokia is on the right track with the Maemo platform. The next
Maemo phone, I think, will be something to watch.</p>

<p>To my surprise he ranked Windows Mobile above Android. Although he liked Android, it did
not entirely deliver on its promises as far as B. was concerned. Windows Mobile promised
less, but delivered.</p>

<p>Curiously, the six best phones in his opinion were also the wifi-capable phones, while the
four SIM-only phones made up the bottom of the list. Apparently support for wifi is a measure
of phone quality.</p>

<p>All in all this was a very useful session, both for B. and for me. Maybe I&#8217;ll repeat this
later on, with another friend (and probably a slightly different line-up of phones).</p>

<p><b>Update</b>: A week after this article appeared, B. told me he&#8217;d bought a Nokia N72. His reasoning was that no touchscreen save for the iPhone was good enough, and het got the N72 for free (with subscription, obviously). So no touchscreen for B.</p>

<p><b>Later update</b>: It turns out B. bought an E72, not an N72. I installed Opera Mini on it just to be on the safe side.</p>]]>
</content>
</entry>
<entry>
<title>iPhone thoughts I &amp;#8212; Cocoa Touch framework</title>
<link rel="alternate" type="text/html" href="http://www.quirksmode.org/blog/archives/2009/11/iphone_thoughts.html" />
<modified>2010-01-06T13:38:39Z</modified>
<issued>2009-11-25T22:55:31Z</issued>
<id>tag:www.quirksmode.org,2009:/blog//1.1806</id>
<created>2009-11-25T22:55:31Z</created>
<summary type="text/plain"><p>I have several more things to say in the Web apps vs. native apps debate, and I&amp;#8217;ve decided that a few smaller posts treating just one subject would be the best form. Today we kick off with the Cocoa Touch framework.

John Gruber  wants me to mention the Cocoa Touch framework. He feels  that its excellence is an important factor in the success of native iPhone apps.

Point is, although Gruber&amp;#8217;s probably right, he ought to be wrong.

</p></summary>
<author>
<name>ppk</name>
<url>http://www.quirksmode.org/</url>
<email>ppk@xs4all.nl</email>
</author>
<dc:subject>Mobile</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://www.quirksmode.org/blog/">
<![CDATA[<p>I have several more things to say in the Web apps vs. native apps debate, and I&#8217;ve decided that a few smaller posts treating just one subject would be the best form. Today we kick off with the Cocoa Touch framework.</p>

<p>John Gruber <a href="http://daringfireball.net/linked/2009/11/24/ppk-followup" class="external"> wants me to mention the Cocoa Touch framework</a>. He feels  that its excellence is an important factor in the success of native iPhone apps.</p>

<p>Point is, although Gruber&#8217;s probably right, he <em>ought</em> to be wrong.</p>

]]>
<![CDATA[<p>If all you have is a hammer, every problem becomes a nail. If all you know is the Cocoa Touch framework, every app you make will become a native iPhone one, whether that&#8217;s a good idea or not.</p>

<p>If you have to choose between, whatever, two kinds of Web servers, picking the one with the better tools (libraries and such) is an excellent idea. They&#8217;re both Web servers, after all. The net result to your end users will be the same, but your job will become easier.</p>

<p>It&#8217;s different with Web apps vs. native apps.</p>

<p>The net result of a Web app is that anyone with a modern browser can use it, though on some devices the user experience is less-than optimal. The net result of a native app is a superior experience on the iPhone, and nothing for the rest of the world.</p>

<p>What do your users want you to pick, superior user experience or vastly bigger reach? Do you need device APIs, and is there a way to get paid? Those are the questions that matter right now.</p>

<p>Cocoa Touch is excellent. There, I said it &#8212; without having the faintest idea what I&#8217;m talking about, obviously.</p>

<p>But it&#8217;s just a tool. It shouldn&#8217;t matter.</p>
]]>
</content>
</entry>
<entry>
<title>Native iPhone apps vs. Web apps</title>
<link rel="alternate" type="text/html" href="http://www.quirksmode.org/blog/archives/2009/11/native_iphone_a.html" />
<modified>2010-01-06T13:40:02Z</modified>
<issued>2009-11-24T13:09:18Z</issued>
<id>tag:www.quirksmode.org,2009:/blog//1.1805</id>
<created>2009-11-24T13:09:18Z</created>
<summary type="text/plain"><p>Well, that was an interesting ride. Besides passionate agreements, my previous post also elicited passionate disagreements.

My post could be construed as a rant. Hell, parts of it were a rant. (Nobody said this blogging stuff is easy, especially when you&amp;#8217;re passionate about something. But if I can&amp;#8217;t speak my mind here, what&amp;#8217;s the point of having a blog?)

Several people I respect a lot said that I&amp;#8217;d made a stupid mistake and was just plain wrong. After some thought I decided they are right.

I was wrong about Web apps being able to replace native apps right now. I was wrong about the iPhone developers&amp;#8217; mindset. They aren&amp;#8217;t stupid.

Special thanks go to
Dion Almaer and Faruk Ates, who took the time and trouble to write a factual rebuttal of some points, as well as Andrew Hedges, who provided me with a few examples when I needed them most.

While writing the current article I figured out there&amp;#8217;s a whole lot of undigested information in my head that I instinctively used in my previous article but didn&amp;#8217;t bother to explain properly. This is especially true for payments and the general state of Web technologies on mobile.

Despite my mistakes the whole thing seems to have kick-started a solid, sensible discussion about the differences between native apps and Web apps, and which one is better under which circumstances. I&amp;#8217;d like to continue that discussion.
</p></summary>
<author>
<name>ppk</name>
<url>http://www.quirksmode.org/</url>
<email>ppk@xs4all.nl</email>
</author>
<dc:subject>Mobile</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://www.quirksmode.org/blog/">
<![CDATA[<p>Well, that was an interesting ride. Besides passionate agreements, my <a href="/blog/archives/2009/11/apple_is_not_ev.html">previous post</a> also elicited passionate disagreements.</p>

<p>My post could be construed as a rant. Hell, parts of it <em>were</em> a rant. (Nobody said this blogging stuff is easy, especially when you&#8217;re passionate about something. But if I can&#8217;t speak my mind here, what&#8217;s the point of having a blog?)</p>

<p>Several people I respect a lot said that I&#8217;d made a stupid mistake and was just plain wrong. After some thought I decided they are right.</p>

<p class="accent">I was wrong about Web apps being able to replace native apps <em>right now</em>. I was wrong about the iPhone developers&#8217; mindset. They aren&#8217;t stupid.</p>
]]>
<![CDATA[<p>Special thanks go to
<a href="http://almaer.com/blog/iphone-developers-are-not-arrogant-and-stupid" class="external">Dion Almaer</a> and <a href="http://farukat.es/journal/2009/11/347-iphone-developers-arent-stupid-ppk" class="external">Faruk Ates</a>, who took the time and trouble to write a factual rebuttal of some points, as well as <a href="http://andrew.hedges.name/" class="external">Andrew Hedges</a>, who provided me with a few examples when I needed them most.</p>

<p>While writing the current article I figured out there&#8217;s a whole lot of undigested information in my head that I instinctively used in my previous article but didn&#8217;t bother to explain properly. This is especially true for payments and the general state of Web technologies on mobile.</p>

<p>Despite my mistakes the whole thing seems to have kick-started a solid, sensible discussion about the differences between native apps and Web apps, and which one is better under which circumstances. I&#8217;d like to continue that discussion.</p>

<p>My original idea was: with a few exceptions, native apps could just as well be written as Web apps. That would bring much better interoperability as well as avoiding Apple&#8217;s insane App Store approval process.</p>

<p>Now let&#8217;s see exactly where I was right and where I was wrong.</p>

<h3>It&#8217;s all about the money</h3>

<p>The strongest argument against my idea is that the App Store offers an easy and convenient way of making money with your apps. I did in fact think about this a lot while writing the original article, but in the end decided not to mention it. That was a mistake.</p>

<p>Mobile payments are a complicated subject that I have my own thoughts about; thoughts I planned to discuss in a later blog entry.</p>

<p>I feel that the mobile operators have the strongest cards when it comes to mobile payments because they are <em>already</em> billing everybody and are <em>already</em> able to identify people through their SIM card. Their system has to be extended in order to accomodate online payments, but that seems doable. In fact, <a href="http://www.vodafone.com/start/media_relations/news/group_press_releases/2009/mobile_internet_experience.html" class="external">Vodafone is already doing it</a>.</p>

<p>Since Vodafone is my main client now, my plan was to get some more publishable info about how it will work and how it impacts Web development before blogging about it. This crisis has forced my hand, however, so I can&#8217;t offer you the level of detail I wanted.</p>

<p>Suffice it to say that a system that <em>might</em> fulfill the same function as the App Store, but works throughout the Web on (presumably) all Vodafone devices (and possibly many more), is probably coming.</p>

<p>This idea was in the front of my mind while I wrote the article, but I did not realise that I had not yet explained it to my readers, nor that a system that&#8217;s not yet there has no bearing on a comparison in the present.</p>

<p>In addition, I have some qualms about the whole payment concept. I guess I&#8217;m just old-fashioned and long for the days where developers would develop just for the heck of it and worry about money later.</p>

<p>Frankly, I hadn&#8217;t factored immediate payments in my mental model of an app developer. And I should have, even though my inner geek is saddened by the thought.</p>

<p>Thus I&#8217;m forced to concede this point. Right now, getting paid is a lot easier through the App Store than through any other system.</p>

<h3>Getting attention</h3>

<p>Then comes the discoverability argument. Apparently, getting attention through the App Store is the superior way of disseminating your app. I&#8217;d like some more data on that point.</p>

<p>The question is: How do users find their apps?</p>

<ol>
	<li>By searching the App Store,</li>
	<li>because friends give them tips,</li>
	<li>or because of old-fashioned marketing?</li>
</ol>

<p>I have no idea what the answer is. Anyone? I myself started with searching, and have now mostly gone to friends&#8217; referrals, but I have no idea how representative I am.</p>

<p>The discoverability argument <em>only</em> makes sense if the answer is searching. Friends&#8217; referrals and marketing work just as well for Web apps.</p>

<p>So I&#8217;m undecided pending further data.</p>

<h3>Device APIs</h3>

<p>As I said in the original article, device APIs that give access to device functionality like the camera, the file system, the address book, and so on, are coming. There are some security considerations, and the user will have to give permission for most forms of access, but those problems will be solved.</p>

<p>Geolocation is accessible from the browser already. That&#8217;s a start, but it&#8217;s not enough.</p>

<p>An app that requires access to device APIs will have to be native for now. Only simple location-based systems are possible on the Web side of things.</p>

<p>My problem is that I&#8217;ve been living with device APIs as a reality for months now, and have seen a few simple examples. I just plain forgot they&#8217;re not actually there yet.</p>

<p>Sorry about that.</p>

<h3>Offline Web apps</h3>

<p>Let&#8217;s debunk one argument. It is perfectly possible to write an offline Web app for Safari iPhone. The browser supports appcache and local storage for storing the application and its data, respectively.</p>

<p>Both Web apps and native apps can work offline. Thus this argument has no value.</p>

<h3>Interoperability</h3>

<p>Let&#8217;s chalk up one inevitable point for Web apps. They beat native apps hands down when it comes to interoperability.</p>

<p>To my way of thinking this is an extremely important point. A large part of my previous post was born out of exasperation that I had to explain interoperability <em>yet again</em>.</p>

<p>Could people please be made to see the value of interoperability instantaneously and naturally? Maybe implant something in their heads or something? It&#8217;d save me a lot of energy. Thanks.</p>

<p>Interoperability is trumped by UX in the long run, and also by easy payments and lack of device APIs in the short run.</p>

<p>I still feel that the developers of some iPhone apps, especially those that give quick access to specific online data (tweets or train times, for instance), would have been better off publishing something interoperable. They&#8217;re competing against similar apps, and being used by 0.1% of the entire mobile Web has much more potential value than being bought by 1% of the iPhone platform.</p>

<h3>UX</h3>

<p>Then we come to UX. UX is really the crux of the matter. All other problems can be solved, but UX-wise a native app will likely retain an indefinite advantage over Web apps. Still, the question is whether should give up interoperability for UX&#8217;s sake in all cases.</p>

<p>In my original article I already cautioned that graphic- and processor-heavy games were a special case. They cannot be ported to the Web. Whatever else it is, the browser is no immersive game platform.</p>

<p>But I might have overestimated the current state of Safari iPhone as a platform. Two commenters pointed out two immediate problems.</p>

<ol>
	<li>Safari iPhone doesn&#8217;t support <code>position: fixed</code>, which makes it hard to create anything remotely resembling a static menu bar.</li>
	<li>When you set a click event handler on anything, it flashes when the user touches it.</li>
</ol>

<p> No doubt some research will turn up many more such problems.</p>

<p>They are just browser compatibility problems, though, and I never consider browser compatibility problems show-stoppers. (No good Web developer does, but my case may be a bit more extreme than most.)</p>

<p>I&#8217;m going to work on the flash problem later. I have to do massive event research on mobile and desktop anyway, and the iPhone&#8217;s event model, especially where it concerns the touch action, is high on my priority list.</p>

<p>But if it can&#8217;t be solved, would that matter? Shouldn&#8217;t we treat it as the equivalent of the dotted outline; a sure-fire way of letting the user know he has in fact clicked on something? Should we deliberately decide to leave the effect alone, because it&#8217;s a platform usability and/or accessibility feature?</p>

<p>Questions, questions. These things are not as simple as they look.</p>

<h4>Trade-off</h4>

<p>As to <code>position: fixed</code>, Andrew Hedges <a href="http://www.quirksmode.org/blog/archives/2009/11/apple_is_not_ev.html#c12824">said</a>:</p>

<blockquote>
<p>One clever developer came up with a nearly native feeling workaround using JavaScript and hardware accelerated CSS transitions, but &#8220;nearly native feeling&#8221; is just a little worse than native.</p>
</blockquote>

<p>... if your goal is to emulate a native app perfectly. If that goal is so important to you that you&#8217;re willing to sacrifice interoperability for UX brilliance, yes, then a native app is the way to go.</p>

<p>But there&#8217;s a trade-off involved here. Do you want perfect UX, or do you want decent interoperability? Does it make sense for <em>every single app</em> to choose UX over interoperability? As I said above, I feel there&#8217;s a category of apps where the latter might be more important.</p>

<p>After all, a nearly native feeling app, or even an app that feels distinctly non-native, can be a perfect tool for a specific set of actions if it&#8217;s easy to use.</p>

<p>Does the pure look-and-feel, the cool extras, matter that much in every situation? Experience on the Web suggests this is not the case. Ugly websites can be very popular. As long as users can do what they want to do in a reasonably convenient way, they&#8217;re willing to put up with lack of polish.</p>

<p>Flashback to eleven years ago. The graphic designer tells me to publish the entire body text as a JPG because her choice of fonts is not available on browsers. I, an intern having no say in the matter, do it, but feel dirty.</p>

<p>Are we walking into the same trap with native UX? Are we sacrificing too much interoperability on the altar of eye candy? I would not be surprised if that turns out to be the case for some apps.</p>

<h3>Web developer on mobile</h3>

<p>Right now is a lousy time to be a Web developer passionate about the mobile space.</p>

<h4>I hate you</h4>

<p>On the one hand the mobile Web is postponed <em>yet again</em> by the success of a proprietary system. An excellent system, but still proprietary. It sucks up far too much energy that could have gone to an interoperable mobile Web.</p>

<p>Worse, Apple&#8217;s success has caused every single mobile player to hurriedly start working on an app store, and the situation is getting ridiculous. There are now two to four new app stores being opened every month. The pace will slacken somewhat in a little while, but the situation has already grown preposterous.</p>

<h4>I love you</h4>

<p>On the other hand, many of these app stores work with Web technologies. They all support slightly different things, but hey, they resemble each other. And they definitely work with HTML, CSS, and JavaScript.</p>

<p>Web is hip on the mobile space. Most players have declared their love for Web technologies in some way or another.</p>

<p><a href="http://www.betavine.net/bvportal/resources/widgets/vodafone" class="external">Vodafone</a>, <a href="http://www.opera.com/business/solutions/widgets/benefits/index.dml" class="external">Opera</a>, and <a href="http://msdn.microsoft.com/en-us/library/dd721906%28loband%29.aspx" class="external">Microsoft</a> go for <a href="/blog/archives/2009/04/introduction_to.html">W3C Widgets</a>, and <a href="http://www.intomobile.com/2009/05/11/web-based-blackberry-widgets-en-route.html" class="external">BlackBerry might add support</a> in the not-too-distant future, as might Nokia. Of course they do not use exactly the same W3C Widgets &#8212; yet. But the emergence of <a href="http://www.w3.org/2008/webapps/wiki/WidgetSpecs" class="external">a proper standard</a> will help here. The players are eager for it, and chances are it will be implemented fairly decently across all platforms.</p>

<p>Palm goes for <a href="http://developer.palm.com/" class="external">native apps written in Web technologies</a>. Nokia has the <a href="http://www.forum.nokia.com/Technology_Topics/Web_Technologies/Web_Runtime/" class="external">Web Runtime</a> Dashboard-like system, <a href="http://developer.sonyericsson.com/site/global/newsandevents/latestnews/newsnov09/p_websdk.jsp" class="external">SonyEricsson recently announced</a> a <a href="http://phonegap.com/" class="external">Phonegap</a>-based Web system.</p>

<p>Even NetFront has a <a href="http://www.accessdevnet.com/index.php/NetFront-Widgets/NetFront-Widgets.html" class="external">widget manager</a> that works with Web standards, although you cannot scroll widgets, which makes the whole exercise a bit pointless.</p>

<p>If we count Apple&#8217;s original interest in Web standards, only Google hasn&#8217;t given a peep. Sure, their mobile browser is good, but otherwise they don&#8217;t seem to really care about mobile Web technologies beyond viewing sites. But maybe something is brewing there.</p>

<h4>I either love or hate you</h4>

<p>The real point here, the one that I wanted to think about a bit more, is that right now Web standards are the weapons of choice of the <em>losers</em> in the mobile game.</p>

<p>Apple and Google are the big winners right now, and they don&#8217;t use Web standards beyond providing an excellent browser.</p>

<p>All other players, however, the ones that are threatened by Apple&#8217;s and Google&#8217;s rapid ascent, go for Web standards big time. Is that a good or a bad sign? I just don&#8217;t know yet, that&#8217;s why I&#8217;d have preferred to discuss this point later on.</p>

<h4>I hate you</h4>

<p>The outreach of these losing companies that bet on Web standards to Web developers is shockingly bad. Everybody wants Web technologies. Nobody cares about Web developers.</p>

<p>Opera is doing its best, but it&#8217;s not getting real support from other companies yet.</p>

<p>I suppose my own hiring by Vodafone comes next, but I&#8217;m not there as a developer relations manager, although I definitely should write some serious stuff about widget development. So I&#8217;m partly to blame personally for the whole mess.</p>

<p>I was especially baffled by the Palm case. Here&#8217;s this (formerly) major phone vendor that&#8217;s gambling its <em>entire existence as a company</em> on the Web as a platform &#8212; as an OS, even &#8212; but other than opening a blog and saying there&#8217;s this really cool JavaScript library it did not do anything to connect to those people that were its natural allies: the Web developers.</p>

<p>In fact, I doubted my sanity for a while because I just did not understand what was going on. Did Palm figure it didn&#8217;t need us because it already had plenty webOS developers? Or was it being stupid?</p>

<h4>I love you</h4>

<p>Then <a href="http://pdnblog.palm.com/2009/09/ben-galbraith-and-dion-almaer-to-lead-developer-relations-team-at-palm/" class="external">Dion Almaer and Ben Galbraith moved to Palm</a> as developer relations managers, and everything fell into place. Palm admitted it had made a mistake and was improving relations with Web developers by hiring people who could do the job.</p>

<p>We are worth wooing, after all. Cool! Still, it makes me dizzy.</p>

<p>I hate you. I love you. I hate you. I love you.</p>

<p>Make up your fucking <em>mind</em>, mobile space!</p>

<h3>Are iPhone developers stupid?</h3>

<p>So that was the mindset I was in while writing the original article and dissing iPhone developers royally.</p>

<p>Although, as I said earlier, some people I respect a lot disagreed with me, and led me to write this article, another bunch of people I respect a lot <em>agreed</em> with my original post.</p>

<p>We <em>once again</em> have to wage a war for the soul of a platform, and point out time and again that Web standards are the way to go if you&#8217;re looking for interoperability, and maybe even if you&#8217;re not. We know the whole score by heart now.</p>

<p>I see the possibility of making the same mistakes as on desktop, fighting the same battles, waiting the same amount of time, before the mobile Web really takes of. It saddens me. And it angers me.</p>

<p>That led me to lash out to iPhone developers. From the reactions I got it became clear that some of them <em>did</em> consider Web standards, but decided to go native anyway.</p>

<p>That&#8217;s fine by me. As long as you <em>think</em> about it.</p>

<p>But the thinking bit is what I have my doubts about. Chris Heilmann <a href="http://twitter.com/codepo8/status/5981200192" class="external">tweeted</a>:</p>

<blockquote>
<p>I'm just saying, I've been to the iphone developer camp and 1 of 40 hacks used web standards. It is just not on the radar.</p>
</blockquote>

<p>That&#8217;s what I&#8217;m afraid of: iPhone developers not even considering Web apps.</p>

<p>Are iPhone developers stupid? No. I was wrong about that.</p>

<p>But they might <em>become</em> stupid later on, when the Web has become a totally viable alternative, but they refuse to consider it.</p>
]]>
</content>
</entry>
<entry>
<title>Apple is not evil. iPhone developers are stupid.</title>
<link rel="alternate" type="text/html" href="http://www.quirksmode.org/blog/archives/2009/11/apple_is_not_ev.html" />
<modified>2009-11-24T13:16:53Z</modified>
<issued>2009-11-23T13:32:47Z</issued>
<id>tag:www.quirksmode.org,2009:/blog//1.1804</id>
<created>2009-11-23T13:32:47Z</created>
<summary type="text/plain"><p>In his &amp;#8220;Apple&amp;#8217;s mistake&amp;#8221; essay Paul Graham makes an unwarranted assumption; an assumption everybody who&amp;#8217;s currently involved in the Great App Store Debate seems to be making.

The fundamental problem on the iPhone is not Apple&amp;#8217;s App Store approval policies, but the iPhone developers&amp;#8217; arrogant disdain for Web technologies.

It was only last Friday I told a roomful of Web developers that Apple is evil, and a spontaneous applause erupted. Since then, however, I have changed my mind completely. The Web developers and I were wrong.

Apple is not evil. iPhone developers are stupid. Their problems with the App Store approval process are entirely their own fault and they deserve no commiseration.

I hope the App Store approval process sticks around for a loooooooong time.

Update: I was wrong about Web apps being able to replace native apps right now. I was wrong about the iPhone developers&amp;#8217; mindset. They aren&amp;#8217;t stupid. Read my follow-up post.
</p></summary>
<author>
<name>ppk</name>
<url>http://www.quirksmode.org/</url>
<email>ppk@xs4all.nl</email>
</author>
<dc:subject>Mobile</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://www.quirksmode.org/blog/">
<![CDATA[<p>In his &#8220;<a href="http://www.paulgraham.com/apple.html" class="external">Apple&#8217;s mistake</a>&#8221; essay Paul Graham makes an unwarranted assumption; an assumption everybody who&#8217;s currently involved in the Great App Store Debate seems to be making.</p>

<p>The fundamental problem on the iPhone is not Apple&#8217;s App Store approval policies, but the iPhone developers&#8217; arrogant disdain for Web technologies.</p>

<p>It was only last Friday I told a <a href="http://full-frontal.org" class="external">roomful of Web developers</a> that Apple is evil, and a spontaneous applause erupted. Since then, however, I have changed my mind completely. The Web developers and I were wrong.</p>

<p>Apple is not evil. iPhone developers are stupid. Their problems with the App Store approval process are <em>entirely their own fault</em> and they deserve no commiseration.</p>

<p>I hope the App Store approval process sticks around for a <em>loooooooong</em> time.</p>

<p class="accent"><strong>Update:</strong> I was wrong about Web apps being able to replace native apps <em>right now</em>. I was wrong about the iPhone developers&#8217; mindset. They aren&#8217;t stupid. Read my <a href="/blog/archives/2009/11/native_iphone_a.html">follow-up post</a>.</p>
]]>
<![CDATA[<h3>Apple&#8217;s mistake</h3>

<p>Graham&#8217;s argument runs as follows:</p>

<ol>
	<li>Developers want to develop stuff they themselves want to use on the platform they&#8217;re using.</li>
	<li>Developers have embraced the iPhone with a passion.</li>
	<li>Therefore developers want to develop stuff for the iPhone.</li>
	<li>This is to Apple&#8217;s advantage, since it&#8217;s developers that can make or break a platform.</li>
	<li>Apple, however, is pissing off developers royally by its insane App Store policies.</li>
	<li>Therefore it is losing some good iPhone application developers.</li>
	<li>Even worse, Apple is becoming an Evil Company that developers won&#8217;t want to work for, either as third-party app creators or directly as employees.</li>
</ol>

<p>The unwarranted assumption here is that if developers want to develop for the iPhone platform they love they <em>must</em> go to the App Store for distribution.</p>

<p>That&#8217;s not true. They have another option. In order to solve the App Store problem they just have to stop wilfully ignoring it.</p>

<h3>Stupidity</h3>

<p class="accent">In order to release an iPhone application without having to submit it to Apple&#8217;s insane App Store process, developers could just use Web technologies and create Web apps instead of native apps.</p>

<p>The iPhone&#8217;s Safari browser is one of the best mobile browsers available, and recent improvements in hardware acceleration have made it an excellent graphics platform that can handle serious 3D-animations written entirely in CSS.</p>

<p>It also supports JavaScript geolocation, which is (I hope) only the first step towards true device APIs that will give JavaScript developers access to phone functionality such as the camera, text messaging, the address book, and more. I&#8217;m assuming Apple is working on all that because it&#8217;s the next logical step.</p>

<p>Safari&#8217;s support of <a href="http://googlecode.blogspot.com/2009/05/gmail-for-mobile-html5-series-part-2.html" class="external">appcache</a> makes it possible to store the Web app&#8217;s core files on the iPhone itself, so that it only has to download the data. Thus mobile connection problems can be avoided.</p>

<p>The user can place the Web app&#8217;s icon on his desktop, thus creating an app-like way of starting the Web application. When will users do that? When they think your app is cool. Instant meritocracy.</p>

<p>Best of all, if you want to update a Web app, you just put the updates on your Web server. There&#8217;s no need to wait for Apple&#8217;s broken approval process.</p>

<p>iPhone developers are stupid because they&#8217;re wilfully ignoring all this.</p>

<h3>More stupidity</h3>

<p>I reviewed the apps I have on my iPhone, and most can be released as a Web app <em>right now</em>. The exceptions are complex games that are both graphically and programmatically intensive, and apps that depend on device functions such as the accelerometer or GPS.</p>

<p>As I said, Safari supports geolocation, and maybe Apple is working on other device APIs. That would solve all problems for the second category. Complex games will remain very hard to release as a Web app in the near future.</p>

<p>Still, the graphically simple games such as sudoku and chess, the interactive shopping lists, the dictionaries and bible citation apps, the beer appreciation apps, the firmware Yahoo weather app, and most importantly <em>all</em> social network clients could have been written as a Web app without any loss of quality whatsoever. (Most have fairly little quality to lose in any case.)</p>

<p>In addition to avoiding the App Store and its insane policies, such Web apps would (mostly) work in <em>any modern browser</em>, whether desktop or mobile, and users of other phones or even of old-fashioned desktop computers could have used them, too. </p>

<p>Developers like their stuff to reach as many people as possible, right? That makes sense from both a business and an ego perspective, right?</p>

<p>Then why do iPhone developers jump through burning hoops as nasty as the App Store approval process <em>just to make sure that their stuff can only be used on one single platform instead of many</em>?</p>

<p>That&#8217;s stupid.</p>

<h3>The Web</h3>

<p>Apple&#8217;s original plan for iPhone development was to use Web technologies. This plan caught both Mac developers and Web developers by surprise because it was totally unexpected.</p>

<p>The plan failed. Jobs Himself ordered His developers to create Web applications with Web standards, but a deafening silence ensued. Then He hurriedly thought up the App Store. Too hurriedly, as it now turns out.</p>

<p>I remember the ecstatic reaction to the announcement, because it was the very first time a major industry leader mentioned Web standards in a major presentation.</p>

<p>Still, we Web developers didn&#8217;t <em>really</em> believe our favourite technology could deliver all that Apple wanted. Maybe we still don&#8217;t.</p>

<p>Besides, Apple does not reach out to Web developers at all, and Web developers respond by not bothering with Apple beyond making sure their Web sites work in Safari.</p>

<p>I believe that Apple is working towards its own heavily CSS-centric Web OS, certainly for mobile, possibly also for the desktop, and that this evolution has been slowed down by the energy devoted to the App Store as well as the complete lack of outreach.</p>

<p class="smaller">(This lack of outreach, by the way, is the main problem with <em>every single</em> mobile player that has opted for Web technologies in the past two years or so. Everybody wants Web technologies. Nobody cares about Web developers. Stupidity is not restricted to iPhone developers.)</p>

<h3>Arrogance</h3>

<p>The fundamental problem on the iPhone is not Apple&#8217;s App Store approval policies, but the iPhone developers&#8217; arrogant disdain for Web technologies.</p>

<p>That&#8217;s nothing new. Most X developers (for any non-Web value of X) live in mortal fear of the browser as a development platform.</p>

<p>As a long-time browser researcher I can confirm that their fears are not entirely unfounded, although the situation is not nearly as bad as it&#8217;s made out to be, especially not if you only want to target the iPhone.</p>

<p>But the so-called &#8220;real&#8221; developers aren&#8217;t confronting their fear. They&#8217;re covering it up with arrogance.</p>

<p>They dismiss Web technologies as toys for children. JavaScript is just this little language that cannot possibly compare to real technologies such as the one they&#8217;re using. HTML is too simple. Real programmers don&#8217;t do that stuff. As to Web developers, they are just glorified pixel-pushers that should in no circumstance be taken seriously. </p>

<p>After ten years I am <em>fucking</em> tired of the &#8220;Web development is not real programming&#8221; bullshit that the arrogant bastards in &#8220;real programming&#8221; are spouting because they&#8217;re too frightened to learn something new.</p>

<p>Fuck those condescending, ignorant, self-important, stupid, blind, fearful pricks. Fuck them real hard. Where it hurts.</p>

<p>And fucking them real hard where it hurts is exactly what Apple is doing right now.</p>

<p>That&#8217;s why I changed my mind. That&#8217;s why I&#8217;m cheering Apple on. I hope the App Store approval process sticks around for a <em>loooooooong</em> time.</p>

<h3>The myth</h3>

<p>The poor, oppressed iPhone developer suffering under Apple&#8217;s heavy App Store hand is a myth invented by these developers themselves because they&#8217;re too fearful to look beyond their &#8220;native&#8221; fetish.</p>

<p>The Web is patiently waiting in the wings like a spurned bride, quietly promising to solve all of their problems for them if they&#8217;d only <em>look</em> at her.</p>

<p>But instead, iPhone developers are <em>eagerly bending over begging Apple for more</em> because of their myopic obsession with bad APIs, the twin geekgasms of <em>both</em> objecty stuff <em>and</em> C, bloated SDKs, impossible layout mechanisms, and all the rest of the archaic nonsense we&#8217;re going to have to rid the mobile Web of in the next few years.</p>

<p>All that stuff is native and therefore &#8220;real&#8221; and important. Web development isn&#8217;t.</p>

<p>Well, you know what, iPhone developer? You&#8217;re wrong. Stupid, stupid you.</p>

<p class="accent">In order to create an app for the iPhone platform you know and love, <strong>an app that Apple&#8217;s policies can never touch and that works on other platforms, too</strong>, you need an iPhone, a text editor, graphics software, a Web server, and a good Web development reference.</p>

<p>None of these are particularly hard to find. You already found the <a href="/compatibility.html">reference</a>.</p>

<p>Jobs showed His chosen people the straight and narrow path to enlightenment, but they ignored His word. Therefore He unleashed the scourge of the App Store upon them. Good for Him. He should do stuff like that more often.</p>

<p>iPhone developers deserve no commiseration. If we encounter yet another post about Apple&#8217;s lack of love for the author&#8217;s iPhone app, we should tell the pathetic whiner it&#8217;s his own fucking fault. He should have used Web technologies instead.</p>

<p class="accent"><strong>Update:</strong> I was wrong about Web apps being able to replace native apps <em>right now</em>. I was wrong about the iPhone developers&#8217; mindset. They aren&#8217;t stupid. Read my <a href="/blog/archives/2009/11/native_iphone_a.html">follow-up post</a>.</p>
]]>
</content>
</entry>

</feed>