Re: [Widgets] WidgetStorage interface
On 11/21/11 12:08 PM, ext Marcos Caceres wrote: Hi, As part of LC, I've received quite a bit of offline feedback that because of some issue in Webkit, it's difficult for implementers to reuse the WebStorage interface in a widget context: the problem is that Widget's use of Web storage slightly modifies some of the behaviour of the storage methods (e.g., some things are read only and throw exceptions). It would be useful if you would please quantify quite a bit and for transparency reasons to please provide a Publicly available reference to this feedback. The way around this is to define a WidgetStorage interface that allows for the specific behaviour defined in the Widget spec. Consequently, I want to define this interface WidgetStorage in the spec: WidgetStorage : Storage{} And hence: readonly attribute Storage preferences; Becomes: readonly attribute WidgetStorage preferences; In practice, the addition of WidgetStorage doesn't actually affect any conforming runtimes (but allows a bunch of new Webkit ones to comply). The proposed change would require the spec going back to LC. Is that correct? The proposed change, plus new test case(s) for the new feature, would also result in the 4 implementations that now pass 100% of the test suite, would no longer comply to the test suite until those implementations are updated: http://dev.w3.org/2006/waf/widgets-api/imp-report/ Is that correct? -AB
Re: [Widgets] WidgetStorage interface
On Wednesday, November 23, 2011 at 2:47 PM, Arthur Barstow wrote: On 11/21/11 12:08 PM, ext Marcos Caceres wrote: Hi, As part of LC, I've received quite a bit of offline feedback that because of some issue in Webkit, it's difficult for implementers to reuse the WebStorage interface in a widget context: the problem is that Widget's use of Web storage slightly modifies some of the behaviour of the storage methods (e.g., some things are read only and throw exceptions). It would be useful if you would please quantify quite a bit and for transparency reasons to please provide a Publicly available reference to this feedback. The feedback was offline and pertaining to unreleased products. But those that sent me the feedback are on this list. The way around this is to define a WidgetStorage interface that allows for the specific behaviour defined in the Widget spec. Consequently, I want to define this interface WidgetStorage in the spec: WidgetStorage : Storage{} And hence: readonly attribute Storage preferences; Becomes: readonly attribute WidgetStorage preferences; In practice, the addition of WidgetStorage doesn't actually affect any conforming runtimes (but allows a bunch of new Webkit ones to comply). The proposed change would require the spec going back to LC. Is that correct? Don't know. The change is cosmetic but needed. The proposed change, plus new test case(s) for the new feature, would also result in the 4 implementations that now pass 100% of the test suite, would no longer comply to the test suite until those implementations are updated: http://dev.w3.org/2006/waf/widgets-api/imp-report/ Is that correct? No. The change has no impact on existing runtimes or existing content.
Re: [Widgets] WidgetStorage interface
On Nov 23, 2011, at 14:51 , Marcos Caceres wrote: The proposed change would require the spec going back to LC. Is that correct? Don't know. The change is cosmetic but needed. I would assume not since it should not change runtimes perceptibly. It's a shuffling around of the way things are defined. -- Robin Berjon - http://berjon.com/ - @robinberjon
Re: [Widgets] WidgetStorage interface
On Wednesday, November 23, 2011 at 2:56 PM, Robin Berjon wrote: On Nov 23, 2011, at 14:51 , Marcos Caceres wrote: The proposed change would require the spec going back to LC. Is that correct? Don't know. The change is cosmetic but needed. I would assume not since it should not change runtimes perceptibly. It's a shuffling around of the way things are defined. Exactly. I would say it does not need to go back to LC because it doesn't really add anything new (just makes things a bit more clear).
Re: [Widgets] WidgetStorage interface
On Monday, November 21, 2011 at 11:19 PM, Marcos Caceres wrote: On Monday, 21 November 2011 at 21:42, Robin Berjon wrote: On Nov 21, 2011, at 18:08 , Marcos Caceres wrote: As part of LC, I've received quite a bit of offline feedback that because of some issue in Webkit, it's difficult for implementers to reuse the WebStorage interface in a widget context: the problem is that Widget's use of Web storage slightly modifies some of the behaviour of the storage methods (e.g., some things are read only and throw exceptions). The way around this is to define a WidgetStorage interface that allows for the specific behaviour defined in the Widget spec. I don't mind the change, but can you provide more details about why it's a problem with WebKit? I'm told that Web Storage in Webkit is locked up tight so you can't extend it. If it was due to problems with what was done in the spec(s), we should document those to make sure we don't make the same mistakes again. Yes. Simple rule: if you change the behaviour of an interface even slightly, sub-class it. Let me clarify a little bit here, because it's bugging me. Usually, an object can take an interface and implement new custom behavior without any problems (interfaces generally are supposed to decuple interaction from implementation… as it's done in Java… with, say implements Runnable). However, in this particular instance, it seems that it's not possible to reuse an interface in this way (maybe it's some C thing, or maybe Storage is not actually defined as an interface but as an object).
Re: [Widgets] WidgetStorage interface
Yes. Simple rule: if you change the behaviour of an interface even slightly, sub-class it. Let me clarify a little bit here, because it's bugging me. Usually, an object can take an interface and implement new custom behavior without any problems (interfaces generally are supposed to decuple interaction from implementation… as it's done in Java… with, say implements Runnable). However, in this particular instance, it seems that it's not possible to reuse an interface in this way (maybe it's some C thing, or maybe Storage is not actually defined as an interface but as an object). Or then it's an implementation problem, and there is little point changing the specification ? I don't see how a new interface object would make programming its behavior more easy.
[Widgets] WidgetStorage interface
Hi, As part of LC, I've received quite a bit of offline feedback that because of some issue in Webkit, it's difficult for implementers to reuse the WebStorage interface in a widget context: the problem is that Widget's use of Web storage slightly modifies some of the behaviour of the storage methods (e.g., some things are read only and throw exceptions). The way around this is to define a WidgetStorage interface that allows for the specific behaviour defined in the Widget spec. Consequently, I want to define this interface WidgetStorage in the spec: WidgetStorage : Storage{} And hence: readonly attribute Storage preferences; Becomes: readonly attribute WidgetStorage preferences; In practice, the addition of WidgetStorage doesn't actually affect any conforming runtimes (but allows a bunch of new Webkit ones to comply). Kind regards, Marcos -- Marcos Caceres http://datadriven.com.au
Re: [Widgets] WidgetStorage interface
On Nov 21, 2011, at 18:08 , Marcos Caceres wrote: As part of LC, I've received quite a bit of offline feedback that because of some issue in Webkit, it's difficult for implementers to reuse the WebStorage interface in a widget context: the problem is that Widget's use of Web storage slightly modifies some of the behaviour of the storage methods (e.g., some things are read only and throw exceptions). The way around this is to define a WidgetStorage interface that allows for the specific behaviour defined in the Widget spec. I don't mind the change, but can you provide more details about why it's a problem with WebKit? If it was due to problems with what was done in the spec(s), we should document those to make sure we don't make the same mistakes again. -- Robin Berjon - http://berjon.com/ - @robinberjon
Re: [Widgets] WidgetStorage interface
On Monday, 21 November 2011 at 21:42, Robin Berjon wrote: On Nov 21, 2011, at 18:08 , Marcos Caceres wrote: As part of LC, I've received quite a bit of offline feedback that because of some issue in Webkit, it's difficult for implementers to reuse the WebStorage interface in a widget context: the problem is that Widget's use of Web storage slightly modifies some of the behaviour of the storage methods (e.g., some things are read only and throw exceptions). The way around this is to define a WidgetStorage interface that allows for the specific behaviour defined in the Widget spec. I don't mind the change, but can you provide more details about why it's a problem with WebKit? I'm told that Web Storage in Webkit is locked up tight so you can't extend it. If it was due to problems with what was done in the spec(s), we should document those to make sure we don't make the same mistakes again. Yes. Simple rule: if you change the behaviour of an interface even slightly, sub-class it.