SYSTEM AND METHOD FOR BUILDING COMPONENT APPLICATIONS USING METADATA DEFINED MAPPING BETWEEN MESSAGE AND DATA DOMAINS
It is desirable to drive down the complexity involved in developing the wireless application by reducing the need to do any explicit coding, as well as reducing device resources utilized by the application when provisioned. Having an intelligent wireless device runtime environment (Device Runtime) that provides a set of basic services to manage the wireless application as a series if application components, and their interactions, can simplify the development effort and reduce resource allocation. The wireless application is described as a set of components. The data domain for this category of applications is defined using atomic data components. The communication between the device and a server is defined using atomic message components. Both message and data components are described in metadata using a structured definition language such as XML. The relationships between the message and data components are embedded in the XML definitions in the form of message/data mappings. Typically, outgoing messages are derived from some underlying data component and incoming messages affect the current state (or data representation) of the application. It is therefore apparent that the metadata defined mapping relationship is preferable between the expression of data and message components.
This application is a continuation of earlier non-provisional application having application Ser. No. 10/787,929 filed Feb. 27, 2004 now Pat. No. ______, granted on ______, and claims priority under 35 U.S.C. 120 thereto. The disclosure of aforementioned Application 10/787,929 is hereby incorporated be reference in its entirety.
BACKGROUND OF THE INVENTIONThis application relates generally to communication of services over a network to a device.
There is a continually increasing number of terminal devices in use today, such as mobile telephones, PDAs with wireless communication capabilities, personal computers, self service kiosks and two-way pagers. Software applications which run on these devices increase their utility. For example, a mobile phone may include an application which retrieves the weather for a range of cities, or a PDA may include an application that allows a user to shop for groceries. These software applications take advantage of the connectivity to a network in order to provide timely and useful services to users. However, due to the restricted resources of some devices, and the complexity of delivering large amounts of data to the devices, developing software applications for a variety of devices remains a difficult and time-consuming task.
Currently, devices are configured to communicate with Web Services through Internet based Browsers and/or native applications. Browsers have the advantage of being adaptable to operate on a cross-platform basis for a variety of different devices, but have a disadvantage of requesting pages (screen definitions in HTML) from the Web Service, which hinders the persistence of data contained in the screens. A further disadvantage of Browsers is that the screens arc rendered at runtime, which can be resource intensive. Native applications have the advantage of being developed specifically for the type of device platform, thereby providing a relatively optimized application program for each runtime environment. However, native applications have disadvantages of not being platform independent, thereby necessitating the development of multiple versions of the same application, as well as being relatively large in size, thereby taxing the memory resources of the device. Further, application developers need experience with programming languages such as Java and C++ to construct these hard coded native applications. There is a need for application programs that can be run on client devices having a wide variety of runtime environments, as well as having a reduced consumption of device resources.
The systems and methods disclosed herein provide a component based application environment to obviate or mitigate at least some of the above presented disadvantages.
SUMMARY OF THE INVENTIONIt is desirable to drive down the complexity involved in developing the wireless application by reducing the need to do any explicit coding, as well as reducing device resources utilized by the application when provisioned. Having an intelligent wireless device runtime environment (Device Runtime) that provides a set of basic services to manage the wireless application as a series if application components, and their interactions, can simplify the development effort and reduce resource allocation. The wireless application is described as a set of components. The data domain for this category of applications is defined using atomic data components. The communication between the device and a server is defined using atomic message components. Both message and data components are described in metadata using a structured definition language such as XML. The relationships between the message and data components are embedded in the XML definitions in the form of message/data mappings. Typically, outgoing messages are derived from some underlying data component and incoming messages affect the current state (or data representation) of the application. It is therefore apparent that the metadata defined mapping relationship is preferable between the expression of data and message components.
According to the present invention there is provided a method for generating a communication message instance based on a data instance for interaction with an application executed on a device, the application including a data component having at least one data field definition and a message component having at least one message field definition, the component definitions expressed in a structured definition language, the method comprising the steps of: selecting the message component corresponding to the message instance; identifying at least one unique mapping present in the message component, the mapping for specifying a relationship between the message component and the data component as defined by a unique identifier representing the mapping; selecting the data component mapped by the mapping according to the unique mapping identifier; obtaining a data instance field value corresponding to the data field definition of the mapped data component; generating a message field value of the message instance to include the data instance field value according to the format of the data field definition as defined in the mapped data component.
According to a further aspect of the present invention there is provided a method for generating a data instance based on a message instance corresponding to an application executed on a device, the application including a data component having at least one data field definition and a message component having at least one message field definition, the component definitions expressed in a structured definition language, the method comprising the steps of: selecting the message component corresponding to the message instance; identifying at least one unique mapping present in the message component, the mapping for specifying a relationship between the message component and the data component as defined by a unique identifier representing the mapping; selecting the data component mapped by the mapping according to the unique mapping identifier; obtaining a message instance field value from the message instance corresponding to the mapped data component; assigning the message instance field value to a data field value of the data instance according to the format of the data field definition as defined in the mapped data component.
According to a still further aspect of the present invention there is provided a method for generating a communication message instance based on a data instance for interaction with an application executed on a device, the application including a data component and a message component having at least one message field definition and at least one data field definition, the component definitions expressed in a structured definition language, the method comprising the steps of: selecting the data component corresponding to the data instance; identifying a unique mapping present in the data component, the mapping for specifying a relationship between the message component and the data component as defined by a unique identifier representing the mapping; selecting the message component mapped by the mapping according to the unique mapping identifier; obtaining a data instance field value corresponding to the message field definition of the mapped message component; generating a message field value of the message instance to include the data instance field value according to the format of the data field definition as defined in the mapped message component.
According to a further aspect of the present invention there is provided a method for generating a data instance based on a message instance corresponding to an application executed on a device, the application including a data component and a message component having at least one message field definition and at least one data field definition, the component definitions expressed in a structured definition language, the method comprising the steps of: selecting the message component corresponding to the message instance; identifying a unique mapping present in the data component, the mapping for specifying a relationship between the message component and the data component as defined by a unique identifier representing the mapping; selecting the message component mapped by the mapping according to the unique mapping identifier; obtaining a message instance field value from the message instance corresponding to the data field definition of the mapped message component; assigning the message instance field value to a data field value of the data instance according to the format of the data field definition as defined in the mapped message component.
According to a further aspect of the present invention there is provided a device for generating a communication message instance based on a data instance for interaction with an application executed on the device, the application including a data component having at least one data field definition and a message component having at least one message field definition, the component definitions expressed in a structured definition language, the method comprising the steps of: means for selecting the message component corresponding to the message instance; means for identifying at least one unique mapping present in the message component, the mapping for specifying a relationship between the message component and the data component as defined by a unique identifier representing the mapping; means for selecting the data component mapped by the mapping according to the unique mapping identifier; means for obtaining a data instance field value corresponding to the data field definition of the mapped data component; means for generating a message field value of the message instance to include the data instance field value according to the format of the data field definition as defined in the mapped data component.
These and other features will become more apparent in the following detailed description in which reference is made to the appended drawings by way of example only, wherein:
Referring to
Referring again to
For satisfying the appropriate requests/response messages 105, the web service 106 can communicate with an application server 110 through various protocols (such as but not limited to HTTP and component API) for exposing relevant business logic (methods) to client application programs 302 (see
Referring to
Referring to
Referring again to
The terminal runtime environment of the devices 100 preferably supports the following basic functions for the resident executable versions of the client application programs 302 (see
-
- provide a communications capability to send messages 105 to the Web Services 106 or messages 105 to any other generic schema defined services connected via the network 104 to the devices 100;
- provide data input capabilities by the user on an input device of the devices 100 to supply data parts for Web Services' 106 outgoing messages 105 (messages to the service);
- provide data presentation or output capabilities for Web Services' 106 response messages 105 (incoming messages) or uncorrelated notifications on the output device;
- provide data storage services to maintain local client data in the memory module 210 (see
FIG. 2 ) of the device 100; and - provide an execution environment for a scripting language for coordinating operation of the application components 400, 402, 404, 406 (see
FIG. 4 ) of the client application programs 302.
Referring to
Therefore, the native client runtime environment provides an interface for the client application programs 302 to the device 100 functionality of the processor 208 and associated operating system of the device infrastructure 204. The runtime environment preferably supplies a controlled, secure and stable environment on the device 100, in which the component application programs 302 execute. The runtime environment provisions the definitions of the components 400. 402, 404, 406 to create the actual web client specific for each respective device infrastructure 204 of the device 100. It is recognized for the sake of simplicity that the following description hereafter will refer to the client runtime environment being provided by the component framework 206, as an example only.
Communication DeviceReferring to again to
Referring again to
Referring again to
Referring again to
Referring to
Referring again to
The framework services 304 can include such as but not limited to a communication service 306, a presentation/screen service 308, a persistence service 310, an access service 312, a provisioning service 314 and a utility service 316. The communication service 306 manages connectivity between the component application programs 302 and the external system 10, such as the messages 105 and associated data sent/received in respect to the web service (by the communication service 306) on behalf of the component applications 302. As further described below with reference to
It is recognized that the framework services 304 of the communication device 100 can provide functionality to the component application programs 302, which can include the services described above. Further, the framework services 304 can be integrated with the components 400, 402, 404, 406 of the application 302 rather than provided as a separate framework 304. In any event, the component application programs 302 can have access to the functionality of the communication device 100 through integrated and/or separate framework services 304.
Example Component Application ProgramReferring to
Referring to
Referring again to
Referring again to
Referring again to
Referring again to
ECMA (European Computer Manufacturers Association) Script is a standard script language, wherein scripts can be referred to as a sequence of instructions that is interpreted or carried out by another program rather than by the computer processor. Some other examples of script languages are Perl, Rexx, VBScript, JavaScript, and Tcl/Tk. The scripting languages, in general, are instructional languages that are used to manipulate, customize, and automate the facilities of an existing system, such as the devices 100. In such systems, useful functionality is already available through the user interface 202 (see
Accordingly, referring to
Expressing the data 400, message 404, and presentation 402 components using XML or its derivatives, and the workflow component 406 using the ECMAScript language or its subset, can allow an application developer to abstract the Web Service client from any specific platform or environment and implement in principle “develop once run everywhere” applications. The following example shows how a Web Services client application program 302 could be expressed using a structured definition language, such as but not limited to XML, and a platform neutral scripting/programming language, such as but not limited to ECMAScript, defined components:
Example XML Data Components 400
Referring to
Further, the component application architecture can provide a relatively small application download size (consisting of component definitions only) as compared to hard coded native applications, and an effective data storage and persistence model. The client runtime is capable of storing and updating atomic data entities directly vs. manipulating rendered presentations such as HTML pages for browser applications.
Example Operation of Component Application ModelReferring to
Referring to
As described above with reference to
-
- each component 400, 404 is identified by a unique name; and
- each component 400, 404 specifies one or more subfields consisting of name and declared type.
In practice, typically the expression of the components 400, 404 by the developer can be almost identical, while the behaviour of each of the components 400, 404 of the application 302 is distinct. Therefore, by recognizing the fact that message 105 (see
Referring again to
Two types of mappings 800 are described: field level mappings 901, and message level mappings 801. The following elaborates on how message 404 to data 400 component mappings 800 may be expressed, and specify a runtime resolution contract that exists to determine uniquely where message content is to be applied.
Message Level Mappings 801Referring again to
The Field level Mapping 901 (see
Referring to
Referring to
In view of the examples shown in
Referring to
Referring to
In the case of field mapping 901 the data component definition Dsp and subordinate data field declarations Ds.fn are extracted by interrogating the message field level mapping 901 by the communications service 306. The appropriate field value 808 (d.fn) from input data instance di is added into the output message instance M. In step 1104 in the NO case, at step 1116 the communication service 306 determines whether there are field mappings 901 present, if no then the current contents of the message instance M are generated at step 1114, as noted above. Otherwise, the message field 904 descriptions are analysed 1118 and where field mappings 901 are in place 1120, the mapped data component type is obtained 1124, the mapped field type declaration is obtained 1126 from the data component Ds, and the data value of the data instance corresponding to the declaration is obtained 1128 from the persistence service 310. The values are then written in the corresponding message field 904 using the format of the data component Ds. If there are no further mappings 901, then the message instance M is generated at step 1114. Finally, in the case of an extended definition, the field format is taken directly 1122 from Ms, and it is expected that the field value is available through input message instance M. It is recognised that a combination of the message and field mappings 801, 901 as described above could be provided, in particular where more than one type of mapping is provided in the message instance M (i.e. multiple mappings 801, 901 for multiple components Ds linked to the message component Ms).
Message Processing 1200Upon arrival of the message instance M (see
-
- cause field d.fn updates in the mapped data component instance(s) d; and
- cause creation of a new data component instance(s) d with fields d.fn as determined by further mapping relationships 800.
The data instance(s) d to which message field values M.fn apply is determined by virtue of the message to data mapping resolution contract. Data instances d arc resolved by taking the message field values M.fn that are mapped to data primary key fields 802 (see
At step 1202 the metadata definition for the message instance m is obtained from the message component Ms, where the message instance m is related to the message component 404 at step 1204. In the case of a direct message mapping 801 at step 1206, the data component specification Ds is obtained 1208 from the mapping information. The primary key field of Ds is determined 1210 and the value to be applied to this field (m.fpk) is obtained 1212 from the corresponding field of m. At step 1214 an existing version of the instance d is searched in the memory 210 (see
At step 1228 in the case of field mappings 901, primary keys for each of the field mappings 901 are determined. The data component specification Ds is obtained 1230 from the mapping information 901. The resolution process relies on determining all field level mappings 901 from Ms that are mapped to data component primary fields: Ms.fpki. The component data type of the field mapping 901 can be determined from Ms.fpki as Dsi. Using 1232 the key value 802 from the input message m for this field (m.fpki), the data instance of Dsi may be either found 1236 or created 1234, thus producing the data instance di corresponding to Dsi. The data instances di are resolved and updated one at a time by selecting 1238 each field di.fn in sequence. The mapped message field Ms.fp is obtained 1240 and the corresponding mapped field definition Dsi.fn is obtained 1242. Remaining fields of Ms that are mapped 901 to fields of Dsi have their values taken from the message instance field m.fp and applied 1244 to di.fn using the corresponding field format of Dsi; Dsi.fn. This process continues until all mapped data instances are updated, thus generating d at step 1226.
As stated previously, referring to
Although the disclosure herein has been drawn to one or more exemplary systems and methods, many variations will be apparent to those knowledgeable in the field, and such variations are within the scope of the application. For example, although XML and a subset of ECMAScript are used in the examples provided, other languages and language variants may be used to define the component applications 302. Further, it is recognised as an alternative to the above described mapping 800 and operation 1100, 1200, the definition of the data fields 808 (see
Claims
1. A method for configuring a communication device to communicate a message instance in accordance with a component application executing in a runtime environment on a device, the component application including at least one data component having at least one data field definition and at least one message component having at least one message field definition, the component definitions expressed in a structured definition language, and the message instance generated from a corresponding message component, the method comprising the steps of:
- defining at least one data component each having at least one data field definition;
- defining the corresponding message component including defining a unique mapping to a particular one or more of the at least one data field definitions, said unique mapping linking the definition of a particular message instance to the definition of a particular one or more data field instances and said unique mapping defined by a unique identifier representing the mapping in accordance with a mapping resolution contract resolved at runtime by the runtime environment operating on the message and data component definitions;
- wherein, at runtime, said device obtains at least one data instance field value corresponding to the at least one data field of the mapped particular data component to populate the at least one message field of the message instance and communicates the message instance.
2. The method according to claim 1, wherein a plurality of the data field definitions of the data component is shared between the at least one message component and the at least one data component as represented by the mapping.
3. The method according to claim 1 further comprising defining additional processing code coupled to the at least one message component for assisting in processing of the message instance at runtime.
4. The method according to claim 3, wherein the processing code specifies an address of a provisioning unit for handling the processing code.
5. The method according to claim 1 comprising defining said mapping as a field level mapping linking a first one of the message field definitions to a first one of the data field definitions and a second one of the message field definitions to a second one of the data field definitions.
6. The method according to claim 5, wherein the number of message field definitions of the message component is less that the number of data field definitions of the mapped data component.
7. The method according to claim 5, wherein the first message field definition is mapped by a first one of the unique identifiers to a first one of the data components and the second message field definition is mapped by a second one of the unique identifiers to a second one of the data components different from the first data component.
8. The method according to claim 5, wherein the first message field definition and the second message field definition are mapped to the same data component using the unique identifier.
9. The method according to claim 1, wherein the structured definition language is XML based.
10. The method according to claim 9, wherein the application is a wireless application and the device is a wireless device.
11. The method according to claim 1, wherein the unique identifier is a simple primary key.
12. The method according to claim 1, wherein the unique identifier is a composite key defined from more than one field.
13. The method according to claim 1, wherein the message component defines a parent one of the message components coupled to a dependent one of the message components.
14. The method according to claim 13 wherein at runtime, said runtime environment overrides one of the mappings of the parent message component by respective one of the mappings of the dependent message component.
15. A method for configuring a communication device to populate a data instance in accordance with a component application executing in a runtime environment on a device, the component application including at least one data component having at least one data field definition and at least one message component having at least one message field definition, the component definitions expressed in a structured definition language, and the data instance generated from a corresponding data component, the method comprising the steps of:
- defining at least one message component each having at least one message field definition;
- defining the corresponding data component including defining a unique mapping to a particular one or more of the at least one message field definitions, said unique mapping linking the definition of a particular data instance to the definition of a particular one or more message field instances and said unique mapping defined by a unique identifier representing the mapping in accordance with a mapping resolution contract resolved at runtime by the runtime environment operating on the message and data component definitions:
- wherein, at runtime, said device receives a message instance and identifies a corresponding message component thereby to obtain at least one message instance field value corresponding to the at least one data field of the mapped particular data component to populate the at least one data field of the data instance.
16. The method according to claim 15, wherein a plurality of the message field definitions of the message component is shared between the at least one data component and the at least one message component as represented by the mapping.
17. The method according to claim 15 further comprising the defining additional processing code coupled to the at least one data component for assisting in processing of the data instance.
18. The method according to claim 17, wherein the processing code specifies an address of a provisioning unit for handling the processing code.
19. The method according to claim 15, comprising defining said mapping as a field level mapping linking a first one of the data field definitions to a first one of the message field definitions and a second one of the data field definitions to a second one of the message field definitions.
20. The method according to claim 19, wherein the number of data field definitions of the data component is less that the number of message field definitions of the mapped message component.
21. The method according to claim 15, wherein the first data field definition is mapped by a first one of the unique identifiers to a first one of the message components and the second data field definition is mapped by a second one of the unique identifiers to a second one of the message components different from the first message component.
22. The method according to claim 15, wherein the first data field definition and the second data field definition are mapped to the same message component using the unique identifier.
23. The method according to claim 15, wherein the structured definition language is XML based.
24. The method according to claim 23, wherein the application is a wireless application and the device is a wireless device.
25. The method according to claim 15, wherein the unique identifier is a simple primary key.
26. The method according to claim 15, wherein the unique identifier is a composite key defined from more than one field.
27. The method according to claim 15, wherein the data component defines a parent one of the data components coupled to a dependent one of the data components.
28. The method according to claim 27 further comprising the step of overriding one of the mappings of the parent data component by respective one of the mappings of the dependent data component.
29. A system for configuring a communication device to communicate a message instance in accordance with a component application executing in a runtime environment on a device, the component application including at least one data component having at least one data field definition and at least one message component having at least one message field definition, the component definitions expressed in a structured definition language, and the message instance generated from a corresponding message component, the system comprising:
- a processor and memory coupled thereto, said memory storing instructions and data for configuring said to system to: define at least one data component each having at least one data field definition; define the corresponding message component including defining a unique mapping to a particular one or more of the at least one data field definitions, said unique mapping linking the definition of a particular message instance to the definition of a particular one or more data field instances and said unique mapping defined by a unique identifier representing the mapping in accordance with a mapping resolution contract resolved at runtime by the runtime environment operating on the message and data component definitions; wherein, at runtime, said device obtains at least one data instance field value corresponding to the at least one data field of the mapped particular data component to populate the at least one message field of the message instance and communicates the message instance.
30. A system for configuring a communication device to populate a data instance in accordance with a component application executing in a runtime environment on a device, the component application including at least one data component having at least one data field definition and at least one message component having at least one message field definition, the component definitions expressed in a structured definition language, and the data instance generated from a corresponding data component, the system comprising:
- a processor and memory coupled thereto, said memory storing instructions and data for configuring said to system to: define at least one message component each having at least one message field definition; define the corresponding data component including defining a unique mapping to a particular one or more of the at least one message field definitions, said unique mapping linking the definition of a particular data instance to the definition of a particular one or more message field instances and said unique mapping defined by a unique identifier representing the mapping in accordance with a mapping resolution contract resolved at runtime by the runtime environment operating on the message and data component definitions; wherein, at runtime, said device receives a message instance and identifies a corresponding message component thereby to obtain at least one message instance field value corresponding to the at least one data field of the mapped particular data component to populate the at least one data field of the data instance.
Type: Application
Filed: Feb 11, 2010
Publication Date: Jun 10, 2010
Inventors: Bryan R. Goring (Milton), Michael Shenfield (Richmond Hill), Kamen B. Vitanov (Toronto), Viera Bibr (Kilbride)
Application Number: 12/703,969
International Classification: H04L 12/28 (20060101);