Re: File API Feedback

On Mon, Jul 6, 2009 at 7:18 AM, Robin Berjon<robin@berjon.com> wrote:
> Heya Jonas,
>
> On Jun 30, 2009, at 10:38 , Jonas Sicking wrote:
>>
>> However, what is the use case for all this power? I.e. what
>> application would want to do this? The downside of having all the
>> power and features of using events is that the syntax becomes more
>> complex. So we should only do it if it provides features that people
>> actually need.
>
> I haven't yet given this a lot of thought, but one reason I can see for
> supporting events is extensibility. Remember that the upcoming DAP WG will
> develop some manner of file system API. It would be really, really nice if
> it could just reuse the interfaces from this spec. But it is likely to be
> more powerful, and therefore might require (or at least benefit from)
> greater flexibility in notification.
>
> Let's say for instance we add delete(), one might want:
>
>  file.addEventListener("delete", delCB, false);
>
> My brain's still warming up after a week in babyland, but I think we should
> look at DAP use cases before coming to a conclusion on the most useful
> notification mechanism.

If we're adding more APIs such as file deletion etc then it makes more
sense to me to use event notification for those things. However for
reading data I just don't see events adding value.

/ Jonas

Received on Monday, 6 July 2009 20:40:58 UTC