- From: Zoltan Kis via GitHub <sysbot+gh@w3.org>
- Date: Wed, 12 Dec 2018 16:14:30 +0000
- To: public-web-nfc@w3.org
@littledan > How are the interactions different in NFC vs Sensor, in a way that makes sense to reflect in an API? IMHO: - An NFC interaction is defined by the user consciously approaching an NFC device (tag, phone) to another (reader, peer). This is a finite one-time interaction with zero or one successful data transactions. There is one success or error outcome. Modeling with Promises makes sense. - A Sensor interaction can be one-off, multiple-off, manual/automatic/wakeup activated, various sampling and reporting rate etc. Modeling with Events plus stuff makes sense. IMHO even in the Web Platform, "API harmonization" should not mean "one style force-fits all". Anyway in this specific case, the resulting API is bearable even if feels like overkill, besides it's already merged, so it's fine if it's good for developers. -- GitHub Notification of comment by zolkis Please view or discuss this issue at https://github.com/w3c/web-nfc/pull/184#issuecomment-446645447 using your GitHub account
Received on Wednesday, 12 December 2018 16:14:31 UTC