From: Asen Bozhilov on
Garrett Smith wrote:

> | if(this.isSafari4()){

They have a method which check for Safari 4? So if I want to use their
superduper browser detection script I need to invoke each time their
method. They can use another approach:

isSafari4 : (function () {
// Here goes their detection
})()

if (this.isSafari4) {
// Do another stupid thing
}

The things are more interesting in `browserdetect.js`
<URL: http://devimages.apple.com/assets/scripts/browserdetect.js />

if (typeof(AC) === "undefined") {
AC = {};
}

Where actually is declaration of `AC'? :))

From: Asen Bozhilov on
Ry Nohryb wrote:
> Gregor Kofler wrote:
>
> > (...) since Safari is not available for my OS.
>
> Gregor, good ol' Linux fanboy! What's your OS ? is it Gregorux,
> Koflerux, or GregorKoflerux ?

Is it really matter that? If they were used some conformance page the
things will be good, but their strategy to parse UA string is a
terrible idea.

I cannot see any demos, too. Safari is not available for my Debian and
I am not planning to change OS to see those demos.







From: Gregor Kofler on
On 2010-06-06 15:58, Ry Nohryb wrote:
> On Jun 6, 3:43 pm, Gregor Kofler<use...(a)gregorkofler.com> wrote:
>> (...) since Safari is not available for my OS.
>
> Gregor, good ol' Linux fanboy! What's your OS ? is it Gregorux,
> Koflerux, or GregorKoflerux ?

Who cares?

Gregor
From: SAM on
Le 6/6/10 11:40 AM, Ry Nohryb a �crit :
> On Jun 6, 8:50 am, VK <schools_r...(a)yahoo.com> wrote:
>> On Jun 6, 7:50 am, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote:
>>
>>> http://developer.apple.com/safaridemos/
>>> Click through to "View Demo" and you'll likely see the error message:
>>> | This demo was designed with the latest web standards supported by
>>> | Safari.
>> Your objection is not clear. The page is called "Safari Technology
>> Demos" and it does what has been declared: it demonstrates supported
>> HTML5 features in latest Safari versions. Obviously in order to
>> demonstrate these features in this browser, the page needs to be
>> viewed using Safari.

Not exactly, since I could see some of their demos with my old Firefox.3

They claim HTML.5 and you can't see anything in the apparent HTML code
about that. (all working with JS, more or less well...).

>> If the page would be called "Universal HTML5 support test: see what
>> your current browser can" or the like, then your obsession would be
>> understandable.
>
> Exactly. But Garrett has problems with reading comprehension.

I don't know what Garret did say, but ...
example :
<http://developer.apple.com/safaridemos/showcase/audio/>
Hu ?! with Fx, this day I see here a link covering the demo,
that's new ?
Their sniffer is completely idiot :
With Safari.4 my QuickTime (7.6) seems OK
With Firefox.3 they want I download the 7.7 version
.... for Leopard ... when I have Tiger ... !
(they can't see I haven't Leopard with their one hundred lines sniffing
the visitor's config?)
while I understood that Firefox.3.6 could use the audio tag,
while I understood that Firefox.3 just doesn't see that tag.
It would have been enough to show the text(link) of replacement, no ?
(why to continue to show the console behind this nonsense advice about QT ?)

(I do not understand in what QT.7.7 can help more that 7.6 reading audio
tag with Firefox ... ? My own version may read mp3 or ogg or a lot of
audio formats) (no, they just want I upgrade my system then QT, iTunes,
and so on I have nothing to do)

In my Safari.4, their audio "console" shows me no volume button :-(
Is that normal ?

In my Safari.4 when I use "normal" code for the tag audio,
that doesn't display a console as their terrific button
<http://developer.apple.com/safaridemos/showcase/audio/images/circular_controller.png>
but a stupid console as this of QuickTime (but without volume button)

And more, the Safari's error console :
XHR finished loading:
"http://developer.apple.com/safaridemos/showcase/global_html5/scripts/ac_media_languages/en-US.json".
/safaridemos/showcase/audio/scripts/audio.js:97
TypeError: Result of expression
'document.getElementById('matrixSelect')' [null] is not an object.
/safaridemos/showcase/audio/scripts/audio.js:173
TypeError: Result of expression 'AC.Tracking.pageName' [undefined] is
not a function.


Scripts (14 fichiers) 154 Ko (615 Ko sans compression)
for that result ? ? ?
Many thanks Apple !
I hate this self glorifying way of doing.
(tout � l'esbroufe)(all swaggering ?)

--
sm
with his iMac-intel system 10.4.11
From: Garrett Smith on
On 6/7/2010 4:12 PM, SAM wrote:
> Le 6/6/10 11:40 AM, Ry Nohryb a �crit :
>> On Jun 6, 8:50 am, VK <schools_r...(a)yahoo.com> wrote:
>>> On Jun 6, 7:50 am, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote:
>>>
>>>> http://developer.apple.com/safaridemos/
>>>> Click through to "View Demo" and you'll likely see the error message:
>>>> | This demo was designed with the latest web standards supported by
>>>> | Safari.
>>> Your objection is not clear. The page is called "Safari Technology
>>> Demos" and it does what has been declared: it demonstrates supported
>>> HTML5 features in latest Safari versions. Obviously in order to
>>> demonstrate these features in this browser, the page needs to be
>>> viewed using Safari.
>
> Not exactly, since I could see some of their demos with my old Firefox.3
>

I can see the audio demo now in Firefox. It doesn't work, but I can at
least load the page.

> They claim HTML.5 and you can't see anything in the apparent HTML code
> about that. (all working with JS, more or less well...).
>
>>> If the page would be called "Universal HTML5 support test: see what
>>> your current browser can" or the like, then your obsession would be
>>> understandable.
>>
>> Exactly. But Garrett has problems with reading comprehension.
>

Doesn't seem like it, no.

Seems like I read the HTML 5 specification, as I stated, and, as I
stated, applied the knowledge therein to come to the obvious realization
that Apple's HTML 5 demos are not HTML 5 demos -- they are very un-HTML
5; sniffing the userAgent to make an inference about the browser. It's a
bad attempt at massive public deception.

HTML 5 is about, among other things, codifying standards and providing
graceful degradation.

The pertinent part of HTML 5 for userAgent says nothing about what can
be inferred by the value of that string and that's why I cited it. It
says taht the string exists, that it matches whatever was sent in the
corresponding HTTP header, if one was sent, and if one was not sent,
then it is the empty string. Great. that's just right so now we know
that it is safe to say:

alert(navigator.userAgent);

- and that in conforming implementations, that is guaranteed to work.
That seems like a right choice and by having it worded in the spec as
such, it shows that there's nothing that can be inferred by the value.

Making inferences of userAgent is missing the point of HTML 5.

From the draft specification HTML 5 Abstract:

| HTML 5 defines the fifth major revision of the core language of the
| World Wide Web, HTML. This document describes the set of guiding
| principles used by the HTML Working Group for the development of HTML5
| The principles offer guidance for the design of HTML in the areas of
| compatibility, utility and interoperability.

the word "interoperability" is the pertinent term; the Apple's HTML 5
demos are not interoperable.

> I don't know what Garret did say, but ...

It's Garrett.

> example :
> <http://developer.apple.com/safaridemos/showcase/audio/>
> Hu ?! with Fx, this day I see here a link covering the demo,
> that's new ?
> Their sniffer is completely idiot :
> With Safari.4 my QuickTime (7.6) seems OK

Quicktime? Where is that defined in HTML5?

> With Firefox.3 they want I download the 7.7 version
> ... for Leopard ... when I have Tiger ... !
> (they can't see I haven't Leopard with their one hundred lines sniffing
> the visitor's config?)

See, now that's what I'm saying is missing the point of HTML5. Trying to
identify the OS to determine which plugin needs to be downloaded is
*not* interoperable. It is a failed attempt at a misguided strategy.

HTMl 5 does not define detecting plugins for quicktime or OS.

> while I understood that Firefox.3.6 could use the audio tag,
> while I understood that Firefox.3 just doesn't see that tag.
> It would have been enough to show the text(link) of replacement, no ?
> (why to continue to show the console behind this nonsense advice about
> QT ?)
>
> (I do not understand in what QT.7.7 can help more that 7.6 reading audio
> tag with Firefox ... ? My own version may read mp3 or ogg or a lot of
> audio formats) (no, they just want I upgrade my system then QT, iTunes,
> and so on I have nothing to do)
>
> In my Safari.4, their audio "console" shows me no volume button :-(
> Is that normal ?
>
> In my Safari.4 when I use "normal" code for the tag audio,
> that doesn't display a console as their terrific button
> <http://developer.apple.com/safaridemos/showcase/audio/images/circular_controller.png>
>
> but a stupid console as this of QuickTime (but without volume button)
>

Quicktime has never worked well. As a plugin, it actually has worse
usability the flash player.

> And more, the Safari's error console :
> XHR finished loading:
> "http://developer.apple.com/safaridemos/showcase/global_html5/scripts/ac_media_languages/en-US.json".
>
> /safaridemos/showcase/audio/scripts/audio.js:97
> TypeError: Result of expression
> 'document.getElementById('matrixSelect')' [null] is not an object.
> /safaridemos/showcase/audio/scripts/audio.js:173
> TypeError: Result of expression 'AC.Tracking.pageName' [undefined] is
> not a function.
>

Only one browser and it still doesn't work? That is really sad.

The error is not related to a race condition of JSON loading, as you
realized. It is a very careless mistake and can be consistently
reproduced. It that took me about 12 seconds to find the function they
wanted to call using Firebug's script panel "find" feature across
multipe files. I could have fixed it for them in about as much time.

The error message in the console that they don't read shows that
"AC.Tracking.pageName" is not a function.

There is a pageName function defined on AC.ViewMaster.Tracker. Take a
look at line 4 of view_master_tracker.js

view_master_tracker.js, line 3:
| Object.extend(AC.ViewMaster.Tracker.prototype,
| [ omit lines 4-53 ]
|
| pageName: function(section) {
| this._id = '';

Apparently they do not check the error console for the *one* browser
they support and do not do any QA.

This error reminds me of a mistake they had on iTunes pages. For many
months, apple itunes pages were throwing errors with prototype.js. They
simply would not fix the error, and probably out of not knowing what was
causing it in the first place and seeing that if error reporting was
turned off, that nobody would notice. I included that in my Prototype.js
code review back on 2008.

http://dhtmlkitchen.com/?category=/JavaScript/&date=2008/06/17/&=Prototype-js-A-Review

I see that their web development team is still experiencing the sorts of
very basic mistakes.

As far as the choice to use Prototype.js -- they probably learned
Prototype.js out of a need for solutions to help them to do their job
and, being incapable of solving such problems on their own, they turned
to something that could help solve their problems. Seeing other sites
that use prototype and seeing these sites appearing on popular sites
such as Ajaxian might have seemed like an indicator that the code might
be OK for professional usage. If they can't make assessments of the code
quality (and they can't), then it might have seemed prudent to use
Prototype.js (not that it was, just trying to see it from the other
perspective).

[...]

Garrett