Last active
August 29, 2015 14:15
-
-
Save srl295/4b11872ca4d6e26b69c1 to your computer and use it in GitHub Desktop.
Discussion from resource loading discussion, Thu Feb 19 18:15:00 UTC 2015
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Node resources and loading discussion | |
=== | |
Participants: | |
Bradley Meck | |
James Snell | |
Steve Atkin | |
TJ Fontaine | |
Steven R. Loomis [scribe] | |
——— URL: https://github.com/joyent/node/issues/9174 | |
bradley: need to be clear rsrcs≠g11n. | |
work on bundled apps. rsrc api biased towards node. | |
node style is what es6 supports, what jquery is moving to. | |
Don’t want to iron out the loading. | |
atkin: iron out formats, defer loading | |
tj: rsrcs are also template of markup, .. | |
tj: for node, a resource is any reusable artifact delivered with the module. | |
james: howe we load the r src will be similar. | |
srl: what’s a resource? | |
bradley: looking at npm modules in the wild. r/o file(system) with no metadata. Can list, but | |
no permissions/dates/etc. | |
tj: people are using fs.open, __dirname, etc. could be template, favicon, etc. Regular fiels, | |
only point is loading relative to module. | |
srl: ok, is everything locale specific? | |
tj: let the consume opt-in to how they organized data? | |
js: could tune this - have a bundle api, put the locales at the top | |
md: inheritance? override what i want to? | |
md: separate files would let you bundle only a subset | |
tj: leaning towards metadata that *could* be used for resources. COuld have a world where if | |
metadata defines , otherwise rely on directory structure. npm could auto-generate bundle | |
metadata - support both global bundle [big .json vs indiviudal files]. | |
js?: COuld also imagine a module that is just a bundle. | |
md: metadata could be a list of locales? | |
bm: locale specific conventions will break what modules such as npm use where they read directory | |
structure at runtime. .. metadata will not work for this convention, having to list things prior to running. | |
tj: [convention vs configuration?] | |
bm: g11n should be a well defined convention beyond what resources are. | |
srl: is g11n a subset of resources, or all resources are g11n switched? | |
tj: for node, probably the former [?] | |
tj: probably for node, a resource-load system (sync/async) which loads relative to the module. | |
key will have to be in bundle.json and that can be found… mechanism loading globalization relies on that. | |
srl: [ as with Java, have all resources locale aware.. people learn to just put them in ‘bundle/root’ ] | |
md: agree | |
bm: cost is low, but some things will not be internationalized. - code, package.json | |
tj: in loader work, does bm’s work use the resource loader to load.? | |
bm: no, but npm .. | |
bm: two levels of wildcards.. wildcard locale, and “no locale” (relative to module itself). | |
md: say you are in ‘en-US’ , if nothing is there, fall back to ‘root’ | |
bm: but if you have a ‘no fallback’ policy, won’t work out. | |
md: say you had fr-CA and fr-FR - may fall back from fr-CA to fr-FR or just to fr.. | |
srl: better “und” than “root” | |
md: could take a parameter ? | |
srl: could make the policy settable… (ala Java.) example a Canadian bank wants to prefer fr-CA, en-CA | |
md?: | |
srl: policy could be dumb by default… probably settable on each API call. Maybe use ecma402 terminology | |
js: definitely helpful, will update my writeup | |
next: 12th of march | |
bm: wil send out to James | |
bm: will write up a draft of the loader/control api.~ suspect the g11n aware loading will be a subset | |
of the generic loader. | |
srl: consider Java resource bundle control and ecma402 loading control | |
srl: will post these notes as a gist | |
-- | |
This transcript is a natural product. Minor variations in accuracy and orthography are to be expected, though corrections are welcome. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What does that refer to?