W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2013

Re: [whatwg] The src-N proposal

From: Maciej Stachowiak <mjs@apple.com>
Date: Sun, 10 Nov 2013 23:19:03 -0800
Message-id: <C4840EC4-3E3E-4528-A85A-47E2680C3DA5@apple.com>
To: Adam Barth <w3c@adambarth.com>
Cc: WHATWG <whatwg@whatwg.org>, Yoav Weiss <yoav@yoav.ws>, Ian Hickson <ian@hixie.ch>

On Nov 10, 2013, at 12:20 AM, Adam Barth <w3c@adambarth.com> wrote:

> On Fri, Nov 8, 2013 at 11:46 AM, Ian Hickson <ian@hixie.ch> wrote:
>> On Fri, 8 Nov 2013, Rafael Rinaldi wrote:
>>> It looks complex because it tries to solve something complex. I think
>>> there’s no way to avoid verbosity to solve such thing.
>> 
>> The way you avoid complexity in such things is that you don't solve the
>> overall problem, you solve small segments of the problem (e.g. in script
>> or CSS), then pick the solution you want.
>> 
>> So for example, we could have a script to handle image grids, another to
>> handle simple cases where as the window gets wider you display more
>> context in the image, etc. If all these scripts have some common features
>> they all need (e.g. the ability to work with pre-parsing to say which
>> image they need first, so it can be fetched early) then we can provide
>> that common core.
>> 
>> This is similar to AppCache vs Alex's ServiceWorkers. AppCache addresses a
>> small set of use cases, probably not enough. ServiceWorkers provides the
>> tools to address a lot of use cases, but isn't directly itself a solution;
>> you use it to build solutions. Another example would be the WebForms2
>> repetition model, vs Rafael's <template>. The repetition model idea solved
>> some specific use cases, but trying to make it solve all use cases would
>> be a hugely complicated endeavour and would be really ugly. <template>
>> provides a tool with which you can build specific solutions, but isn't
>> itself a direct solution.
> 
> I basically agree with Ian.  Let's address the simple use cases first
> (i.e., device-pixel-ratio switching) and worry about the more complex
> use cases in the future.

I agree with this too.

It just needs to be noted that there isn't an obvious choice of simple primitive to solve the somewhat more complex cases, assuming they are common enough that we care about preload scanning working for them. So we may have to come back to them at some point.

Regards,
Maciej
Received on Monday, 11 November 2013 07:19:27 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:13 UTC