Many conventional computer programs use data-consuming entities that access data from one or more data locations. Data binding is one common approach by which entities access this data. Data binding is achieved, in part, through custom code created for and located on the computer program having the data-consuming entities.
This custom code, however, may require updates for each computer program or other time-consuming management. For example, some custom code may rely on management by a software developer that does not have sufficient skill to easily manage the custom code, such as when the custom code is written by one developer and managed by another. Further, even the most skilled developer may inadvertently or maliciously cause problems for a provider of data. Because of this, some data providers do not want to enable developers to alter or otherwise manage the custom code.
This document describes tools capable of updating data-consuming entities. These tools allow a developer of an application to use data binding to update data-consuming entities without the need to write custom code.
This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter. The term “tools,” for instance, may refer to system(s), method(s), computer-readable instructions, and/or technique(s) as permitted by the context above and throughout the document.
The detailed description is described with reference to the accompanying figures. In the figures, the left-most digit of a reference number identifies the figure in which the reference number first appears. The use of the same reference number in different instances in the description and the figures may indicate similar or identical items.
Overview
This document describes tools capable of allowing a developer of an application to use data binding without the need to write custom code. The tools may be distributed in a software development kit provided to the developer. Full control of the custom code needed to do the data binding remains in the hands of the makers of the software development kit. This may provide increased reliability of developed applications and save development time and money.
In one embodiment, the tools use an external entity that manages data at data locations. This external entity is deployed on the computing device running the application but is external to the application. The tools may also contain a module to be embedded within the application. This internal module communicates with the external entity and enables a developer to declare a data path for one or more data-consuming entities relative to the internal module. The developer may then assign the internal module a data-location path, which the internal module may register with the external entity. The external entity then monitors the data-location path for appropriate data updates. When the external entity detects a change to the data it passes the data on to the internal entity. The internal entity updates the data-consuming entities with the changed data to which they are bound.
By so doing the tools not only enable a developer to update the data-consuming entities without the need to write custom data-binding code, the tools may also enable a change to the data location, such as moving the data from one server to another, to be easily handled by a simple change to the data-location path within the application.
Example Environment
External data-management module 108 is external to applications 110 and configured to manage data located at data locations, such as data location 112. In this environment, device-local data locations 112 are local to computing device 102 but not located within applications 110. External data-management module 108 enables developers of applications 110 to manage data from a variety of data locations. External data-management module 108 may filter the data from data locations 112, such as based on a current state of computing device 102, user preferences, or other information. In another embodiment, external data-management module 108 is located on a different computing device and has remote access to information on computing device 102.
Each of applications 110 can be of varying different types, such as a web application, a web service, a word processor, or an executable. Applications 110 may contain one or more data-consuming objects 114, indirect data-source modules 116, and/or application-local data locations 118. Each or either of these data locations 112 and 118 contains data that one or more data-consuming objects 114 may consume. A device-local data location (e.g., 112) may be located on a permanent or removable computer-readable storage medium, such as a DVD, compact disk, USB flash drive, or USB hard drive.
Data-consuming objects 114 are objects that use and/or display data. Some examples include an audio/video recording object, an audio/video/image displaying object, a text box, a button, or a combo box. Each of data-consuming objects 114 is configured to reference data indirectly through indirect data-source modules 116. Indirect data-source modules 116 are configured to communicate with external data-management module 108. Indirect data-source modules 116 inform external data-management module 108 of a data location that external data-management module 108 will manage. Indirect data-source modules 116 may receive data updates from external data-management module 108. Indirect data-source modules 116 may also communicate data updates to those data-consuming objects 114 that want to consume the data.
Data-consuming objects 114 may also or instead reference data directly through external data-management module 108. In this case each of data-consuming objects 114 has code embedded to carry out the duties of indirect data-source module 116. Application-local data locations 118 are data locations within the application that may be directly or indirectly bound to. An example of data at such a location is an application's version information, to which a data-consuming object 114 may bind in order to display such information to the user.
Computing device 102 is optionally configured to communicate with one or more remote computing devices 120, such as a server computer, a personal computer, a media player, or an external storage device. Remote computing device 120 includes one or more processors 122 and computer-readable media 124. Computer-readable media 124 contains or has access to one or more remote data locations 126. Remote data locations 126 contain data that one or more data-consuming objects 114 may consume. Computing device 102 may communicate through a communication network 128 with computing device 120. Communication network 128 may be any network enabling communication between any two or more of the computing devices, such as the Internet, a local-area network, a wide-area network, a wireless network, a USB hub, or a combination of these.
A few examples of data locations 112, 118, and 126 include a computer file/folder, a database, a data variable, a web page, or a web service. Data contained at such data locations 112, 118, or 126 may be of any type, such as one or more family photos, recorded movies, television shows, songs, streaming movies, television show times, media channel lists, pictures, prices and descriptions of goods for sale, application data fields, hyperlinks, or text characters to be displayed. These are not meant to be exhaustive lists of examples. The tools are intended to be used with any sort of data to which any sort of data-consuming object 114 may be bound.
Generally, any of the functions described herein can be implemented using software, firmware, hardware (e.g., fixed-logic circuitry), manual processing, or a combination of these implementations. The terms “tool” and “module,” as used herein generally represent software, firmware, hardware, whole devices or networks, or a combination thereof. In the case of a software implementation, for instance, a module may represent program code that performs specified tasks when executed on a processor (e.g., CPU or CPUs). The program code can be stored in one or more computer-readable memory devices, such as computer-readable media 106 and/or 124. The features and techniques of the tools are platform-independent, meaning that they may be implemented on a variety of commercial computing platforms having a variety of processors.
Example Process for Indirectly Binding Data through an External Entity
The following discussion describes ways in which the tools may operate to enable an application to bind to data without its developer needing to write data-binding code. Aspects of this and other processes described herein may be implemented in hardware, firmware, software, or a combination thereof. These processes are shown as sets of blocks that specify operations performed by the tools, such as through one or more modules or devices and are not necessarily limited to the order shown for performing the operations by the respective blocks. In portions of the following discussion reference may be made to environment 100 of
Block 202 registers a data-location path with an external entity. The data-location path is first defined by the developer within the application. The data-location path is a path to a data location that contains data to which one or more data-consuming entities in the application may wish to bind. Registering the data-location path with the external entity may involve communicating the data-location path to the external entity. The external entity may then monitor the data location specified by the data-location path. In another embodiment, both the external entity and the application are provided with a pre-defined data-location path and block 202 may be skipped.
By way of example, consider
Web application 400 includes a user interface 402. User interface 402 includes a video-playing object 404 named Video1, a text-box object 406 named Text1, and a button object 408 named Button1. These objects are all examples of data-consuming objects 114 of
Block 204 receives a notification of changed data from an external entity. This notification may be responsive to the data being checked by the external entity for the first time or because the data has changed since last checked. Block 206 communicates a request for the changed data to the external entity. Block 208 receives the changed data from the external entity. Block 210 updates any bound data-consuming entities with the changed data. In some embodiments, the external entity is configured to automatically communicate the changed data. In such an embodiment, blocks 204 and/or 206 may be skipped.
Continuing the ongoing example, indirect data-source module 116 receives a notification from the external entity as in block 204. The notification informs indirect data-source module 116 that data at the data location specified by data-location path 300 has changed. Indirect data-source module 116 then communicates a request for the changed data to the external entity as in block 206. Upon receiving the changed data (block 208), indirect data-source module 116 stores the changed data in data buffer 302. Indirect data-source module 116 then updates Video1404, Text1406, and Button1408 with the changed data as in block 210 of
For example, the data updated can be a URL of video content for Video1404 to play. Video1404 retrieves this data from data buffer 302 via path mytuneUrl[1] of Table I. The data updated can be a text description of the video content for Text1406 to display. Text1406 retrieves this data from data buffer 302 via path myValues[1] of Table I. The data updated can be a link to a button to display as Button1408. Button1408 retrieves this data from data buffer 302 via path myButtonHRef[1] of Table I. Alternatively, in some embodiments data-provider module 304 actively updates a data field within the objects with the changed data. In those embodiments the paths described above are a data variable within each object but accessible by data-provider module 304. Data-provider module 304 actively sets those variables to the new data value in those embodiments.
Example Device
Applications, such as application 400, may be used in various devices. Consider, by way of example, a set-top box connected to a television. Application 400 may run on such a set-top box and with it a user can preview channels to find something to watch. A user can preview a video in Video1404 and read the description of what is playing in Text1406 to decide if he wants to watch it. When a desired channel is found the user may press Button1408. In the background, the external entity downloads a list of channels from “webservice.aspx” (Table I, line 5). It then changes the data periodically (e.g., to proceed to the next channel preview). Indirect data-source module 116 is informed of the changed data and communicates a request for the changed data. Responsive to receiving the changed data, indirect data-source module 116 updates Video1404 and Text1406 objects. These objects then show the updated channel-preview information. Application 400 may forgo code capable of knowing that this is occurring. Application 400 may simply display whatever data the external entity tells it to display. Once Button1408 is selected, the external entity stops changing the data and application 400 remains on the chosen channel.
Example Process for Providing Indirect Data Binding for an Application
Block 502 receives a registration containing a data-location path, such as data-location path 300 of
By way of example, consider
Block 504 detects a change to data at the data location. Continuing the ongoing example, data-binding module 606 connects with and understands data at the data location. Data-binding module 606 monitors the data for changes. It detects changes and downloads relevant data into data buffer 608. Block 506 communicates a notification to the internal module informing it that data at the data location has changed. Continuing the example, if the data has any changes, or if this is the first time checking the data, data-binding module 606 informs internal data-source module 116 of the changed state. Block 508 receives a request for the data that has changed. Continuing the example, data-binding module 606 receives a request for the data from indirect data-source module 116. Block 510 communicates (e.g., sends) the data that has changed to the internal module. In another embodiment the changed data is automatically sent to the internal module. In this other embodiment blocks 506 and/or 508 may be skipped. Continuing the example, data-binding module 606 communicates the changed data to indirect data-source module 116.
In the specific example of a set-top box above, data-binding module 606 can be configured to be aware of a user's selection to preview channels based on information located in the set-top box. From the data location, data-binding module 606 may fetch a list of channels, the descriptions for what are currently on each of those channels, and a view-channel button. Data-binding module 606 stores this information in data buffer 608. Data-binding module 606 then selects the first channel, its text description, and the button link. Data-binding module 606 communicates the data to indirect data-source module 116 for the application to display as described previously. After some time has passed, data-binding module 606 sets the channel and text to the next value and again communicates the changed data to indirect data-source module 116 for the application to display. This continues until the user presses the button, which in this specific example is set to perform a view-button function. The user selects the view button to inform the set-top box that this is the channel he wishes to view.
Conclusion
This document describes tools capable of updating data-consuming entities. These tools allow a developer of an application to use data binding to update data-consuming entities without the need to write custom code. Although the invention has been described in language specific to structural features and/or methodological acts, it is to be understood that the invention defined in the appended claims is not necessarily limited to the specific features or acts described. Rather, the specific features and acts are disclosed as example forms of implementing the claimed invention.