Communication with Peer Applications

For communication to occur from the Dekho client to an external desktop application, a message needs to get outside the secure JavaScript environment of the browser. One method of doing this is by creating a "safe" ActiveX control, but this only works for Internet Explorer on Windows, and even then only when ActiveX controls are enabled. A better alternative is to register a new URL protocol, including registering a local application to handle it, and have the JavaScript invoke the URL protocol. This works for all browsers, on all desktop platforms including Windows, Mac OS X and even Linux.

 

With a protocol (for example: dekhotoyourclient:) and it’s handling application dekhotoyourclient (.exe) registered, invoking the protocol URL, the operating system will pass the URL on the command line for the  protocol. For example, “dekhotoyourclient.exe dekhotoyourclient:command?parameter=value”. Dekho only needs to invoke the protocol URL (eg in a hidden IFRAME or from a custom tool), and the message is delivered to the protocol handler.

 

This approach will also allow for third party applications to communicate with Dekho. For example, “yourclienttodekho.exe yourclienttodekho:command?parameter=value”. The third party application only needs to invoke the protocol URL and the message is delivered to the protocol handler.


Server messaging