Re: Why aren't most devices virtual web services?

On Thu, 14 Jan 2010, John Kemp wrote:
> On Jan 14, 2010, at 3:00 PM, Ian Hickson wrote:
> > On Thu, 14 Jan 2010, John Kemp wrote:
> >> 
> >> We are designing Javascript APIs here. Those APIs involve making 
> >> Javascript calls.
> > 
> > Is this a requirement? If so, why? It seems like if it makes more 
> > sense to expose something as a RESTful API exposed with a custom 
> > scheme handled natively by the UA, then we should do that, rather than 
> > expose things as a JavaScript API.
> 
> I think what likely makes most sense is what Kenton suggested earlier - 
> a WebIDL binding for RESTful services. That way we should get 
> equivalence between the JS API and the RESTful model without having to 
> specify entirely separate ways (or a new way) of doing things.

Would that mean the API was exposed to users twice? If so, I think it's a 
bad idea -- it would mean two implementations in browsers, and thus twice 
the number of bugs.

On the other hand if the API was implemented for widgets and the REST API 
for Web pages, I think that would be ok. I just don't think we want to 
have two ways to do things -- historically that hasn't been found to be a 
good use of everyone's time when building Web browsers.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Thursday, 14 January 2010 20:36:37 UTC