Re: please review and comment for my draft

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)

David

[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.
> THE STANDARD FOR ONLINE PAYMENT
> for Korea, Japan, China, and the World
>
>
>

Received on Thursday, 25 April 2013 20:47:51 UTC