Re: Issue 12: Gathering requirements [Gallery API]

On Sep 30, 2009, at 12:25 , <richard.tibbett@orange-ftgroup.com> <richard.tibbett@orange-ftgroup.com 
 > wrote:
> I have a number of outstanding questions that may help us explore this
> issue:
>
> - Are DAP APIs required as a whole for every implementation or are  
> they
> independently optional?
> <------ i.e. is it always possible to rely on a FS API always being
> present if, e.g. the Gallery API, is present on a device?

They are specified independently, so one may pick and chose which to  
implement. That having been said, if an API has a normative  
requirement on another (which is common) then to implement it you must  
also support its normative dependencies. So if Gallery depends on FS  
but not the other way around, you can have FS with no Gallery but you  
can't have Gallery with no FS.

> - Can DAP APIs use objects and methods from other DAP APIs? That is to
> say, are cross-module dependencies between DAP APIs allowed/ 
> manageable?

Personally I don't see a reason why not. It is common for DOM APIs to  
reference one another (at least for core bits like Node) and everyone  
references DOMString.

I believe that the primary issue here is at the policy level. If  
Gallery depends on FS, what parts of FS are you granting access to if  
you grant access to Gallery? To give an example, say that a user has  
granted read rights to her gallery, but nothing for FS. Now assume the  
following imaginary call:

   var img = myGallery.filter({type: "image/*"})[0]'
   alert("Image name: " + img.baseName + " (" + img.width + "x" +  
img.height + ")");

I'm going to stick my neck out there and say that even though img is a  
File object, it should work. Having been untainted by being obtained  
through Gallery it ought to be fine for some limited uses. But of  
course, it shouldn't allow you to do:

   img.parentDirectory;

Personally I would be very tempted to sweep this under the Policy Rug,  
because I would like functionality and policy to be specified  
completely orthogonally. But of course, others may feel that that is  
asking too much.

> These are some of the questions that bring on a cold sweat :-) I would
> be interested in the thoughts of others. Perhaps we could register  
> this
> as an issue to start things off?

That would be a very good idea indeed.

--
Robin Berjon
   robineko — setting new standards
   http://robineko.com/

Received on Wednesday, 30 September 2009 10:56:52 UTC