W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2009

Re: What is the use-case for binary data in client-side script?

From: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 10 Nov 2009 23:42:43 -0800
Message-ID: <63df84f0911102342t42d771aegd5125f850314d291@mail.gmail.com>
To: "Preston L. Bannister" <preston@bannister.us>
Cc: public-script-coord@w3.org
On Tue, Nov 10, 2009 at 10:38 PM, Preston L. Bannister
<preston@bannister.us> wrote:
> First, I have to admit to not tracking every prior possibly-relevant
> discussion. I do not have that much free time. So I may be missing from
> context. (Did search through past discussions, looking for context.) Yes, I
> am stepping late into this discussion.
>
> Javascript is a nice higher-order language. Web browsers have rich knowledge
> of objects exchanged across HTTP.  I would hope and expect Javascript in the
> web browser to "know" generally about the objects known to a web browser,
> and be able to manipulate those objects, within the capabilities of the web
> browser.
>
> On Wed, Nov 4, 2009 at 4:26 PM, Maciej Stachowiak <mjs@apple.com> wrote:
>>
>> Many APIs being developed for the Web platform would benefit from a good
>> way to store binary data. It would be useful for this to be specified as
>> part of the ECMAScript language, but it's also plausible to make this a W3C
>> spec that's only intended for use with Web platform APIs. Here is an
>> overview of some of the APIs that could use such a data type, some notes on
>> requirements and design alternatives, and a strawman proposal.
>
>
> What is not clear to me is whether binary data has any place in client-side
> Javascript. Strictly speaking, there is no such thing as binary data. Binary
> data is just a serialized representation of an object. I would greatly
> prefer that object serialization and de-serialization occur in the native
> code of the web browser, and not in Javascript (both for efficiency, and
> brevity in script). If the object in question is one of a kind known to the
> web browser, I would hope to leverage the web browser code.

The thing is that there is an unbounded number of file formats in the
world. Think Word documents, JPEG 2000 images, .eml files, vim
configuration files, playlists, skype contact lists, PDF files, swf
files etc. All of these would be of use to a web application if the
user dragged the file into an application and then had the application
interpret the file.

Yes, we could build in support for all these formats into UAs, however
I think we would be holding back innovation and bloating browsers if
these files couldn't be used by pages until the browser had build-in
support for these formats.

/ Jonas
Received on Wednesday, 11 November 2009 07:45:22 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:02 UTC