Skip to content
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

clarify advice on synchronous versus asynchronous APIs #145

Closed
dbaron opened this issue Dec 4, 2019 · 7 comments
Closed

clarify advice on synchronous versus asynchronous APIs #145

dbaron opened this issue Dec 4, 2019 · 7 comments
Assignees

Comments

@dbaron
Copy link
Member

dbaron commented Dec 4, 2019

The discussion in w3ctag/design-reviews#439 (and really the discussion at TPAC in Fukuoka that led to filing it) point to the issue that the advice in the design-principles document on synchronous versus asynchronous APIs is perhaps too strong, or at least can be interpreted in too strong a way. It points out the reasons to prefer asynchronous APIs, but doesn't address possible tradeoffs against them.

(Two examples from that particular issue are (a) tradeoffs against user convenience and (b) tradeoffs against racy behavior that results from an API answering a question whose result might vary depending on whether the document is currently handling a user gesture.)

There's more detail after following the link above (and further links from that).

It should probably clearer how strong the advice to prefer asynchronous APIs is (which may differ across the various reasons) and what factors should be considered in the other direction.

@alice
Copy link
Contributor

alice commented Jan 29, 2020

Earlier: #81

@hober hober unassigned hober and dbaron Feb 3, 2020
@hober
Copy link
Contributor

hober commented Feb 3, 2020

@cynthia to draft a PR.

@torgo
Copy link
Member

torgo commented Jul 7, 2020

We discussed today and came up with the idea of a subsection providing guidance on "when to use synchronous".

cynthia added a commit that referenced this issue Jul 7, 2020
@plinss plinss modified the milestones: 2020-08-10-week, 2020-09-07 Sep 5, 2020
cynthia added a commit that referenced this issue Sep 8, 2020
@cynthia
Copy link
Member

cynthia commented Sep 8, 2020

I've removed the "should not fail" and replaced it to "not expected to be gated behind a permission".

cynthia added a commit that referenced this issue Sep 8, 2020
cynthia added a commit that referenced this issue Sep 8, 2020
@torgo torgo modified the milestones: 2020-09-07, 2020-10-05 Sep 9, 2020
@cynthia
Copy link
Member

cynthia commented Sep 9, 2020

Discussed in today's call; we've noticed that the principles document tends to advocate async, and we should probably tweak the tone throughout the document so it doesn't feel like we are advocating async.

@alice
Copy link
Contributor

alice commented Oct 8, 2020

Adding a note here to update the "Design asynchronous APIs using Promises" section of design principles as part of this work.

cynthia added a commit that referenced this issue Nov 3, 2020
* Initial draft for #145.

* fixup! Initial draft for #145.

* fixup! Initial draft for #145.

* fixup! Initial draft for #145.

* Update index.bs

* Update index.bs

Co-authored-by: Alice <[email protected]>

* Update index.bs

Co-authored-by: Alice <[email protected]>

* Update index.bs

Co-authored-by: Alice <[email protected]>

* Update index.bs

Co-authored-by: Alice <[email protected]>

* Update index.bs

Co-authored-by: Alice <[email protected]>

* Update index.bs

Co-authored-by: Alice <[email protected]>

* Update index.bs

* Update index.bs

* Update index.bs

Co-authored-by: Alice <[email protected]>
@plinss plinss removed this from the 2020-10-05 milestone Jan 4, 2021
@plinss plinss added this to the 2021-01-04-week milestone Jan 4, 2021
@torgo
Copy link
Member

torgo commented Jan 5, 2021

Discussed on 05-01 and agreed to close as this is done.

@torgo torgo closed this as completed Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants