Mapping and communicating data from a user interface to an application program

Provided are a method, program, and article of manufacture for mapping and communicating data from a user interface to an application program. Data is received from a user interface via a network protocol directed to an application program. State information is generated for a user of the user interface to use to invoke the application program. The received data is mapped to application variables. The application program uses the state information for the user and the application variables including the mapped data.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a method, system, and program for mapping and communicating data from a user interface to an application program.

2. Description of the Related Art

Many applications that operate in a network environment are constructed as two-tier client-server applications, characterized by a constant connection from the client to the application. The front end to such applications operating in the client-server environment may be written using a fourth generation programming language (“4GL”), which is commonly used for basic user interfaces for clients accessing business applications in a client-server environment. Such basic user interfaces written using the 4GL language contain variables that are understood directly by the application.

In the current art, many users are accustomed to using the ubiquitous web browser user interface that communicates with a web server using a stateless network protocol, such as the Hypertext Transport Protocol (HTTP). However, such web browser interfaces are not compatible with the framework of an application program operating according to the client-server paradigm.

Thus, there is a need in the art for improved techniques to provide a user interface to application programs.

SUMMARY

Provided are a method, program, and article of manufacture for mapping and communicating data from a user interface to an application program. Data is received from a user interface via a network protocol directed to an application program. State information is generated for a user of the user interface to use to invoke the application program. The received data is mapped to application variables. The application program uses the state information for the user and the application variables including the mapped data.

DETAILED DESCRIPTION

FIG. 1illustrates a network computing environment in which embodiments are implemented. Computers2include a web browser4implementing an application user interface6to provide data input to an application program8executing in an application runtime environment on an application system10. The web browsers4communicate data in data fields in the application user interface6to an application program8over a network14. The application server12includes a web server16enabling communication with the web browser4. In one embodiment, both the program8and application server12are implemented in an application system18. The application server12may communicate with the application program8by hosting the application program8, or a subset of the application program, within the application server itself12, and making direct calls to the methods and functions of the application program12or directly accessing the variables and data of the application program. In another embodiment, the application server12and application program8execute separately within the application system18and communicate via a suitable IPC mechanism known in the art.

In an alternative embodiment, the application server12and application program8may operate on separate boxes or systems and communicate over a network using a suitable remote inter-process communication protocol known in the art, such as network-based remote procedure calls (RPCs) or a client-server network communication technique. In certain embodiments, the application server12and application program8may run in separate runtime environments, where each runtime environment comprises a separate operating system process that does not share resources with other processes. In an alternative embodiment, the application server12and application program8may run in threads in the same process.

In one embodiment, the web browser4communicates with the application program8using a stateless network protocol, e.g., HTTP, where state information on a continued connection is not maintained. In such embodiments, the web browser4may comprise a Hypertext Markup Language (HTML) browser. Further, the application sever12may invoke the application program8in a stateful manner, where context and state information for a session is maintained in order to communicate with the application program8.

The network14may comprise a suitable network, such as a Local Area Network (LAN), Storage Area Network (SAN), Wide Area Network (WAN), wireless network, peer-to-peer network, the Internet, an Intranet, etc.

The application server12includes a data mapping component20. The data mapping component20includes session information22providing session information for web browsers4that have connected to the application program8through the application server12and mapping information24associating data fields from the application user interface6such as user enterable data fields, derived data fields whose values are calculated or otherwise derived from within the application program8, and any other fields supporting the application program8, with the application variables used by the application program8. The application user interface6enables the user of the web browsers4to input data into fields for transfer as variables to the application program8. The application program8uses these variables within executing operations. For instance, if the application program8comprises a database program, then the fields in the application user interface6may provide input into variables used by the application program8to perform certain transformations or conversions on database data. In such embodiments, the application program8provides functions, procedures, transforms, etc., that may be invoked to perform operations on database data. The application program8may then update the database with data resulting from the functions and procedures executed by the application program8that used the variables having data mapped from the application user interface6fields. The application server12may utilize or call into services, methods, functions, or other mechanisms from the application program8to perform this data transformation. Alternatively, the application program8may process database data with functions invoked from processes or threads that are separate from and independent of the application server12.

FIG. 2illustrates an embodiment of the user session information30for one user web browser4that is providing data to the application program8, including a session identifier32, state information34used to identify the user of the web browser4to the application program8, and context information36comprising recent settings for variables and other settings set during communications with the application program8. The context information36represents a current state of the connection with the application program8for a particular session. The context information36provides information to enable a stateful session between a user at a web browser4and the application program8. Further, the context information36allows new web browser4requests to access the application program8constructs in the same “context” as the previous web request from the same user in order to provide an appearance of a constant connection to the application program8.

FIG. 3illustrates an embodiment of data mapping information50for one data field in the user interface6, including a web data field52in the application user interface6in which the user may enter data to input to the application program8and a corresponding application variable54. The application server12may call into the methods, functions, or other services of the application program8to format or otherwise transform, or to validate data from the web data field52when including in the corresponding application variable54to send to the application program8. The application server12may also format or otherwise transform, or validate data from the web data field52using mechanisms outside the application program8.

In one embodiment, the data mapping component20may run in the same operating environment as the application program8. When a user provides data through the web browser4, the application server12may communicate the data to the data mapping component20to call services of the application program8to transform or validate the data and to map the data to application variables to provide to the application program8. In one embodiment, the application server12may communicate data from the web browser4received at the web server16to the data mapping component20by using an inter-process communication protocol, such as inter-process communication (IPC) pipes, Remote Procedure Calls (RPC), etc. Further, the application server12(or other component therein) may load the state34and context36information for the user or session providing the data via the web browser4for the data mapping component20to use when mapping the variables and calling functions and services of the application program8.

FIG. 4illustrates how data fields60a,60b. . .60nin a web page62, implementing the application user interface6and communicated by the web browser4to the web server16, map to variables64a,64b. . .64nin the application program execution or runtime environment66. The application program runtime environment66comprises the process in which the application program8functions68a,68bsubroutines and methods are executed. Functions68aand68bof the application program8, which may execute as threads within the application program runtime environment66, may utilize the variables64a,64b. . .64ncomprising data from the web page62. The data fields60a,60b. . .60nand corresponding variables64a,64b. . .64nare indicated in the web data field52(FIG. 3) and application variable field54in separate instances of the data mapping information50. The data mapping component20may also run in the application program runtime environment66. The data component20, of the application server12, running in the application program runtime environment66, may use native calls and facilities of the application program8to invoke the application program functions68a,68b.

Additionally, the functions68a,68busing the mapped variables64a,64b. . .64nmay be invoked by processes or threads other than those of the application server12.

For instance, the application program runtime environment66may comprise code from an application framework, such as the Basic computer language, International Business Machine's (“IBM”) SystemBuilder™ Paragraph language, etc. (IBM is a registered trademark and SystemBuilder is a trademark of IBM).

FIG. 5illustrates an embodiment of operations performed by the application server12to establish a session between a web browser4and the application program8. Upon receiving (at block100) a request from one browser4to establish a session with the application program8, the application server12communicates (at block102) with the application program8to authenticate the user of the web browser4and establish a session having a session ID. Session information30is generated (at block104) for the user identifying the session32, state information34having connection identification information, e.g., to identify and authenticate the user of the web browser4, and context information36on the current state of settings and variables for the session. In one embodiment, the application server12returns (at block106) the session ID32to the browser4to use in subsequent communications to the application server12to allow the application server12to identify the session information50for that request. In an alternative embodiment, the web browser4may provide other types of information, such as a user identifier or other session identifiers, to enable the application server12to determine the session to use for the requesting web browser4. After establishing a session, the application server12saves (at block108) the current context information36for settings and variables related to establishing the session, which indicate the current state of the connection between the web browser4and application program8.

With the operations ofFIG. 5, the application server12establishes a connection with the application program8. As discussed, the application server12may use inter-process communication techniques or other stateful communication protocols on behalf of the web browser4which communicates to the application server12using a different network protocol, such as a stateless protocol.

FIG. 6illustrates an embodiment of operations implemented by the data mapping component20or other components of the application server12to provide data entered by the user in the application user interface6in the web browser4to the application program8. Upon receiving (at block150) from one browser4data for the application program8via a stateless network protocol (e.g., HTTP), including a session ID, the application server12determines (at block152) the session state34and context information36for the session ID32provided with the request. The determined session state34and context information36is loaded (at block154) into the application program runtime environment66to use when mapping the data from the web page62to the application program8services. The data mapping component20may further process (at block156) the received data via calls to native methods, services, or facilities of the application program to format, transform or validate the received data. The data mapping component20determines (at block158) from the data mapping information50the application variable54corresponding to the data variable from the browser4. The received data field60a,60b. . .60nfrom the web page62is mapped (at block160) to the determined corresponding application variable62a,62b. . .62nfor use by application program functions68a,68bin the application program runtime environment66. The data mapping component20maps each data field60a,60b. . .60nfrom the web page62to the corresponding application variable62a,62b. . .62nusing the mapping information. One or more of the data fields may or may not be transformed, converted or validated by calls to the application program8services before being mapped to application variables64a,64b. . .64n.

The data mapping component20uses (at block162) the determined session state34and context information36to communicate the application variables64a,64b. . .64nto the application program8. After completing the operation, the data mapping component20saves (at block164) the current context information36for settings and variables so that the context information36represents the state of the application program8for that user after the transfer of the input data is complete. A subsequent request from another user may cause that user's context and state information to be loaded into the application program runtime environment66to provide a stateful environment for that user communicating or requesting data with respect to the application program8.

Further, the web browser4may request data. In response, the data mapping component20may translate the request to a request for the corresponding application variables, as indicated in the mapping information24, from the application program8. Upon receiving the requested data from the application program8in response to the request, the application server12may map the application variables to the corresponding web data fields in a web page or form to return to the web browser4using the stateless network protocol. Prior to mapping the application variables to the corresponding web data fields, the application server12may format or otherwise transform the data in the application variables by invoking native methods or services of the application program8. For instance, if the application program8is implemented using the IBM SystemBuilder paragraph language, then the data mapping component20, operating in the application program runtime environment66, and calling into the application program8, e.g., SystemBuilder environment may invoke native SystemBuilder Paragraphs, Expressions, etc. during the processing of the request from the web browser4

Described embodiments provide techniques to allow an application designed to receive input data and variables in a stateful environment, to interface with a user interface designed for another type of environment, such as the web browser. Described embodiments maintain for each web browser communicating with the application program a session identifier that is used to reference and reinstate all application program specific stored context information with each web request from the web browser. Further, with the described embodiments, data maintained in web form data fields is mapped to application variables that may be directly accessed and used by application program functions executing in the application program runtime environment. Further, with the described embodiments, data maintained in web form data fields may be formatted or otherwise transformed, or validated, via calls from application server components, such as the data mapping component, into native methods, services or other facilities of the application program.

Additional Embodiment Details

The described operations may be implemented as a method, apparatus or article of manufacture using standard programming and/or engineering techniques to produce software, firmware, hardware, or any combination thereof. The described operations may be implemented as code maintained in a “computer readable medium”, where a processor may read and execute the code from the computer readable medium. A computer readable medium may comprise media such as magnetic storage medium (e.g., hard disk drives, floppy disks, tape, etc.), optical storage (CD-ROMs, DVDs, optical disks, etc.), volatile and non-volatile memory devices (e.g., EEPROMs, ROMs, PROMs, RAMs, DRAMs, SRAMs, Flash Memory, firmware, programmable logic, etc.), etc. The code implementing the described operations may further be implemented in hardware logic (e.g., an integrated circuit chip, Programmable Gate Array (PGA), Application Specific Integrated Circuit (ASIC), etc.). Still further, the code implementing the described operations may be implemented in “transmission signals”, where transmission signals may propagate through space or through a transmission media, such as an optical fiber, copper wire, etc. The transmission signals in which the code or logic is encoded may further comprise a wireless signal, satellite transmission, radio waves, infrared signals, Bluetooth, etc. The transmission signals in which the code or logic is encoded is capable of being transmitted by a transmitting station and received by a receiving station, where the code or logic encoded in the transmission signal may be decoded and stored in hardware or a computer readable medium at the receiving and transmitting stations or devices. An “article of manufacture” comprises computer readable medium, hardware logic, and/or transmission signals in which code may be implemented. A device in which the code implementing the described embodiments of operations is encoded may comprise a computer readable medium or hardware logic. Of course, those skilled in the art will recognize that many modifications may be made to this configuration without departing from the scope of the present invention, and that the article of manufacture may comprise suitable information bearing medium known in the art.

FIG. 7illustrates an embodiment of a computer architecture300that may be implemented by the client computer2, the application system18or other systems including the application server12and application program8. The architecture300may include a processor302(e.g., a microprocessor), a memory304(e.g., a volatile memory device), and storage306(e.g., a non-volatile storage, such as magnetic disk drives, optical disk drives, a tape drive, etc.). The storage306may comprise an internal storage device or an attached or network accessible storage. Programs, including an operating system308and application programs, in the storage306are loaded into the memory304and executed by the processor302in a manner known in the art. The architecture further includes a network card310to enable communication with a network. An input device312is used to provide user input to the processor302, and may include a keyboard, mouse, pen-stylus, microphone, touch sensitive display screen, or any other activation or input mechanism known in the art. An output device314is capable of rendering information transmitted from the processor302, or other component, such as a display monitor, printer, storage, etc.