Windows and Web integration through Thinfinity® jsRO (Javascript Remote Objects) – Introduction

One of Thinfinity VirtualUI’s strengths is, without a doubt, its web integration capabilities. Once the app was published, the urge of going beyond simple cosmetic changes usually appears, and one may wish to combine the application with native web resources, such as personalized web searches, multimedia resources, specialized information and data, and the like.

Some other times data just needs to be visually arranged in a different pattern from how it is presented to the user by the original application. Or the interface needs to be replaced or enhanced to better accommodate the device on which it is being accessed, for a more adequate functionality and integration.

Javascript Remote Objects (jsRO) is a framework designed to facilitate these and many other possible scenarios, by allowing a bidirectional communication between a web page or application and a Windows application. But, most importantly, to make that blending with the greatest possible transparency.

The key point is that jsRO enables the creation of objects in a Windows application that can be replicated on the browser as native Javascript objects. Every pair of objects keep in sync with each other on both ends of the communication, and behaves as the same entity. This synchronization ensures bidirectional interaction and therefore immediately replicating changes in the jsRO objects’ properties, both on the browser and the Windows application.

Web integration: jsRO 00 Comunication Model

This communication is made possible by two components: a dll library (Thinfinity VirtualUI SDK) that has to be added to the Windows application, and a Javascript library (Thinfinity jsRo) that must be added to the web page. By adding a few more lines of code to the Windows application, jsRO objects are ready to be created and published on a browser.

jsRO 00 Model Creation And Exposition

The diagram above shows the sequence of how a jsRO object is first created in the Windows application, then propagated, and finally presented on the browser, ready to be used in Javascript. From this point forward, any changes made on any of the objects created will be reflected accordingly on its counterpart.


jsRO objects architecture

The jsRO model is based on the creation of an object in the Windows application and its replication as a Javascript object in the browser. Both objects are connected and synchronized, thus enabling a dialogue between the Windows application and the website via Javascript.

A jsRO object can have properties, methods and events: the properties allow for data synchronization through both application and browser sides; the methods make possible the remote calling of application code; and the events help us to fire, from the Windows application, messages to the browser that could to be caught from javascript callbacks.


Object Properties

The jsRO object properties are synchronized on both the application and the browser sides. When a property value changes on one end it is spread to the other, firing an event handler that lets you take an action if necessary.



Remote methods

When a remote method is called on the browser side, it method handler callback is called on the application. Additionally, the returned result value can be processed by a javascript callback.



Remote events

Remote events allow developers to submit non-visual changes from the application to the javascript side. When the application fires an event, it is transmitted to the browser, enabling the javascript to receive and process it.

jsRO 00 Events


Hopefully, this is enough to get you started. In the next post we will learn how to create a jsRO object in our program to expose application’s data in the browser.

Then, in upcoming entries, we will be adding more complexities to leverage this framework to its full potential.


Leave a Reply

Your email address will not be published. Required fields are marked *