DOM based API

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

DOM based API

Mark Baker

On Thu, Jun 5, 2008 at 4:20 PM, Andrei Popescu <[hidden email]> wrote:
>
> Hello,
>
> I am interested in working on a specification of a DOM API that allows
> Web pages to access the user's geolocation information (e.g. latitude
> and longitude).

I'm very glad to see somebody mention using the DOM API for this kind
of information, right off the bat.  I'm a big believer in reuse, and
feel that this API is an obvious candidate for reusing the DOM, i.e.
providing a "Location" Javascript object that's also a DOM Document.

I note that you're at Google though, and that the Gears API doesn't
reuse the DOM;

http://code.google.com/p/google-gears/wiki/GeolocationAPI

So I'm wondering if I've misunderstood you, or if Google has had a
change of heart, or if you're perhaps not on the Gears team?

Cheers,

Mark.

Reply | Threaded
Open this post in threaded view
|

Re: DOM based API

Andrei Popescu-2

Hi Mark,

On Fri, Jun 6, 2008 at 3:55 PM, Mark Baker <[hidden email]> wrote:

> On Thu, Jun 5, 2008 at 4:20 PM, Andrei Popescu <[hidden email]> wrote:
>>
>> Hello,
>>
>> I am interested in working on a specification of a DOM API that allows
>> Web pages to access the user's geolocation information (e.g. latitude
>> and longitude).
>
> I'm very glad to see somebody mention using the DOM API for this kind
> of information, right off the bat.  I'm a big believer in reuse, and
> feel that this API is an obvious candidate for reusing the DOM, i.e.
> providing a "Location" Javascript object that's also a DOM Document.
>

Thanks, I completely agree :)

> I note that you're at Google though, and that the Gears API doesn't
> reuse the DOM;
>
> http://code.google.com/p/google-gears/wiki/GeolocationAPI
>
> So I'm wondering if I've misunderstood you, or if Google has had a
> change of heart, or if you're perhaps not on the Gears team?
>

I am actually part of the Gears team and one of our main goals is to
contribute our ideas to standardization working groups, such as
WebAPI. Aaron Boodman (one of the Gears team TLs) has a very good blog
post on this issue:

http://gearsblog.blogspot.com/2008/04/gears-and-standards.html

All the best,
Andrei

Reply | Threaded
Open this post in threaded view
|

Re: DOM based API

Maciej Stachowiak
In reply to this post by Mark Baker


On Jun 6, 2008, at 7:55 AM, Mark Baker wrote:

>
> On Thu, Jun 5, 2008 at 4:20 PM, Andrei Popescu <[hidden email]>  
> wrote:
>>
>> Hello,
>>
>> I am interested in working on a specification of a DOM API that  
>> allows
>> Web pages to access the user's geolocation information (e.g. latitude
>> and longitude).
>
> I'm very glad to see somebody mention using the DOM API for this kind
> of information, right off the bat.  I'm a big believer in reuse, and
> feel that this API is an obvious candidate for reusing the DOM, i.e.
> providing a "Location" Javascript object that's also a DOM Document.

I don't understand why you would want the "Location" object to be a  
DOM Document. (It needs a better name, by the way, so it doesn't  
conflict with the Location object that is window.location.) And I  
don't think that is what Andrei had in mind, as I understand it, he  
just wants an API that aligns well with the DOM, not necessarily one  
that makes non-markup information appear to be part of a Document.

I think presenting geolocation info as a Document would have the  
disadvantages of more memory use and less obvious access for authors.

What are the advantages?

Regards,
Maciej


Reply | Threaded
Open this post in threaded view
|

Re: DOM based API

Andrei Popescu-2

On Fri, Jun 6, 2008 at 5:58 PM, Maciej Stachowiak <[hidden email]> wrote:

>
> On Jun 6, 2008, at 7:55 AM, Mark Baker wrote:
>
>>
>> On Thu, Jun 5, 2008 at 4:20 PM, Andrei Popescu <[hidden email]> wrote:
>>>
>>> Hello,
>>>
>>> I am interested in working on a specification of a DOM API that allows
>>> Web pages to access the user's geolocation information (e.g. latitude
>>> and longitude).
>>
>> I'm very glad to see somebody mention using the DOM API for this kind
>> of information, right off the bat.  I'm a big believer in reuse, and
>> feel that this API is an obvious candidate for reusing the DOM, i.e.
>> providing a "Location" Javascript object that's also a DOM Document.
>
> I don't understand why you would want the "Location" object to be a DOM
> Document. (It needs a better name, by the way, so it doesn't conflict with
> the Location object that is window.location.) And I don't think that is what
> Andrei had in mind, as I understand it, he just wants an API that aligns
> well with the DOM, not necessarily one that makes non-markup information
> appear to be part of a Document.
>

That's right, what I meant is that I agree with the fact that this API
should align with existing standards, not that the Location object
itself should be a DOM Document. Anyway, I think we should start with
the use cases first? I'm planning to add a little more detail to that
section of the draft early next week and any feedback on this topic
would be very welcome.

Thanks,
Andrei

Reply | Threaded
Open this post in threaded view
|

RE: DOM based API

Alec Berntson

Hi,
  I am new to this WG, but I have been playing with location for a while now. I think Andrei's current set of use cases is pretty well distilled, but I'll throw these out there:

One Shot
  Any application where you just need a location 'seed'
     Get directions from 'here' (opposite of find POI)
     Fill in forms with your current address (good use of reverse geocoding)
     Metadata for any sort of submission (geocode a blog post, email, etc)
     Social networking - play games with people around you (doesn't have to be continuously updated to get the game started)

Position monitoring
  Continuously updating local information (traffic, weather, etc)

Cheers,
   Alec



-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Andrei Popescu
Sent: Friday, June 06, 2008 10:09 AM
To: Maciej Stachowiak
Cc: Mark Baker; [hidden email]; [hidden email]
Subject: Re: DOM based API


On Fri, Jun 6, 2008 at 5:58 PM, Maciej Stachowiak <[hidden email]> wrote:

>
> On Jun 6, 2008, at 7:55 AM, Mark Baker wrote:
>
>>
>> On Thu, Jun 5, 2008 at 4:20 PM, Andrei Popescu <[hidden email]> wrote:
>>>
>>> Hello,
>>>
>>> I am interested in working on a specification of a DOM API that allows
>>> Web pages to access the user's geolocation information (e.g. latitude
>>> and longitude).
>>
>> I'm very glad to see somebody mention using the DOM API for this kind
>> of information, right off the bat.  I'm a big believer in reuse, and
>> feel that this API is an obvious candidate for reusing the DOM, i.e.
>> providing a "Location" Javascript object that's also a DOM Document.
>
> I don't understand why you would want the "Location" object to be a DOM
> Document. (It needs a better name, by the way, so it doesn't conflict with
> the Location object that is window.location.) And I don't think that is what
> Andrei had in mind, as I understand it, he just wants an API that aligns
> well with the DOM, not necessarily one that makes non-markup information
> appear to be part of a Document.
>

That's right, what I meant is that I agree with the fact that this API
should align with existing standards, not that the Location object
itself should be a DOM Document. Anyway, I think we should start with
the use cases first? I'm planning to add a little more detail to that
section of the draft early next week and any feedback on this topic
would be very welcome.

Thanks,
Andrei