-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Capabilities instead of divergences? #15
Comments
This is a great idea. How about another document in this repo? We can scope DIVERGENCES down to the "miscoordination" cases. |
Well, on a second read, I'm not sure how we should treat cases like |
I think CAPABILITIES should be listing things like "file system access", or "http requests", "http caching", "ability to parse and process HTML", "Having access to low-level sensors/hw". Those then could be used to explain certain differences between the platforms. Let's consider the
This type of map can help in identifying areas of overlap and/if a lower-level primitive can be shared. As another example, |
In https://github.com/littledan/js-shared-interfaces/blob/master/DIVERGENCES.md, we just list the divergences without getting into a lot of details. Some of those divergences are the result of bad coordination. Some of those divergences are far more fundamental and are related to
I think it would be important to understand and document why there are certain divergences, and to what capability of the runtime they map to. I think the term "Divergences" is a negative, while "Capability map" is a more neutral term, and we should document the differences, not expressing a judgement.
As an example, https://github.com/littledan/js-shared-interfaces/blob/master/DIVERGENCES.md#http-access compares
fetch
torequire('http').request
. However the two have very different capabilities and requirements in terms of caching, security and connection reuse. They are not a 1-1 map.I think something that we should create is a Capability map, and explain why
fetch()
is hard to implement in Node.js and whyrequire('http').request
is impossible to implement in a browser.fetch()
is a high-level utility that provide cached, secured http request capability in the browser.require('http').request
provides low-level, uncached and unsecured http request capability in Node.js. Having a single, per-process HTTP cache in Node.js is not in the scope of the project.Another example is that Node.js do not have a builtin DOM.
Note that there are some of the listed divergences that do not map to any underlining or required capability, and they are just the result of bad coordination or prior art. Those typically could be solved.
The text was updated successfully, but these errors were encountered: