W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2013

Re: please review and comment for my draft

From: David Bruant <bruant.d@gmail.com>
Date: Thu, 25 Apr 2013 22:47:19 +0200
Message-ID: <51799657.1070308@gmail.com>
To: Mountie Lee <mountie@paygate.net>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>
Hi Mountie,

I'm not a WebIDL expert, but what you have in the WebIDL fragment 
doesn't come as shocking to me.
One thing you should do is putting field descriptions (like "msgType", 
"msgId", etc.) out of the WebIDL fragment.

My understanding from your diagram and description is that requestCert, 
updateCert, revokeCert, handleResp, genConfirm all do a network request. 
The fact that they directly return an object suggests that calling these 
methods will block waiting for the network to answer back. This type of 
blocking wait is usually considered as a bad practice to be avoided 
(because while waiting, the web page is unresponsive, etc.)

There are 2 possible patterns for non-blocking APIs:
1) make these functions return "Future<CertMessage>" (Futures [1] are a 
new thing added specifically for these kind of use cases).
2) adopt a pattern like Geolocation [2] (2 callbacks, one to handle 
success, the other to handle errors)


[1] http://dom.spec.whatwg.org/#futures
[2] http://dev.w3.org/geo/api/spec-source.html#api_description

Le 25/04/2013 17:39, Mountie Lee a écrit :
> hi
> recently I prepared draft proposal for webcrypto wg.
> but I'm newbie for WebIDL.
> it is difficult to learn in short time.
> please review and comment for my proposal.
> the link is as following.
> http://mountielee.github.io/webcertapi/webcertapi_draft.html
> best regards
> mountie
> mountie@paygate.net <mailto:mountie@paygate.net>
> =======================================
> PayGate Inc.
> for Korea, Japan, China, and the World
Received on Thursday, 25 April 2013 20:47:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:12 UTC