Comments on Meeting Notes
jrburke at gmail.com
Tue Dec 4 09:57:36 PST 2012
On Tue, Dec 4, 2012 at 8:54 AM, Kevin Smith <khs4473 at gmail.com> wrote:
> === Modules ===
> Perhaps I'm misreading the notes, but I am concerned about the amount of
> churn that I'm seeing in module discussions. Particularly worrisome to me
> is the suggestion that the default loading behavior should map:
> import x from "foo";
> System.baseURL + "foo" + ".js"
> This is contrary to all url resolution algorithms on the web, and involves
> way too much magic.
[sorry Kevin, sent this to you directly when meant to sent to list, so
This is what AMD loaders use. For me, it seems straightforward, not
much magic on its own. The old dojo one did too, except it used dots
instead of slashes in IDs, but it was effectively baseUrl + id +
'.js'. I believe it has held up well.
What other ID-to-URL resolution algorithms are used on the web that
have decent adoption, besides just plain URLs? Alternatively, what
problems do you see with that algorithm?
It is important to use an ID type vs a plain URL to allow sharing of
code between environments that may have different path resolution
logic. For example, for node, it may choose to check a few file paths
for a given ID. For networked loading though it is good to have a
reasonable one IO lookup rule per ID.
More information about the es-discuss