In the figures which illustrate example embodiments:
The embodiment described herein incorporates software and performs methods which facilitate execution of an application (referred to as a “mobile application”) at wireless communication devices in multiple languages (e.g. English, French, etc.). The embodiment may be used in conjunction with a system for presenting data from a server-based application at a wireless communication device, as described in U.S. Patent Publication No. 2003/0060896, which is incorporated by reference hereinto.
In one aspect of the below-described embodiment, there is provided a method comprising, at a wireless communication device, receiving a markup language document defining a format of a user interface, the markup language document including a descriptor for locating a textual component of the user interface within a separate file; at the wireless communication device, receiving the separate file containing the textual component; and based on the descriptor and the separate file, presenting the textual component within the user interface at the wireless communication device.
In another aspect of the below-described embodiment, there is provided a machine-readable medium comprising machine-executable code for presenting a textual component within a user interface of a wireless communication device, the presenting being based on a markup language document defining a format of the user interface and a separate file containing a textual component of the user interface, the markup language document including a descriptor for locating the textual component within the separate file.
In yet another aspect of the below-described embodiment, there is provided a wireless communication device comprising at least one processor; and a memory coupled to the at least one processor storing: a markup language document defining a format of a user interface, the markup language document including a descriptor for locating a textual component of the user interface within a separate file; the separate file containing the textual component; and machine-executable code which, when executed by the at least one processor, presents the textual component within the user interface based on the descriptor and the separate file.
The system 10 of
Application server 12 is a server which hosts at least one conventional software application 24 to which wireless communication device access is desired. The application 24 receives and generates data. The role of system 10 is to present data generated by the application 24 at wireless communication devices 18 and/or 20 and to send data generated at wireless communication devices 18 and/or 20 (responsive to user interaction with the devices) back to the application 24. The application server 12 sends and receives this data to and from transaction server 14 over a data network 26, which may be the Internet or a private data network for example, e.g. using HTTP running on top of a standard TCP/IP stack.
Transaction server 14 corresponds to middleware server 44 of U.S. Pat. Publication No. 2003/0060896, except that it has been enhanced to facilitate multi-language support for mobile applications, as will be described. The role of transaction server 14 is essentially twofold. First, it stores application-specific markup language documents (referred to as application definition files in the above-noted U.S. patent publication and hereinafter), for access by wireless communication devices 18, 20 desirous of presenting data from an application 24 executing at application server 12. The application definition files dictate the behavior and user interface (UI) of the wireless communication devices, as described in the above-noted publication. The transaction server further stores, for each application definition file, a multi-language definition file also a markup language document for purposes of facilitating presentation of mobile applications in multiple languages at mobile devices 18 and 20. Second, once presentation of data from application 24 at a wireless communication device 18 or 20 has begun, the transaction server acts as an intermediary for communications between the application server 12 and the wireless communication device 18 or 20. It is the former role which is of primary interest in this description.
Network gateway 16 is a gateway between data network 28, which may be the Internet or a private data network for example, and a wireless network 30. In combination, data network 28, network gateway 16, and wireless network 30 facilitate communication of application data between the transaction server 14 and wireless communication devices 18 and 20.
Wireless communication devices 18 and 20 are wireless communication devices, such as two-way paging devices, WinCE based devices, PalmOS devices, WAP enabled mobile telephones, or the like, which are capable of presenting data from remote applications, as described in detail in the above-referenced U.S. Patent Publication. Specifically, memory at devices 18 and 20 stores virtual machine software which interprets a textual application definition file downloaded from transaction server 14, defining: a user interface and display format (including display flow) for an application; the format of data to be exchanged over the wireless network 30 for that application; and the format of data to be stored locally at the wireless communication devices 18 and 20. These aspects may be encoded in form of XML elements and attributes within the application definition file. Based on these XML element and attributes, the virtual machine software instantiates corresponding objects dynamically at run time to present application data and to accept user input for transmission back to the executing application 24 at application server 12. The UI screens and controls presented at the wireless communication device 18 or 20 may emulate the UI screens and controls that a user would see when executing the full application 24 at a desktop computer or workstation. In the present embodiment, the displayable textual components of the UI screens (e.g. titles, control labels, captions, etc.) are not contained within the application definition file, but rather are contained in a separate, language-specific language definition file which is created at transaction server 14 from a language-specific portion of the multi-language definition file and downloaded on demand to the device 18 or 20, as will be described.
Also illustrated in
Network interface 66 enables transaction server 14 to transmit and receive data over data networks 26, 28 and 34.
Memory 64 at transaction server 14 stores transaction server software 68. Transaction software 68 has various functions. First, it enables the transaction server 14 to compose and exchange XML data packages with wireless communication devices 18 and 20 or application server 12. Second, transaction software 68 generates, from multi-language definition files 70, language-specific language definition files (not expressly illustrated in
Memory at device 18 further stores virtual machine software 44 which, when executed by mobile device 18, enables device 18 to present an interface for server-side applications provided by transaction server 14, as described below. Specifically, virtual machine software 44 interprets a text application definition file 58 and corresponding language definition file 60 defining a definition of a graphical user interface 38 controlling application functionality, and the display format (including display flow) at device 18 for a particular server-side application; the format of data to be exchanged over the wireless network for the application; and the format of data to be stored locally at device 18 for the application. Virtual machine software 44 uses operating system 40 and associated APIs to interact with device 18, in accordance with the received application definition file 58. In this way, device 18 may present interfaces for a variety of applications, stored at the application server 12 (
As such, and as will become apparent, the exemplary virtual machine software 44 is specifically adapted to work with the particular mobile device 18. Thus if device 18 is a PalmOS or WinCE device, virtual machine software 44 would be a PalmOS or a WinCE virtual machine, respectively. Virtual machine software 44 is capable of accessing local storage 46 at device 18, as will be described.
As detailed below, an exemplary application definition file 58 may be formed using a mark-up language, such as the well-known Extensible Markup Language (XML). Defined XML entities are understood by the virtual machine software 44. Exemplary defined XML entities are detailed in Appendix “A” of U.S. Patent Publication No. 2003/0060896, which Appendix is an ARML specification. (ARML is a form of XML markup language used in the present embodiment.) A person of ordinary skill will readily appreciate that those XML entities identified in Appendix “A” are exemplary only, and may be extended, shortened, or modified as desired. The defined XML entities are interpreted by the virtual machine software 44, and may be used as building blocks to present server-side applications at mobile device 18, as detailed herein.
Specifically, as illustrated in
XML parser 61 may be formed in accordance with the Document Object Model, or DOM, which is available at www.w3.org/DOM/ and is incorporated by reference hereinto. Parser 61 enables virtual machine software 44 to read an application definition file 58. Using the parser, the virtual machine software 44 may form a binary representation of the application definition file 58 for storage at the mobile device, thereby eliminating the need to parse text each time an application is used. Parser 61 may convert each XML tag contained in the application definition file 58, and its associated data, to tokens, for later processing. As will become apparent, this may avoid the need to repeatedly parse the text of an application definition file 58.
Screen generation engine 67 displays initial and subsequent screens at the mobile device, in accordance with an application definition file 58, as detailed below.
Event handler 65 of virtual machine software 44 allows device 18 under control of virtual machine software 44 to react to certain external events. Example events include user interaction with presented screens or graphical user interface constructs, incoming messages received from wireless network 30, or the like.
Object classes 69 also form part of virtual machine 44 for use in defining objects that allow wireless communication device 18 to represent each of the supported XML entities at the device. Each of object classes 69 includes attributes (e.g. fields or data members) used to store parameters defined by the XML file (XML element and/or attribute values), and allowing the XML entity to be processed at the mobile device, as detailed in Appendix “A” referenced above, for each supported XML entity. Virtual machine software 44 may be expanded to support XML entities not detailed in Appendix “A” by adding corresponding object classes to virtual machine software 44.
As detailed below, upon invocation of a particular mobile application (as defined by application definition file 58 and corresponding language definition file 60) at wireless communication device 18, the virtual machine software 44 presents an initial screen based on the contents of the application definition file 58 for the application. Screen elements are created by screen generation engine 67 by creating instances of object classes 69 corresponding to defined elements. The object instances are “customized” to the application using element and attribute values contained in the application definition file 58. Thereafter the event handler 65 of the virtual machine software 44 reacts to events for the application. The manner in which the event handler reacts to events is governed by the contents of the application definition file 58. Events may trigger processing defined within instances of associated “action” objects, which objects are instantiated from object classes 69 of virtual machine software 44, as detailed below.
Similarly, object classes 69 of virtual machine software 44 further include object classes corresponding to data tables and network transactions defined in the Table Definition and Package Definition sections of Appendix “A” referenced above. At run time, instances of object classes corresponding to these classes are created and populated with parameters contained within application definition file 58, as required.
Objects 169 are instantiations of object classes 69 (
General purpose routines 59, on the other hand, constitute a managing environment for the objects 169. The routines 59 encompass functionality which is useful for executing a mobile application at the wireless communication device but is not necessarily tied to a particular type of object 169. For example, the routines 59 may include the XML parser 61, which initially parses the application definition file 58. Other routines and 195 may facilitate loading or closing of GUI screens respectively. Notably, a getText( ) routine 197 is invoked by objects 169 desirous of obtaining a textual GUI component from the language definition DOM tree 200 (described below). The routines 59 effectively consolidate certain functionality for convenient invocation from any of objects 169, as required.
Language definition DOM tree 200 is a dynamically accessible representation of the language definition file 60 that is stored in secondary storage 46 of wireless communication device 18 (
Using the above general description and the description which follows, persons of ordinary skill in the art will be able to form virtual machine software 44 for any particular wireless communication device. Typically, virtual machine software 44 may be formed using conventional object oriented programming techniques, and existing device libraries and APIs, as to function as detailed herein. As will be appreciated, the particular format of screen generation engine 67 and object classes 69 will vary depending on the type of virtual machine software, its operating system and API available at the device. Once formed, a machine-executable version of virtual machine software 44 may be loaded and stored at a mobile device, using conventional techniques. It can be embedded in ROM, loaded into RAM over a network, or from a machine readable medium.
Although, in the described embodiment the virtual machine software 44 and software forming object classes 69 are formed using object-oriented structures, persons of ordinary skill will readily appreciate that other approaches could be used to form suitable virtual machine software. For example, object classes 69 forming part of the virtual machine could be replaced by equivalent functions, data structures or subroutines formed using a conventional (i.e. non-object oriented) programming environment. Operation of virtual machine software 44 under control of an application definition file 58 and language definition file 60 containing various XML definitions is further detailed below.
The application development software 78 provides a graphical user interface which facilitates “drag and drop” development of mobile applications. As a user develops a mobile application, the tool 22 automatically generates a dynamically-accessible representation of the corresponding hierarchy of XML elements (e.g. in accordance with Appendix “A”, referenced above) within memory 82, in the form of an application definition DOM tree 90 data structure. The displayable textual components of the mobile application, on the other hand, are stored within a separate, multi-language definition DOM tree 92 data structure. Within the application definition DOM tree 90, each XML element or attribute which includes a displayable textual component of the mobile application, such as a button label or screen title caption, stores a descriptor which defines a reference to the text which is actually stored within DOM tree 92. The references, which may be thought of as pointers, are illustrated schematically in
The application definition file 58 and multi-language definition file 70 are serialized representations of the application definition DOM tree 90 and multi-language definition DOM tree 92, respectively. These serialized representations are created by the RAD tool 22 when development of the mobile application is complete. They are stored in secondary storage 83 prior to their transmission to the transaction server 14, for use by the wireless communication device on demand, as will now be described.
In operation, a developer uses the RAD tool 22 (
As the mobile application is developed, the application definition DOM tree 90, which is representative of the mobile application under development, dynamically grows within memory 82 of RAD tool 22. The XML elements and attributes that are automatically created within the DOM tree 90 capture the desired mobile application behavior and appearance as specified by the developer. To specify displayable textual components, such as screen text and button labels, the developer may simply type the textual components within the WYSIWYG representation of the mobile device user interface screen. For example, to specify a button label, the developer may simply type the label text (e.g. “OK” or “Cancel”) within a visual representation of the button which he has created using a drag-and-drop GUI mechanism. As textual components of the user interface are defined, they are stored within XML elements within multi-language definition DOM tree 92. The application definition DOM tree 90 and multi-language definition DOM tree 92 thus dynamically grow in memory 82. The hierarchy that is defined within multi-language definition DOM tree 92 is based, at least in part, upon the hierarchy of graphical user interface constructs defined using the RAD tool 22. For example, if the developer designs a GUI screen which contains a single button, the text for the button label may be defined within language definition DOM tree 92 in an XML element which represents the button, which may in turn be a child of another XML element representing the screen which contains the button. The hierarchy defined within multi-language definition DOM tree 92 may be similar to, but is not necessarily exactly the same as, the hierarchy of XML elements that is defined within application definition DOM tree 90. For example, aspects of the mobile application which lack a textual component may be present in application definition DOM tree 90 but may be omitted from multi-language definition DOM tree 92.
When a textual component is stored in the multi-language definition DOM tree 92 in an XML element, a reference or “pointer” to that element is stored within the XML element or attribute which represents the “containing” user interface construct in application definition DOM tree 90. For example, when a new XML element representative of button label text is created in the multi-language definition DOM tree 92, a reference to that XML element is stored in an XML element that is simultaneously created in the application definition DOM tree 90 to represent the button itself. A specific example follows.
The nodes 602, 604, 606, 608, 610, 612, 614, 616 and 618 illustrated within the application definition DOM tree 90 of
Attributes which are illustrated in bold text in
For example, referring to
When the developer who has defined a mobile application using a first language (e.g. English) wishes for the mobile application to be available in another language (e.g. French), it is not necessary to redefine the entire mobile application anew merely so that the textual components may alternatively be specified in the desired language. Rather, the developer may simply select a “specify new language” menu option (or similar GUI construct) of RAD tool 22. This triggers the display of a “Specify New Language” dialog box 800. This is illustrated in
The “Specify New Language” dialog box 800 has a language name specification edit box 802 and default language specification radio buttons 804. The language name specification edit box 802 is for typing in the name of the new language to be supported. In
As shown in
The first column A identifies the textual components whose textual content is being specified by way of table 852. In the present embodiment, the identification of each textual component is by way of an XPATH expression. As indicated by the XPATH expressions of
The second column B of table 852 (
The third column C of table 852 is for entry of translation text in the desired new language (French). For clarity, the present embodiment does not provide an automatic translation capability. Rather, it is the responsibility of the developer to read the text in column B and to enter a translation of that text in column C in the new language. Automatic translation could be a feature in alternative embodiments however. In
When the developer provides French translations in column C for each of the textual components identified in table 852 and then selects the “OK” button 876, the application definition software 78 expands the multi-language definition DOM tree 92 to include all of the newly-defined French language textual components, in a similar hierarchy as was defined for the original English language textual components. In particular, the sub-tree 94, which can be seen in
The above-described procedure may be repeated to specify the textual components of the mobile application in one or more further languages, as desired.
When the developer has finished specifying the textual components in each desired language, and assuming that the mobile application is otherwise complete, the developer may select a “Save” button, or similar GUI construct, of the RAD tool 22. When this is done, the application definition DOM tree 90 of
At this stage, the application definition file 58 and multi-language definition file 70 are uploaded to transaction server 14 via network 34 (
Following invocation S1102 of the virtual machine software 44 at mobile device 18, a user of the device 18 chooses to register for an available mobile application. This choice may follow an interrogation (not illustrated) of the transaction server 14 for a list of mobile applications that is available to wireless communication device 18, as described in U.S. Patent Publication No. 2003/0060896, referenced above.
When the user chooses to register for mobile application, virtual machine software 44 at device 18 composes and sends an XML registration request for the chosen application to transaction server 14 (data flow S1104). The request may take the form of an XML message containing a <REG> tag that is sent to transaction server 14 via wireless network 30, network gateway 16 and network 28 (
In response, the transaction server 14 may query its database to determine whether an application definition file whose user-interface position is compatible with mobile device 18 exists for the desired application. In the present example, it is assumed that the secondary storage 27 of transaction server 14 (
Upon receipt of the application definition file 58, the virtual machine software at 44 at wireless communication device 18 checks a language configuration setting which indicates the user's choice of language in which textual components of mobile applications should be displayed (S1108). The configuration setting may be an administrator setting which is part of virtual machine software 44 that identifies one language of a number of possible languages from a predetermined list. In the present embodiment, the list of possible languages is not based on the set of languages actually specified by the developer using RAD tool 22 as described above (that information will not be known to the virtual machine software 44 at this stage in any event). In this example, it is assumed that the user selects English.
Based on the detected language configuration setting, virtual machine software 44 at device 18 composes and sends a message to the transaction server 14 requesting a language definition file 60 for the selected language (data flow S110). An indicator of the chosen language may be included in the message along with the identity of the mobile application.
Once the message is received by transaction software 78 at transaction server 14, the transaction server software 78 prepares a language definition file 60 to be returned to the mobile device 18 (S1112). To prepare the language definition file 60, software 78 extracts the portion of multi-language definition file 70 which pertains to the selected language. In this example, the portion of multi-language definition file 70 which pertains to English, i.e. lines 2-17, is stored in a new language definition file 60. This new language definition file 60 is sent via an XML message back to wireless communication device 18 (S1114), where it is received and stored in secondary storage 46.
At wireless communication device 18, the newly-received application definition file 58 is tokenized (S1116). In particular, parser 61 of virtual machine software 44 (
Specifically, the application definition file 58 may initially be converted to a DOM tree representation which is subsequently traversed. For each XML element that is encountered during the traversal, a corresponding object 169 (
For the purpose of illustrating the instantiation of a subset of the objects 169 of
The data members “name”, “index” and “readonly” correspond to attributes of the same name within the identified XML fragment. The constructor method fromXML( ) populates these data members with the values “mnuDone”, “0” and “NO”, respectively, based on the relevant XML attribute values of the fragment. The data member “caption_pointer” is populated with the XPATH expression “/Lang/ABOUT/Title” based on the value of XML attribute CAPTION.
The constructor method also populates the event array of menu item object 175. The event array is an array of event objects, each representing a different type of event that is significant with regard to the containing UI construct (in this case, menu item object 175). In the present example, only one significant event is defined for the menu item, namely, a “MENUITEMSELECTED” event which represents selection of the menu item by the mobile device user (see
The result of instantiating the menu item object 175 and subordinate objects is illustrated in
The menu object (not shown) is contained within a screen object 171 which also includes a set of text items 181. This hierarchy reflects a mobile application GUI screen having a menu as well as textual elements. The sole significant event for the menu item object 175 is represented by event object 177, which is the sole member of the event array of menu item object 175. The event object 177 in turn contains action object 178 which represent the action to be taken (closing the GUI screen) when the containing event occurs.
Text items 181 (
It is noted that the menu item class contains an onEvent( ) method (see above). This method is invoked via a callback from the operating system 40 of wireless communication device 18 upon the detection of any event pertaining to the menu item UI construct, for purposes of determining whether the detected event is significant and thus requires action to be taken. If other UI constructs, such as buttons (not illustrated), were defined, they would also have a similar method. Cumulatively, these methods within instantiated objects 169 comprise event handler 65 of
Each class also includes a writeToPersistentStorage( ) method (see above) which saves the object's state by storing data member values, e.g. to a file system. The values are stored in a binary representation. This method is invoked during the initial traversal of the DOM tree representation of application definition file 58, described above, for purposes of writing newly-instantiated objects to persistent storage. Once the data has been so stored, the objects may be de-allocated, and as a result, it is not necessary to maintain a vast set of objects representative of the entire application definition file 58 within mobile device memory. Only objects 169 pertaining to the current mobile device application state are instantiated at any given time, and mobile device resources are thereby conserved. A corresponding readFromPersistentStorage( ) method permits a newly instantiated object to restore its previous state from persistent storage, e.g., when an initial screen is loaded or when a subsequent screen is loaded due to user navigation to that screen. By initially storing the entire set of objects 169 to persistent storage in this fashion, the need to maintain a DOM tree representation of the application definition file 58 is avoided.
After the application definition file 58 has been tokenized, the language definition file 60 is converted to a dynamically-accessible DOM tree representation (S1118). The resultant language definition DOM tree 200 is illustrated in
At this stage, the initial screen (or, in the present example, the only screen) of the user interface of the mobile application is displayed at the wireless communication device 18 (S1120). To display a screen, screen generation engine 67 (
For each instantiated object 169 that is representative of a GUI construct, such as a screen, menu or menu item, a method in the object 169 invokes appropriate APIs of the wireless communication device operating system 40 to create a corresponding GUI construct for display by the operating system 40. Attributes that were originally defined in XML within application definition file 58 and are now stored within the virtual machine object instance 169 (e.g. GUI construct screen location, color and visibility for example), are applied to the corresponding GUI construct that is created by device operating system 40 responsive to the API calls. For attributes defining displayable textual components of the GUI, the XPATH expression value is passed as a parameter to a generic GetText( ) routine 197 (
If the wireless communication device user subsequently decides that the mobile application should be displayed in a different language—say, French—then the user (or an administrator) may change the language configuration setting at the wireless communication device 18 to reflect this choice. The changed language configuration setting is detected at the mobile device 18 (S1122,
If it is determined at transaction server 14 that no language definition file 60 exists for the relevant mobile application in the chosen language, the transaction server 14 may return a language definition file 60 in the default language (such as English in the example).
As will be appreciated by those skilled in the art, modifications to the above-described embodiment can be made without departing from the essence of the invention. For example, in some embodiments, the RAD tool 22 may generate master definition files as described in U.S. Patent Publication No. 2003/0060896, referenced above, rather than wireless communication device-specific application definition files 58. In this case, transaction server 14 may create the application definition file 58, before sending them to the wireless communication device.
In another alternative, rather than generating a single multi-language definition file 70 containing multiple <Lang> definitions for multiple languages, RAD tool 22 may generate multiple language definition files 60, one for each language for which the textual GUI components have been defined. In this case, it is not necessary to upload an entire multi-language definition file 70 from the RAD tool 22 to the transaction server 14 every time that a new language is added. Moreover, individual language definition files 60 need not be generated by application development software 78 (
It should also be appreciated that markup language documents need not be encoded using XML. Alternative markup languages (e.g. Standard Generalized Markup Language, of which XML is a subset) could be employed.
In some embodiments, after a multi-language definition file 70 is uploaded to transaction server 14, software executing at the transaction server 14 may examine the file 70 to determine the set of language(s) in which textual components of the mobile application have been specified. This set of languages may then be communicated to the wireless communication device 18 or 20, e.g., via an XML message. The languages may then be displayed the language configuration utility at the wireless communication device. By presenting a list including only languages which are known to be available, there can be greater certainty that the mobile application will actually be presented in the selected language.
In some embodiments, rather than instantiating a language definition DOM tree 200 (
When the device receives such a language definition file it could simply store the strings in a hash table, using the unique value as a hash key for each string. A GetText( ) routine could subsequently take in the unique value and retrieve the text from the hash table.
Other modifications will be apparent to those skilled in the art and, therefore, the invention is defined in the claims.