Data binding is a term commonly used to describe how a connection is established between an application user interface control and data as well as business logic. If the data is properly bound to the user interface elements, and if the data provides proper notifications when it is changed, then elements bound to data reflect changes automatically. By way of one specific example, an application may generate a user interface display that has forms or other user interface control elements on it. User data, or local configuration data, can be bound to user interface displays to place data within the forms or within the other user interface controls, or to define behavior of the controls.
In addition, in enterprise resource planning or customer resource management (ERP/CRM) applications, there are often many different types of data records. For instance, there may be customer data records, each of which have one or more sales orders, where each sales order is a collection of lines and each line is a collection of properties. This type of arrangement is referred to as a hierarchical data structure. It is basically a large hierarchical tree of nodes that define an object graph. When a particular data record is retrieved and displayed on a user interface display, the display attempts to show the large, complex object graph on the screen. This can be difficult and cumbersome.
The discussion above is merely provided for general background information and is not intended to be used as an aid in determining the scope of the claimed subject matter.
A data binding is defined by a binding path that can point to any given location in a hierarchical data structure. The binding can bind to an object that has a collection of properties. The binding itself defines its own context and can be implemented as two-way binding so that data changes can be tracked.
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 features 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 claimed subject matter is not limited to implementations that solve any or all disadvantages noted in the background.
Application 112 operates on data stored in data store 116 in generating web page 102. In one embodiment, the data in data store 116 is represented by a hierarchical data graph of business data in an ERP/CRM system, although other types of data can be used as well.
Computing device 101 also includes processor 120. In one embodiment, processor 120 is a computer processor with associated memory and timing circuitry (not shown). Processor 120 is illustratively a functional element of system 100 and is activated by component 114 and application 112 to facilitate their functionality.
Application 112 illustratively retrieves data from data store 116 that is bound to controls 104-108. The data is indicated by data block 118 in
One embodiment of the operation of framework 140 is described with respect to the sequence diagrams of
In one embodiment, the Key 150 comprises a binding path that is a text string. It illustratively starts with a text string that provides the name of the root of a collection and then indicates additional identifiers to identify properties in a collection and even to indicate the name of a specific property. The syntax of a particular binding path can be flexible so that it can represent any object graph that can be instantiated in the system. In one embodiment, the sequence of identifiers is simply indicated as follows:
IdentifierName.IdentifierName.IdentifierName . . .
The identifier names are on a particular object that has a property or actions collection that the caller wants to bind to. The sequence is illustratively contained in BindingKey 150. A more specific example is discussed below, with respect to
The data elements returned by ViewModel 148 implement the IBindable interface 156. This interface illustratively defines methods for getting and setting attributes and for subscribing and unsubscribing relative to objects. All of the data elements can derive from a common base class, Bindable 142.
The IBindable interface 156 illustratively allows the data elements to notify any subscribers of data changes. For two-way binding, the target (such as the logical control or base element) also implements the IBindable interface. This allows a value to change on the logical control and flow back to the data. With this in place, Binder 146 can interact with the binding sources and logical controls to bind the logical control and data using subscribe methods.
BindingReference 152 is created with each binding to track and further control the binding. This can be used for the data sources to track the bindings for an active row, for instance. When an active row changes, it can use the BindingReference 152 to refresh the binding. This serves to update the logical controls and the user does not need to rebind any of the user interface elements. Again, a specific example of this is discussed below with respect to
Consumer 154 first creates a Binder instance 146. This is indicated by arrow 160. Next, Consumer 154 creates a BinderingSource instance (such as ViewModel 148). This is indicated by block 162. BindingSource 148 gives Consumer 154 something to bind to. Consumer 154 then adds the newly created BindingSource 148 to the list of things that it can bind to in Binder 146. This is indicated by arrow 164. Consumer 154 then instantiates a BindingKey 150, which describes the hierarchy from which the BindingSource 148 will pull data to bind to controls on Consumer 154. As discussed above, BindingKey 150 can simply be a text string identifying a binding path that can be used by Consumer 154 to bind object properties from a complex object graph to its own controls. It should be noted, of course, that Consumer 154 can do this for multiple different BindingSources 148 and each one can index and retrieve data differently and be used together on one user interface display. Instantiating the BindingKey 150 is indicated by arrow 166 in
Consumer 154 then creates BaseElement 144 which can be a base class that inherits from Bindable class 142. Once BaseElement 144 is created, it can be bound to BindingSource 148 based on BindingKey 150. Creating a BaseElement 144 is indicated by block 168 in
Consumer 154 then calls bind on Binder 146. In doing so, Consumer 154 provides the BindingKey 150, the target BaseElement 144 and indicates that it is a two-way binding. This is indicated by block 170 in
Binder 146 then finds the BindingSource 148 and uses the IBindingSource interface 158 to delegate the look up of the proper element in the hierarchal data structure to ViewModel 148 based upon BindingKey 150. This is indicated by arrow 172 in
Then, when a user interface (such as a web page) is rendered, Bindable class 142 sets the attribute by providing the attribute name and attribute value in BaseElement 144. This is indicated by block 180 in
Finally, because two-way binding was specified by arrow 170 when bind was called on Binder 146, Binder 146 also subscribes to the attribute in BaseElement 144, by providing the attribute name, handler and its subscriber ID. This is indicated by arrow 182 in
It can thus be seen that the present binding pattern allows a particular element on a user interface display to bind to a particular element in a graph, even if that element is several levels deep within a hierarchal data structure. The present pattern also makes multi-context binding straight-forward. The binding is defined by a binding path where two paths can point to two entirely different spots in a hierarchy, even if they are in completely separate subtrees of the hierarchy. Thus, the binding paths set the context for the binding itself. In addition, because a subscription pattern is followed, it allows the binding framework 140 to easily accomplish change tracking in data elements. When there are data changes, those can be propagated back to the server (or other computing system) that persists the base elements containing the data and it can also take other actions based on those changes. For instance, if the data element is a text element and it has been edited, then that change is tracked, and the change can be shown to another user who has subscribed to receive such changes.
One specific example of how the subscription pattern can be used for change tracking is, for example, in a customer resources management application. A text box may be bound to an order number so that when a user interface is displayed with that text box, it will be populated with a given order number. Elements of the system can subscribe to changes made to that data element. When a change is made, the system automatically calls the SetAttribute method and inspects the data element for subscriptions to it. The system also propagates that data change up to subscribers of changes to the data element.
In addition, the present pattern facilitates implicit binding. For instance, when a view or user interface display element is bound back to a property object that has attributes, those attributes can be behavioral properties that inform the user interface of how to act. With the present pattern, a single binding path allows binding to an object that has a collection of properties. In some prior systems, every property on a control is explicitly bound to a specific property on an object. This is quite labor intensive and cumbersome. By providing a simple binding path to an object that has behavioral properties, the behavioral properties will be implicitly bound to the appropriate user interface elements.
A specific example may assist in understanding.
User interface display 400 also shows that, in the embodiment in
User interface display 400 also shows that, in the sales line display 404, the second row (or line) 424 is selected. Therefore, user interface display 400 shows the item ID 426, the item name (or item name portion) 428 and the quantity 430 for the selected line (or row) 424 in the sales line display 404.
Table 1 below illustrates example data for the data model 300 and user interface display 400 shown in
Each property (such as the SaleID property on the SalesOrder object) is an object with various properties which contain a user interface state that is needed for a control. Some examples of user interface states that might be needed for the control are: value, enabled, read only, and label.
The example user interface display 400 can be constructed with three grid controls and several edit controls. Table 2 below shows one example of how bindings can be specified for those controls.
Table 2 shows that the grid controls include the SalesOrder grid control, the SalesLine grid control, and the SerialNumber grid control. Edit controls include the SalesOrderEdit section and the SalesLine edit section. Table 2 shows that the binding that can be used to bind the SalesID to the user interface column 408, and the CustomerName to the CustomerName column 410. The SalesOrder edit section shows the binding that can be used to bind the ship date to the first edit control (the ship date portion 418). It also shows the binding that can be used to bind the CustomerID to the CustomerID portion 420 and the Name to the CustomerName portion 422.
The SalesLine grid control shows the bindings that can be used to bind the LineNumber to the LineNumber column 412 and the ItemID to the ItemID column 414. The SalesLine edit control shows bindings that can be used to bind the ItemID, the ItemName and the quantity to the portions 426, 428 and 430 on the user interface display 400, respectively. Finally, the SerialNumber grid control shows the binding that can be used to bind the data to the serial number column display 416.
When the system is interacting with the data graph (represented by the data model 300 shown in
An example that shows an implicit binding will now be discussed. Table 3 below shows an example of individual properties, or UI states, that can be bound to an edit control.
Implicit and explicit property binding can be combined by first applying all implicit bindings and then adding explicit bindings when defined. For each grid control to show the correct value in each cell of user interface display 400, the system (e.g., the control run time implemented by processor 120) illustratively adjusts the binding path to use integer indexing for each collection, in order to allow each grid row to show a different entity. The collection lowest down in the data graph (represented by data model 300 and the example data shown in Table 1) illustratively has the indexer, meaning that collections higher in the data graph use the active record (the record selected by the user in user interface display 400 of
When the user changes the active record in a grid (such as by selecting a different line in one of the grid controls), all of the controls binding lower in the data graph are updated accordingly.
An example of multiple context binding will now be discussed. In order to illustrate multiple context binding, assume that a metadata store is added for each of the entities (e.g., for the SalesOrder entity, the Customer entity, the SalesLine entity, etc. shown in the data model of
Table 6 below shows illustrative bindings for the SalesOrder grid controls for the SalesID column 408 and CustomerName column 410 in the user interface display 400 shown in
It should also be noted that the components of the system discussed above can be arranged in different ways. For instance, they can be combined to form fewer applications and components, or they can be further divided into more components or applications. In addition, they could be used in other architectures as well. They can be server-based, divided among various devices that are remote from one another, or deployed in a could-computing architecture.
A cloud computing architecture illustratively include infrastructure, platforms and applications. The cloud services are coupled to other devices or systems such as cloud servers, desktop computers, tablet computers, laptop computers, cellular phones or smart phones or other mobile devices or personal digital assistants. Cloud computing provides computation, software, data access, and storage services, rather than products, that do not require end-user knowledge of the physical location or configuration of the system that delivers the services. In various embodiments, cloud computing delivers the services over a wide area network, such as the internet, using appropriate protocols. For instance, cloud computing providers deliver applications over a wide area network and they can be accessed through a web browser or any other computing component. Software or components of system 100 as well as the corresponding data, can be stored on servers at a remote location in the cloud. The computing resources in a cloud computing environment can be consolidated at a remote data center location or they can be dispersed. Cloud computing infrastructures can deliver services through shared data centers, even though they appear as a single point of access for the user. Thus, the components and functions described herein can be provided from a service provider at a remote location using a cloud computing architecture. Alternatively, they can be provided from a conventional server, or they can be installed on a client device directly, or in other ways.
System 100 (or components of system 100) can also run on a variety of computing devices, such as desktop computers, laptops, tablet computers, smart phones, cell phones, multimedia players, personal digital assistants, etc.
Under other embodiments, applications or systems (like system 100) are received on a removable Secure Digital (SD) card that is connected to a SD card interface 15. SD card interface 15 and communication links 13 communicate with a processor 17 along a bus 19 that is also connected to memory 21 and input/output (I/O) components 23, as well as clock 25 and location system 27.
I/O components 23, in one embodiment, are provided to facilitate input and output operations. I/O components 23 for various embodiments of the device 16 can include input components such as buttons, touch sensors, touch screens, proximity sensors, microphones, tilt sensors, and gravity switches and output components such as a display device, a speaker, and or a printer port. Other I/O components 23 can be used as well.
Clock 25 illustratively comprises a real time clock component that outputs a time and date. It can also, illustratively, provide timing functions for processor 17.
Location system 27 illustratively includes a component that outputs a current geographical location of device 16. This can include, for instance, a global positioning system (GPS) receiver, a LORAN system, a dead reckoning system, a cellular triangulation system, or other positioning system. It can also include, for example, mapping software or navigation software that generates desired maps, navigation routes and other geographic functions.
Memory 21 stores operating system 29, network settings 31, applications 33, application configuration settings 35, data store 37, communication drivers 39, and communication configuration settings 41. Memory 21 can include all types of tangible volatile and non-volatile computer-readable memory devices. It can also include computer storage media (described below). Memory 21 stores computer readable instructions that, when executed by processor 17, cause the processor to perform computer-implemented steps or functions according to the instructions. Portions of system 100, for example, can reside in memory 21. Processor 17 can be activated by other components to facilitate their functionality as well.
Examples of the network settings 31 include things such as proxy information, Internet connection information, and mappings. Application configuration settings 35 include settings that tailor the application for a specific enterprise or user. Communication configuration settings 41 provide parameters for communicating with other computers and include items such as GPRS parameters, SMS parameters, connection user names and passwords.
Applications 33 can be applications that have previously been stored on the device 16 or applications that are installed during use, although these can be part of operating system 29, or hosted external to device 16, as well.
The mobile device of
Note that other forms of the devices 16 are possible. Examples include tablet computing devices, music or video players, and other handheld computing devices.
Computer 810 typically includes a variety of computer readable media. Computer readable media can be any available media that can be accessed by computer 810 and includes both volatile and nonvolatile media, removable and non-removable media. By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer storage media is different from, and does not include, a modulated data signal or carrier wave. It includes hardware storage media including both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by computer 810. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a transport mechanism and includes any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media. Combinations of any of the above should also be included within the scope of computer readable media.
The system memory 830 includes computer storage media in the form of volatile and/or nonvolatile memory such as read only memory (ROM) 831 and random access memory (RAM) 832. A basic input/output system 833 (BIOS), containing the basic routines that help to transfer information between elements within computer 810, such as during start-up, is typically stored in ROM 831. RAM 832 typically contains data and/or program modules that are immediately accessible to and/or presently being operated on by processing unit 820. By way of example, and not limitation,
The computer 810 may also include other removable/non-removable volatile/nonvolatile computer storage media. By way of example only,
The drives and their associated computer storage media discussed above and illustrated in
A user may enter commands and information into the computer 810 through input devices such as a keyboard 862, a microphone 863, and a pointing device 861, such as a mouse, trackball or touch pad. Other input devices (not shown) may include a joystick, game pad, satellite dish, scanner, or the like. These and other input devices are often connected to the processing unit 820 through a user input interface 860 that is coupled to the system bus, but may be connected by other interface and bus structures, such as a parallel port, game port or a universal serial bus (USB). A monitor 891 or other type of display device is also connected to the system bus 821 via an interface, such as a video interface 890. In addition to the monitor, computers may also include other peripheral output devices such as speakers 897 and printer 896, which may be connected through an output peripheral interface 895.
The computer 810 is operated in a networked environment using logical connections to one or more remote computers, such as a remote computer 880. The remote computer 880 may be a personal computer, a hand-held device, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to the computer 810. The logical connections depicted in
When used in a LAN networking environment, the computer 810 is connected to the LAN 871 through a network interface or adapter 870. When used in a WAN networking environment, the computer 810 typically includes a modem 872 or other means for establishing communications over the WAN 873, such as the Internet. The modem 872, which may be internal or external, may be connected to the system bus 821 via the user input interface 860, or other appropriate mechanism. In a networked environment, program modules depicted relative to the computer 810, or portions thereof, may be stored in the remote memory storage device. By way of example, and not limitation,
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.