Historically, computer systems provided a command-line interface for the programmer or other user of a computer system. Modern computer systems provide a graphic display for the user. Typically, the user of a modern computer system sees and interacts with several windows or frames on a display associated with the computer system. For example, a user selects a window using a mouse or keyboard and enters data or a command in the window. The user can make a selection in one window that requests the display in a second window of a spreadsheet or other data report obtained from a database or over a network. The user can then make further requests that change data in the second window. For example, the user can request that the format of the data displayed in the second window be changed or that the data report be replaced by some other data report.
In general, initiatives or interactions by the user in one window lead to results or changes in displays in another window. In effect, the user initiates a message from one window that is communicated to the second window. The message may be acted upon by scripts or program code associated with the second window to cause some change in the display in the second window or some other effect, or text provided in the message may be displayed in the second window.
Typically, the windows (or frames) are associated with each other, for example, in a hierarchical set of windows. Alternatively, one window may be the xe2x80x9copener,xe2x80x9d that is, the window that opened the second window for display on the computer""s display at some previous point in time. Thus, each source window originating a message has some relationship to the target window that is to the receive the message. Typically, a script associated with the source window directs the message to the target window based on this relationship.
In one conventional approach, the windows are frames in a network browser, and scripts, such as scripts based on JavaScript(trademark) from Sun Microsystems Inc., are associated with each window. A script associated with a source frame typically generates a message based on the user""s actions, using JavaScript conventions, to send to a target frame to receive the message based on the relationship between the source frame and the target frame. Each frame typically has some explicit relationship to other frames in the display. For example, one frame may be related to another frame by being the parent of that frame, that is, the frame is a parent frame in a hierarchy of parent-child frames. Alternatively, a frame may be the opener of another frame without being the parent of the opened frame.
As described previously, the windows (or frames) shown on a conventional computer display are associated with each other, for example, in a hierarchical set of windows (e.g., frameset). For example, a conventional script (or programming code) for the window that is the source of the message must specify explicitly where the target window is in the hierarchy windows relative to the source window. Alternatively, conventional systems require that the windows have some other relationship, such as an opener relationship between the source window and the target window. In this case, the script for the source window must explicitly indicate this relationship between the source window and the target window. In some conventional systems, the relationship is stated explicitly, although referred to in a shorthand form, as when the highest level window in the hierarchy (e.g., frameset) can be referred to as the xe2x80x9ctopxe2x80x9d window (e.g., top of a frameset) without explicitly referring to every window in the hierarchy.
As applications displayed in browsers for the web (e.g. World Wide Web or WWW) have become more complex, a large number of windows or frames in a network browser (e.g. web browser) may be open at one time for display to a user. Typically, conventional applications are implemented in a number of relatively small scripts (e.g. JavaScript code) associated with each window in the application. The conventional script associated with each window can generate messages to be sent to one or more of the other windows. With the increasing complexity of these window-based conventional applications, the writing and maintaining of the scripts becomes increasingly difficult if the relationship of each target window must be stated explicitly when sending a message to the target window. A single change in the hierarchy or relationships among the windows may require changes in many scripts associated with many windows, because each script for each window refers explicitly to the other locations of other windows in the hierarchy (e.g., locations in a frameset) when sending messages to those other windows.
Thus, there is a need for an approach that allows windows to be specified without specifying the hierarchy or relationship among the windows explicitly. The approach of the invention allows for relationships to other windows to be referred to implicitly. For example, if a source window is directing a message to a specific function in another window when using the approach of the invention, then the message in the source window need only refer to the name or identifier of the function (e.g., by a target identifier) and does not need to describe explicitly the relationship between the source window and the target window. In another example of the approach of the invention, the message need not refer to any target identifier, and the message is passed to message handlers associated with each window, without explicit references to the relationships between the source window and every other window.
Using the techniques of the invention, one or more messaging modules register target identifiers for windows, message handlers, and functions in a database. In one embodiment, there is a messaging module and database associated with each window. Thus each source window script can refer to a database to locate windows that the source window is related to. The source window script originates a message, which is sent to the windows that the source window has identified in the database. If the message refers to a function, then scripts for each of the other windows determines whether the target identifier for the function is one registered for that other window. If a match is found with the target identifier for the function in a window, then the message is passed to that function. Otherwise, the message may be passed to other windows indicated in the database. If the message (e.g., broadcast message to be sent to all windows) does not indicate any explicit function identifier, then the message is passed to the message handlers that are registered for each window.
In one embodiment, the invention is directed to a method for communicating messages between display constructs (e.g. windows or frames) presented on a display of a computer system. The method includes the steps of recording target identifiers associated with display constructs in a database, receiving a message comprising selection information (e.g., reference to a target identifier) suitable for use in selecting one of the display constructs to receive the message, and forwarding the message to one of the display constructs based on the selection information and the target identifiers in a database. Each target identifier identifies one or more aspects of a respective display construct. For example, the target identifier identifies the name of a window, the name of a function associated with a window, or some other aspect of a window (or frame). Thus, a target identifier, such as a function and/or window name, is recorded in a database, and the message selection information identifies the function name. A messaging module (or other script or program) compares the function name in the message to the function names in the database, finds the function name in the database, and passes the message to the identified function, which is typically in a script or other code associated with the target window. Thus the message is sent without explicitly identifying the relationship between a source (e.g., source script associated with the source window sending the message) and the target (e.g. function associated with the target window receiving the message).
In another embodiment, the method includes recording identities of software entities, each software entity providing processing instructions in relation to each respective display construct. For example, a software entity is a function or a message handler implemented in a script or code associated with the display construct. Thus, a message is sent, for example, to a function based on the recorded identity of the function.
The method includes, in another embodiment, receiving the message independently of an identification of a specific display construct suitable for receiving the message. Thus, the message does not have to specify the identity of a window in order for the window (or code associated with the window) to receive the message.
In a further embodiment, the method includes traversing the database to select a set of display constructs based on the selection information and forwarding the message to the set of display constructs. Another embodiment of the method includes using a filter to select one or more display constructs and forwarding the message to one or more display constructs. For example, a messaging module uses selection information and/or a filter to identify several targets (e.g., windows) to receive the message and forwards the message to those windows, without having to identify each target separately.
In a further embodiment, the method includes instantiating a message framework in the computer system, and instantiating a message object in the messaging framework, wherein the message object includes associated message functions and message data. Thus, the method uses an object oriented approach to generate a message object, and includes additional data (e.g., extended message data) in the message object.
In one embodiment, the invention is directed to an apparatus for communicating messages between display constructs (e.g., windows or frames) presented on a display of a computer system, including a database, and a messaging module. The messaging module is configured to record target identifiers associated with display constructs in a database, to receive a message including selection information suitable for use in selecting one of the display constructs to receive the message, and to forward the message to one of the display constructs based on the selection information and the target identifiers in the database. Each target identifier identifies one or more aspects of a respective display construct. For example, the target identifier identifies the name of a window, the name of a function associated with a window, or some other aspect of a window (or frame). Thus, a target identifier, such as a function and/or window name, is recorded in a database, and the message selection information identifies the function name. A messaging module (or other script or program) compares the function name in the message to the function names in the database, finds the function name in the database, and passes the message to the identified function, which is typically in a script or other code associated with the target window. Thus the message is sent without explicitly identifying the relationship between a source and the target.
In another embodiment, each target identifier includes the identity of a software entity that provides processing instructions in relation to each respective display construct. For example, a software entity is a function or a message handler implemented in a script or code associated with the display construct. Thus, a message is sent, for example, to a function based on the recorded identity of the function.
In a further embodiment, the messaging module is configured to receive the message independently of an identification of a specific display construct suitable for receiving the message. Thus, the message does not have to specify the identity of a window in order for the window (or code associated with the window) to receive the message.
The messaging module, in another embodiment, is configured to traverse the database to select a set of display constructs based on the selection information and forward the message to the set of display constructs. In a further embodiment, the messaging module uses a filter to select one or more of the display constructs and the messaging module forwards the message to the selected display constructs. For example, a messaging module uses selection information and/or the filter to identify several targets (e.g., window) to receive the message and forwards the message to those windows, without having to identify each target separately.
In another embodiment, the messaging module is a messaging framework instantiated in the computer system; the message is an instantiation of a message object in the messaging framework; and the message comprises associated message functions and message data. Thus, the messaging module uses an object oriented approach to generate a message object, and includes additional data (e.g., extended message data) in the message object.
In a further embodiment, the display constructs are windows displayed in one or more network browsers executing on the computer system, and each target identifier identifies one of the windows. For example, the display constructs are frames based on HTML (hypertext markup language) pages displayed in a web browser.
In one embodiment, the invention is directed to an apparatus for communicating messages between display constructs (e.g., windows or frames) presented on a display of a computer system, including a database, and a means for processing messages. The processing means is configured to record target identifiers associated with display constructs in a database, to receive a message comprising selection information suitable for use in selecting one of the display constructs to receive the message, and to forward the message to one of the display constructs based on the selection information and the target identifiers in the database. Each target identifier identifies one or more aspects of a respective display construct. For example, the target identifier identifies the name of a window, the name of a function associated with a window, or some other aspect of a window (or frame). Thus, a target identifier, such as a function and/or window name, is recorded in a database, and the message selection information identifies the function name. The processing means compares the function name in the message to the function names in the database, finds the function name in the database, and passes the message to the identified function, which is typically in a script or other code associated with the target window. Thus the message is sent without explicitly identifying the relationship between a source and the target.
In a further embodiment, the invention is directed to a computer program product that includes a computer readable medium having instructions stored thereon for communicating messages between display constructs (e.g., windows or frames) presented on a display of a computer system, such that the instructions, when carried out by a computer, cause the computer to perform any or all of the operations of the invention disclosed herein. For example, the instructions cause the computer to record target identifiers associated with display constructs in a database, receive a message comprising selection information suitable for use in selecting one of the display constructs to receive the message, and forward the message to one of the display constructs based on the selection information and the target identifiers in the database. Each target identifier identifies at least one aspect of a respective display construct;
In one embodiment, the invention is directed to a method for communicating messages between display constructs (e.g., windows or frames) presented on a display of a computer system. The method includes recording a target identifier that identifies a software entity associated with a first display construct, generating a message including the target identifier based on a request from a second display construct, and transferring the message from the second display construct to the software entity in the first display construct based on the target identifier. For example, the target identifier identifies a software entity that is the name of a function or message handler associated with a window (or frame). The target identifier is recorded in a database, memory or other storage device, and the target identifier provides a way to determine the target window (or software entity associated with the window) for the message.
In another embodiment, the method includes generating the message independently of an identification of the first display construct and identifying the first display construct based on the target identifier recorded in the database. Thus, the message is sent based on the target identifier without explicitly identifying the relationship between a source and the target.
In a further embodiment, the invention is directed to an apparatus for communicating messages between display constructs (e.g. windows or frames) presented on a display of a computer system, including a database, a first messaging module associated with a first display construct, and a second messaging module associated with a second display construct. The second messaging module is configured to record in the database a target identifier that identifies a software entity that provides processing instructions in relation to the first display construct, to generate a message comprising the target identifier based on a request from the second display construct, and to transfer the message to the first messaging module based on the target identifier recorded in the database. For example, the target identifier identifies a software entity that is the name of a function or message handler associated with a window (or frame). The target identifier is recorded in a database, memory or other storage device, and the target identifier provides a way to determine the target window (or software entity associated with the window) for the message.
In another embodiment, the second messaging module is configured to generate the message independently of an identification of the first display construct. Thus, the message is sent based on the target identifier without explicitly identifying the relationship between a source and the target.
In a further embodiment, the first messaging module and second messaging modules are JavaScript code associated with one or more HTML pages and the first display construct and second display construct are browser windows. For example, the display constructs are frames based on HTML and JavaScript displayed in one or more web browser windows.
In another embodiment, the software entity is either a function or a message handler.
In one embodiment, the invention is directed to an apparatus for communicating messages between display constructs (e.g., windows or frames) presented on a display of a computer system, including a database, a first means for processing messages associated with a first display construct, and a second means for processing messages associated with a second display construct. The second processing means is configured to record in the database a target identifier that identifies a software entity that provides processing instructions in relation to the first display construct, to generate a message comprising the target identifier based on a request from the second display construct, and to transfer the message to the first processing means based on the target identifier recorded in the database. For example, the target identifier identifies a software entity that is the name of a function or message handler associated with a window (or frame). The target identifier is recorded in a database, memory or other storage device, and the target identifier provides a way to determine the target window (or software entity associated with the window) for the message.
In a further embodiment, the invention is directed to a computer program product that includes a computer readable medium having instructions stored thereon for communicating messages between display constructs (e.g., windows or frames) presented on a display of a computer system, such that the instructions, when carried out by a computer, cause the computer to perform any or all of the operations of the invention disclosed herein. For example, the instructions cause the computer to record a target identifier that identifies a software entity associated with a first display construct, to generate a message including the target identifier based on a request from a second display construct, and to transfer the message from the second display construct to the software entity in the first display construct based on the target identifier.
In some embodiments, the techniques of the invention are implemented primarily by computer software. The computer program logic embodiments, which are essentially software, when executed on one or more hardware processors in one or more hardware computing systems cause the processors to perform the techniques outlined above. In other words, these embodiments of the invention are generally manufactured as a computer program stored on a disk, memory, card, or other such media that can be loaded directly into a computer, or downloaded over a network into a computer, to make the device perform according to the operations of the invention. In one embodiment, the techniques of the invention are implemented in hardware circuitry, such as an integrated circuit (IC) or application specific integrated circuit (ASIC).