The present invention relates to integrating applications. In particular the present invention relates to integrating a client application associated with a service provider with one or more web application instances on a device.
A service provider may provide a client application for use on a device. The client application may be installed on the device for subsequent use on a device platform of the device. In some situations the service provider may provide a client application which is a hybrid application in the sense that it has some web-based components which utilize a web-based technology (e.g. in accordance with the HTML 5 standard) and some native components which utilize a technology which is native to the device platform (e.g. C++). The native parts of the client application allow the client application to function in accordance with the technology implemented by the service provider. On the other hand, the web-based components of the client application allow the client application to be integrated with other applications implementing web-based technology in a simple manner. In particular, a user interface (UI) module of the client application may be implemented using web-based technology so that the UI module of the client application can be embedded in a web-based application such as an instance of a web application (executing in the browser) which is provided by an entity (referred to herein as a “partner”) other than the service provider. An instance of a web browser may refer to any separate interface of a web browser with which a user can interact, such as a window, tab or frame of a web browser or instances of different web browsers from different vendors such as Microsoft Internet Explorer and Google Chrome. Each web application instance can retrieve suitable UI widgets of the client application from the service provider and can implement the UI widgets in the web application instance. For example, the web application instance may load JavaScript and Cascading Style Sheet (CSS) files from a server associated with the service provider, wherein the JavaScript code can be invoked by the web application instance to instantiate specific UI elements of the client application within the web application instance.
It can be beneficial to maximize the proportion of web technology in the service provider client application, to thereby keep the native parts of the client application to a minimum. Web-based technologies have superior upgrade capabilities compared to the native technologies. For example, JavaScript, CSS and HTML files can be dynamically downloaded over the Internet, thereby making it simple to change (e.g. upgrade) the web-based parts of the client application. In contrast, changing the native parts of the client application would require an installation of the native parts (using the native technologies, e.g. C++) on the device, which may be more difficult than downloading files over the Internet. A control and state module of the client application and the native parts of the client application may be embedded into each web application instance on the device. This allows the control and state module of the client application to use a web-based technology (rather than a native technology). However, by embedding the control and state module of the client application into each web application instance on the device, there is no ability to co-ordinate between the integration of the client application with multiple web application instances from multiple partners. Each partner integration forms a separate silo on the user device preventing global control of the client application across multiple web application instances on the device from multiple partners. Furthermore, this method is only suitable if there is no constraint against multiple instantiations on the device of the native parts of the service provider application. There may be reasons for constraining the native parts of the client application to be instantiated only once on the device, these reasons including resource constraints or legacy considerations. The constraint that the native parts of the client application are instantiated only once on the device is found in practice for example in the realm of client applications handling Internet communication services.
According to a first aspect of the invention there is provided a method of integrating a client application, associated with a service provider, with at least one web application instance implemented on a device platform of a device, the method comprising: embedding a respective at least one user interface module of the client application into the at least one web application instance, said at least one user interface module being implemented using web-based technology; implementing native parts of the client application in a centralized manner on the device, said native parts of the client application being installed on the device and being implemented using technology that is native to the device platform; and implementing a control module of the client application in a centralized manner on the device, said control module being implemented using web-based technology.
Advantageously the control module (which may be a control and state module of the client application) is implemented centrally on the device thereby allowing for centralized device-wide control of the client application at the device, such that the client application behaviour across the device can be co-ordinated. Furthermore, the control module is implemented using web-based technology on the device, thereby allowing the control module to be changed (e.g. upgraded) using the web-based technology.
Embodiments of the invention provide new and improved solutions for a problem of how to implement client-side web integration (also known as a “mash-up”) between a hybrid web and native client application provided by a service provider and web applications provided by “partners” (i.e. entities other than the service provider). Elements of the hybrid client application, including the UI module, can be inserted (that is, embedded) into one or more web application instances of the partner. Where there is more than one web application instance on the device the elements of the hybrid client application can be embedded into the web application instances of a partner simultaneously with other partner applications. Embodiments are particularly useful in an environment where the native parts of the service provider client application can be instantiated only once on the device at a time. As described above, there can be many reasons for such a constraint, including resource constraints or legacy considerations, and this constraint can be found in practice, for example in the realm of Internet communication services.
In preferred embodiments the service provider client application is split into three components:
As described above, advantageously, two usually contradictory goals can be achieved in embodiments:
There may be only one instance of the native parts of the client application implemented on the device at a time. Similarly, there may be only one instance of the control module of the client application implemented on the device at a time.
In preferred embodiments, the native parts of the client application and the control module of the client application are implemented using a centralized program on the device.
The native parts of the client application may include at least one of: (i) native libraries of the service provider, (ii) a Remote Procedure Call hub for facilitating signalling between components on the device which use web-based technology, and (iii) an instance of a JavaScript engine.
The control module may be downloaded to the device from the service provider via the Internet.
The method may further comprise upgrading the control module via web-based communication.
The control module may facilitate access between the at least one user interface module and the native parts of the client application.
A respective browser plugin may be implemented for each web application instance, said browser plugin having Remote Procedure Call (RPC) functionality for communicating with at least one of the control module and the native parts of the client application. The Remote Procedure Call functionality may facilitate Transmission Control Protocol (TCP) connections for relaying control messages between the at least one web application instance and said at least one of the control module and the native parts of the client application. The control messages may be relayed using publish-subscribe communication.
There may be a plurality of web application instances implemented on the device, wherein each web application instance may be controlled by the control module of the client application.
The control module may be a control and state module of the client application.
The web based technology may conform to the HTML 5 standard.
According to a second aspect of the invention there is provided a computer program product for integrating a client application, associated with a service provider, with at least one web application instance implemented on a device platform of a device, the computer program product being embodied on a non-transient computer-readable medium and configured so as when executed on a processor of the device to perform the operations of: embedding a respective at least one user interface module of the client application into the at least one web application instance, said at least one user interface module being implemented using web-based technology; implementing native parts of the client application in a centralized manner on the device, said native parts of the client application being installed on the device and being implemented using technology that is native to the device platform; and implementing a control module of the client application in a centralized manner on the device, said control module being implemented using web-based technology.
According to a third aspect of the invention there is provided a device configured to integrate a client application, associated with a service provider, with at least one web application instance implemented on a device platform of the device, the device being configured to: embed a respective at least one user interface module of the client application into the at least one web application instance, said at least one user interface module being implemented using web-based technology; implement native parts of the client application in a centralized manner on the device, said native parts of the client application being installed on the device and being implemented using technology that is native to the device platform; and implement a control module of the client application in a centralized manner on the device, said control module being implemented using web-based technology. The native parts of the client application and the control module of the client application may be implemented using a centralized program on the device.
For a better understanding of the present invention and to show how the same may be put into effect, reference will now be made, by way of example, to the following drawings in which:
The network 112 may, for example, be the Internet. As shown in
The preferred embodiments described herein relate to integrating a client application of the service provider with web application instances associated with the web servers 116 and 118.
Two different approaches are in use in the prior art to integrate a hybrid service provider client application with web application instances on the device 102.
The web browser 202y is associated with the server Y 116 operated by a partner Y. The web browser 202y includes a web application instance 204y which is implemented on the device 102. The web browser 202y also includes a browser plugin 210y which implements an instance of the native parts (including the native libraries 212y) of the client application on the device 102. Similarly, the web browser 202, is associated with the server Z 116 operated by a partner Z. The web browser 202, includes a web application instance 204z which is implemented on the device 102. The web browser 202, also includes a browser plugin 210, which implements an instance of the native parts (including the native libraries 212z) of the client application on the device 102.
The web application instances 204y and 204z originated at web servers 116 and 118 at domains y.com and z.com and are downloaded to the device 102 via the network 112. Each of these web application instances 204y and 204z runs in a separate instance of a web browser (202y and 202z). By the instance of the web browser it is meant herein a window, tab, or frame, including concurrent use of various browser vendors (e.g. Browser1: Microsoft Internet Explorer, Browser2: Google Chrome). Each web application instance 204y and 204z constructs suitable UI widgets (206y and 206z respectively) of the service provider. The UI widgets 206 are UI modules of the client application of the service provider. The UI widgets 206 originated at the web server 114 of the service provider at domain x.com.
In
The dynamic content on the server 116 (that is, at domain y.com) is downloaded onto the web application instance 204y on the browser 202y and when that dynamic content is executed on the device 102 it causes the web application instance 204y to download JavaScript and CSS files from the server 114 (at domain x.com) associated with the service provider. The downloaded JavaScript code that comes from the server 114 (x.com) instructs the web application instance 204y to instantiate specific UI elements of the client application within the web application instance DOM (Document Object Model). This is shown in
Similarly, the dynamic content on the server 118 (that is, at domain z corn) is downloaded onto the web application instance 204z on the browser 202, and when that dynamic content is executed on the device 102 it causes the web application instance 204, to download JavaScript and CSS files from the server 114 (at domain x.com) associated with the service provider. The downloaded JavaScript code that comes from the server 114 (x.com) instructs the web application instance 204, to instantiate specific UI elements of the client application within the web application instance DOM (Document Object Model). This is shown in
It can be appreciated from
The native capabilities of the service provider client application are made accessible to the web content on the web application instances 204y and 204z by hosting them in a respective browser plugin 210y and 210z, provided by the service provider. As described above the browser plugins 210y and 210z are installed on the device 102 and use a technology that is native to the device platform of the device 102.
In the arrangement shown in
Furthermore, the arrangement shown in
It can therefore be appreciated that there are problems with the arrangement shown in
The web browser 302y is associated with the server Y 116 operated by a partner Y. The web browser 302y includes a web application instance 304y which is implemented on the device 102. The web browser 302y also includes a RPC plugin 314y which provides thin Remote Procedure Call (RPC) functionality in the browser plugin 314y. Similarly, the web browser 302, is associated with the server Z 116 operated by a partner Z. The web browser 302z includes a web application instance 304z which is implemented on the device 102. The web browser 302y also includes a RPC plugin 314y which provides thin Remote Procedure Call (RPC) functionality in the browser plugin 314y. The device implements a central application daemon 316 on which is implemented the native parts of the client application of the service provider and the control and state module 308. The central application daemon 316 can communicate with the RPC plugins 314y and 314z over a Transmission Control Protocol (TCP) connection using the RPC functionality of the plugins 314y and 314z. The central application daemon 316 can be installed by the service provider on the device 102 and uses a native technology of the device platform of the device 102 (e.g. C++). The central application daemon 316 provides for device-wide control of the client application using the control and state module 308. As described above in relation to
In the arrangement shown in
As can be appreciated from viewing
The component of the client application that coordinates the behaviour of the client application across the whole device 102 is shown as the “controller and state” module 308. This controller and state module 308 has a central location on the device 102, because it resides in the central application daemon 316. However, due to this central location, it has also a native characteristic, e.g. it is developed in non-HTML 5 environment, e.g. using C++. Therefore, as described above, upgrade of the controller and state components of the client application does not leverage the upgrade-ability of the web-based technologies such as those conforming to the HTML 5 standard.
It can therefore be appreciated that there are problems with the arrangement shown in
Preferred embodiments of the invention are described herein by way of example only.
The web browser 402y is associated with the server Y 116 operated by a partner Y. The web browser 402y includes a web application instance 404y which is implemented on the device 102. The web browser 402y also includes a RPC plugin 414y which provides thin Remote Procedure Call (RPC) functionality in the browser plugin 414y. Similarly, the web browser 402, is associated with the server Z 116 operated by a partner Z. The web browser 402, includes a web application instance 404, which is implemented on the device 102. The web browser 402y also includes a RPC plugin 414y which provides thin Remote Procedure Call (RPC) functionality in the browser plugin 414y. The native section 418 of the central application daemon 416 can communicate with the RPC plugins 414y and 414z over a Transmission Control Protocol (TCP) connection using the RPC functionality of the plugins 414y and 414z. The central application daemon 416 can be installed by the service provider on the device 102 and the native section 418 uses a native technology of the service provider (e.g. C++). The central application daemon 416 provides for device-wide control of the client application using the control and state module 408.
The web application instances 404y and 404z originated at web servers 116 and 118 at domains y.com and z.com and are downloaded to the device 102 via the network 112. Each of these web application instances 404y and 404z runs in a separate instance of a web browser (402y and 402z). By the instance of the web browser it is meant herein a window, tab, or frame, including concurrent use of various browser vendors (e.g. Browser1: Microsoft Internet Explorer, Browser2: Google Chrome). Each web application instance 404y and 404z constructs suitable UI widgets (406y and 406z respectively) of the service provider. The UI widgets 406 are UI modules of the client application of the service provider. The UI widgets 406 originated at the web server 114 of the service provider at domain x.com.
In the arrangement shown in
As can be appreciated from viewing
The component of the client application that coordinates the behaviour of the client application across the whole device 102 is the control and state module 408. This control and state module 408 has a central location on the device 102, because it resides in the central application daemon 416. Advantageously, the control and state module 408 is implemented on the JavaScript engine 424 of the central application daemon 416. In this way the control and state module 408 is able to use web-based technology such as technology conforming to the HTML 5 standard. Therefore, as described above, upgrade of the control and state module 408 of the client application is able to leverage the upgrade-ability of the web-based technologies.
In
The arrangement shown in
In the example shown in
The UI widgets 406y and 406z are minimal in the sense that they have their responsibility reduced to handling of the graphical user interface for output on the display 110 to the user 104. All other functionality of the client application is delegated to the central application daemon 416 to be handled centrally. As described above, this delegation of functionality is mediated by special Remote Procedure Call (RPC) plugins (414y and 414z) of the browsers (402y and 402z). The plugins 414y and 414z are provided by the service provider, and downloaded to the browsers 402y and 402z from the server 114 (at domain x.com). The responsibility of the plugins 414 is reduced to merely relaying control messages in both directions between the native section 418 of the central application daemon 416 and the UI widgets 406.
As described above, the central application daemon 416 is split into two parts:
The JavaScript engine 424 embedded in the central application daemon 416 allows the control and state module 408 of the client application to be both centrally positioned on the device 102 (on the central application daemon 416), and implemented using web-based technology, i.e. it is web oriented. Several choices of such an embeddable JavaScript engine 424 exist, including a Webkit browser and Google's V8 JavaScript engine.
As described above, the HTML 5 nature of the control and state module 408 of the preferred embodiments allows leveraging the following benefits of web-based technology:
In order to connect the components implemented in the device 102 together in such a way that they function together in a coordinated way, the invention provides for some distributed computing facilities are provided in the device 102. These distributed computing facilities include:
In a publish-subscribe communication process senders of messages (referred to as “publishers”) do not program the messages to be sent directly to specific receivers (referred to as “subscribers”). Instead, published messages are characterized into classes without knowledge of what, if any, subscribers there may be. Subscribers express interest in one or more classes, and then only receive messages that are of interest (i.e. of the specified class(es)) without knowledge of what, if any, publishers there are.
The components in the device 102 exchange control messages between the RPC plugins (414 and 422) and the native section 418 of the client application over TCP connections using a structured data format, such as JavaScript Object Notation (JSON).
The distributed computing facilities in the device 102 allow two kinds of communication to occur:
In step S504 native parts of the client application are implemented on the central application daemon 416. The native parts of the client application are installed on the device 102 (e.g. stored in memory 108) and implemented using a technology that is native to the device platform.
In step S506 the control and state module 408 is implemented on the central application daemon 416. The control and state module 408 is implemented using a web-based technology on the JavaScript engine 424 of the central application daemon 416.
The nature of the operation of the invention is made clearer using two general examples.
The following steps are implemented in the first example in accordance with the diagram of
1. In response to some user action, the UI widget 406y invokes a JavaScript call on the RPC plugin 414y residing in the browser 402y where the UI widget 406y is loaded.
2. The effect of this call is the transmission of the complementary JSON message over the TCP connection from the RPC plugin 414y to the RPC hub 420 located in the native section 418 of the central application daemon 416.
3. The RPC hub 420 relays the message to the controller 408 (i.e. the control and state module 408), instructed so by the channel subscribed to by the controller 408 (according to the publish-subscribe protocol), and which was selected by the UI widget 406y.
4. The JSON message directed to the controller 408 is received by the RPC plugin 422 residing in the JavaScript engine 424 of the central application daemon 416 and then passed to the controller 408.
5. The controller invokes a JavaScript call on its own RPC plugin 422, effecting a transmission of the complementary JSON message towards the native library 412 component of the central application daemon 416. This is equivalent to remotely invoking the services of this native library 416.
6. The native library implements the request contained in the JSON message from the controller 408, by executing its own native code (i.e. implemented using the native technology).
The following steps are implemented in the second example in accordance with the diagram of
1. An event occurs within the native library 412.
2. The native library 412 transmits a complementary JSON message to the controller 408 (i.e. the control and state module 408) via co-located RPC plugin 422 in the central application daemon 416, i.e. embedded into the JavaScript engine 424 that runs the controller 408.
3. The RPC plugin 422 of the controller 408 delivers the event message to the controller 408 via a JavaScript call.
4. The controller 408 runs appropriate business logic, coded in JavaScript, based on the state held in the HTML 5 database of the JavaScript engine 424, and on the contents of the event. The controller 408 makes certain decisions and state transitions that need to be communicated to the UI widgets 406y and 406z.
5. The controller 408 transmits a JSON message (via the RPC plugin 422) directed at the RPC hub 420, including the publish-subscribe channel that logically selects the entity of the notification.
6. The RPC hub 420 relays the message on TCP connections linking it with the RPC plugins 414y and 4142 of the UI widgets 406y and 406z that expressed an interest in the notification by subscribing on the complementary publish-subscribe channel. The example shown in
7. The RPC hub 420 sends the message on both TCP sockets linking it with the RPC plugins 414y and 414z collocated with UI modules 406y and 406z.
8. Each RPC plugin 414y and 414z in turn makes a complementary JavaScript call on the UI widget 406y and 406z, delivering the content of the message.
9. Each UI widget 406y and 406z delivers appropriate graphical presentation of the event for the user 104, e.g. on the display 110 of the device 102.
The arrangements described herein in relation to
In particular, the arrangement shown in
Comparing to the second prior art arrangement shown in
In addition, the invention provides some non-functional advantages in the area of resiliency.
The first prior art arrangement shown in
The second prior art arrangement shown in
There is therefore described an arrangement for integrating a client application with web application instances on the device 102 which provides centralised control and state module 416 that can also be implemented using web-based technologies. This is achieved by implementing the JavaScript engine 424 on the central application daemon thereby allowing the control and state module 408 to be both centralised and web-based.
The components (402 to 424) shown in
The device 102 may be of any suitable type on which the applications described herein can be implemented. For example, the device 102 may be a mobile phone, a personal computer, a laptop, a television or any other device which can store and execute the applications described herein and can also connect to, and communicate with, the network 112.
The service provider client application may be a client application for communicating over the network 112, e.g. with other user devices connected to the network 112. The client application may be for performing other functions at the device 102 as would be apparent to a person skilled in the art.
Furthermore, while this invention has been particularly shown and described with reference to preferred embodiments, it will be understood to those skilled in the art that various changes in form and detail may be made without departing from the scope of the invention as defined by the appendant claims.