1. Field
The disclosed concept relates generally to application development and, more particularly, to a method of creating an application wherein a number of preexisting instruction sets and a number of configurable parameters can be dynamically employed to create an additional menu item in a context-sensitive menu of an application.
2. Description of the Related Art
Many applications are developed using markup language such as html and scripting instructions such as JavaScript, by way of example. Such applications typically are executed in an instance of a browser on an electronic device since the browser is capable of rendering the html content and usually is capable of executing the JavaScript instructions. It is noted, however, that the instance of the browser that performs these operations typically itself runs in a different environment, such as a Java runtime, by way of example.
Since browsers typically are used for rendering html and executing JavaScript that has been received on an electronic device as content via a network such as the worldwide web, and since the potential for receiving malicious code always exists, browsers oftentimes are configured to execute such received content at a high level of security and thus with a consequent low level of functionality. That is, browsers oftentimes are configured to permit at most very limited types of operations when compared with the quantity and level of sophistication of the operations that could be executed in, for instance, a Java runtime. Unfortunately, however, the quantity of application developers having a good working knowledge of Java application programming is relatively small compared with the number of web developers skilled with html and JavaScript. It thus would be desirable in some fashion to facilitate the development of applications providing sophisticated functionality.
A full understanding of the disclosed concept can be obtained from the following Description when read in conjunction with the accompanying drawings in which:
Similar numerals refer to similar parts throughout the specification.
It is understood that
In general terms, the tool advantageously enables instructions written in, for instance, html, JavaScript, “pseudo-markup” instructions, and URL-based syntax to be employed in easily creating a Java application or an application that can be executed in another type of environment, and the applications can have highly sophisticated functions. Also advantageously, an application that can run in a Java runtime, for instance, can have individually defined security settings, and thus can be configured to perform a greater variety of functions than could an application executed, for instance, in a browser runtime. As will be further set forth below, the tool 30 also advantageously enables a user of the tool 30, such as an application developer who might use the tool 30, to employ relatively simple declarative instructions to provide additional menu items in context-based menus. Since menu operations typically are provided by a mechanism other than a browser mechanism, changes to a menu had previously required custom Java coding, but the tool 30 advantageously now enables additional menu items to be provided through the use of relatively simple declarative language that is input to the tool 30.
The tool 30 advantageously provides a user interface 32 that provides a number of screens, two of which are depicted in
The screen of the user interface 32 that is depicted in
The resources & entry point area 60 likewise enables a number of configurable parameters 52 to be input into labeled fields. For instance, an entry point field 64 and an icon field 68 each include a drop-down menu, although other types of fields may be employed. The convenience that is afforded by the drop-down menus is that the contents of such drop-down menus can be generated by the user interface 32 in accordance with the entries that exist in a project tree 72 that is also depicted in
The drop-down menu for the icon field 68 is populated by the user interface 32 examining the project tree 72 to identify each .png file therein, and the names of each such .png file in the project tree 72 are listed as entries in the drop-down menu for the icon field 68. Thus, in the example depicted in
Similarly, the entry point field 64 includes a drop-down menu which will list all of the html files that have been added to the project tree 72. In the example presented herein, only the html file “moon.html” has been added to the project tree 72, and thus the aforementioned drop-down menu for the entry point field 64 will have only a single selectable file name. The parameter in the entry point field 64 describes the name of the file that will be used as the initial page that is executed when the finalized application is invoked on the client 20. It thus likewise is another configurable parameter 52 that is used as an input to the tool 30 when generating the application.
It is noted that the configurable parameters 52 depicted generally in
Another screen of the user interface 32 is depicted generally in
As mentioned above, therefore, the “URL to enable” field 96 indicates the particular page for which the additional menu item will be provided. In the exemplary embodiment depicted herein, the allowable input in the “URL to enable” field 96 is a page of the current application or a page remote to the application, such as a page that is available via the worldwide web.
The “text label” field 100 enables the input of the label or name that will appear in the additional menu item. The “target URL” field 104 will specify in URL-based syntax the page or other resource such as a function that will be executed if the additional menu item is selected. In the exemplary embodiment depicted herein, the target URL can be another page of the same application, a page remote to the application, or a function on the page that is indicated in the “URL to enable” field 96. Such a function would typically be written as one or more JavaScript instructions on that page, although other implementations can be envisioned. The parameter received in the “target type” field 108 determines, for instance, whether the operation that will be carried out by the new menu item will appear in a new instance of the browser or will be opened within this application.
A typical menu entry operation would be as follows. In the “URL to enable” field 96, the received parameter might be “moon.html”, and the parameter received in the “text label” field 100 might be “search”. The parameter received in the “target URL” field 104 might be “www.giggle.com”. As part of the operation to convert such inputs into an additional menu item, the tool 30 converts the aforementioned inputs into URL-based syntax in the form of declarative language, and such declarative language would be added at some location to the config.xml file which, as will be set forth in greater detail below, is employed in generating the final application. An example of the declarative language that might result from this operation of the tool 30 might be
<urlenabled=“moon.html”menuentry=“search”url=“http:www.giggle.com”>
although other tags and other pseudo-markup can be employed without departing from the present concept. The result of such an operation would be that when the moon.html page is open or active on a client 20, and a predetermined input such as an actuation of a <MENU> key is detected, the menu that is output will include an additional selectable menu item entitled “search”, and a selection of this additional menu item would invoke the page http://www.giggle.com. It thus can be seen that the relatively simple parameters that were added on the screen depicted generally in
Once all of the configurable parameters 52 that are desirable or necessary or both have been input, such as with the use of the user interface 32, and all of the files, objects, or other resources that are desirable or necessary or both have been added to the project tree 72, the project is in condition for being compiled and thereby converted into an application that can be executed, for instance, in a Java runtime. Some of the operations that occur during a compiling operation are depicted generally in
More specifically, in the initial stages of the compiling operation, the tool 30 generates a Java project file 116 that includes certain data regarding the project such as the title of the project, i.e., “MoonPhase” and the icon being used, i.e., “default.png”, and these configurable parameters 52 are copied from the config.xml file in the Java archive 112 into the Java project file 116, as at 120. As will be set forth in greater detail below, the Java project file 116 also receives the names of other objects that are created during the compiling process.
Such other objects may be formed, for instance, from a number of template instruction sets which are in the nature of files having boilerplate Java code that will be employed in creating the application. Four such template instruction sets are depicted in an exemplary fashion in
It is noted that the various fields of the template instruction sets are depicted herein as receiving configurable parameters, but other parameters, values, and the like can be employed without departing from the present concept. In populating the fields of the template instruction sets, the tool 30 employs its logic and the various configurable parameters 52 to determine which template instruction sets will be used in creating the application. While only four template instruction sets are depicted herein, it is understood that many other template instruction sets that are additional to or alternative to those shown herein may be employed and likely will vary based upon the inputs provided to the tool 30, such as via the user interface 32.
Once the fields in the template instruction sets have been filled, either with a configurable parameter or other value, the completed template instruction sets are then saved and are each advantageously given a unique name that is additionally added to the Java project file 116. As can be understood from the foregoing, the tool 30 employs its logic to identify one or more of the template instruction sets, inserts values into the fields of one or more such template instruction sets, and saves such completed template instruction sets, and all of this occurs in a dynamic fashion without express input by the web developer subsequent to initiating the compiling operation. Since each such file must be given a unique name, the tool 30 advantageously creates for each such completed template a unique name, stores the completed template under the unique name, and adds the unique name to the Java project file 116.
More specifically, the completed template instruction sets are referred to as “classes”, with each template instruction set, when populated with configurable parameters 52 and other parameters, being saved as a separate class of instructions. Each such newly saved class is assigned a unique name which, in the present example, includes both a time-based element and a random number element.
More particularly, when a given template instruction set has all of its fields populated and is in need of being saved as a new class of instructions, the tool 30 assigns to a variable <random id> a unique value by providing a current time in “ticks” and appending to the current time a random positive long number. For instance, the current time in “ticks” might be the number of milliseconds since 12:00 AM of Jan. 1, 2005. The random positive long number might be obtained in any of a variety of fashions. The class may then be uniquely identified and stored with the following exemplary namespace
net.rim.bb.backpack.package=randomid> class
where <random id> is the aforementioned integer value created by taking the time in ticks having appending to it the random positive number. It is understood that the value of <random id> can be generated in other fashions without departing from the present concept.
As each such class is created, named, and stored, the name is added to the Java project file 116. For instance, in the example of
It is also noted that a hash of one of the unique names is created and is additionally stored for future use with the final application. The hash can be of any of the unique names and is employed as a name of an area of persistence store that will be used to save certain data used by the application. For instance, if the application ultimately is a banking application, the hash might be used to indicate the area in persistence store where credit card numbers are saved. Other types of data can similarly be stored, such as answers to previously asked and answered questions, personal information, etc. without limitation.
Once all of the template instruction sets have been stored as classes with unique names and the unique names recorded in the Java project file 116, the Java project file 116 and the contents of the Java archive 112 are passed to a conversion engine that is indicated generally at the numeral 192. By way of example, all of the files, objects, or other elements that are stored in the Java archive 112, are retrieved and are passed to the conversion engine 192 and are each designated as being embedded resources. It is noted, however, that the config.xml file typically will not be provided to the conversion engine 192 as being an embedded resource since most if not all of its contents have already been used, for instance, in filling fields of template instruction sets, in providing data to the Java project file 116, or has been employed for other purposes. However, all of the other files in the Java archive 112 are passed to the conversion engine 192 for conversion into machine code.
Similarly, the conversion engine 192 parses the contents of the Java project file 116 in order to parse from it the various unique names, and such parsed unique names are employed to retrieve the classes that are saved under these unique names. The retrieved classes are passed to the conversion engine 192 and are converted, for instance, from Java code into machine code.
Once all of the classes have been converted into machine code along with the contents of the Java archive 112, a linking operation occurs, as at 192, where any instructions that ordinarily in use would import, invoke, or otherwise call a resource on a platform of a client are checked for correct linkage with a mirror 200 of the platform that is included with the tool 30. That is, many of the template instruction sets include one or more “import” statements which may be intended to cause a resource or other application on a platform to execute an operation. Since it is desired to ensure that the application will function properly on the client 20, a mirror 200 of its platform is included in the tool 30, and as part of the compiling process each such “import” or other such function is linked with the mirror 200 of the platform to ensure that it successfully describes the desired resource.
Once the linking operation, as at 196, is finished, the application, which is indicated generally at the numeral 204, is completed and is available for deployment to the server 12 or installation on one or more clients 20 or both is possible. The exemplary application 204 is depicted in
Advantageously, and in the example presented herein, the page “moon.html” is available as one of the embedded resources 208 of the application 204, and the application 204 will cause the execution of “moon.html” by instructing the operating system of the client to create an instance of a browser, i.e., a browser having an html rendering engine and a JavaScript engine. The operating system will create the instance of the browser, and the instance of the browser will execute the html and JavaScript of “moon.html” and output can be provided accordingly. It is noted, however, that the aforementioned file “moon.html” while seemingly being executed by a browser, is actually being executed as part of a Java application and thus can have its own unique security settings and authorizations assigned thereto. Thus, moon.html could include, for instance, JavaScript that will access certain portions of the client 20 that would be unreachable if moon.html was executed in a browser runtime by the browser itself. As such, by creating the application 204 and providing the file moon.html has an embedded resource 208, the file moon.html can have a potentially greater degree of functionality on the client 20 since it is being executed in the context of a Java application. It is also noted that all of the features and functions of the application 204 were created through the use of markup language, scripting instructions, pseudo-markup language, and URL-based syntax. That is, a sophisticated Java application was created by the tool 30 despite having relatively simple inputs being provided to generate it.
The various template instruction sets available within the tool 30 can be created and organized in any of a variety of ways. For instance, a given template instruction set might be arranged to perform a specific type of operation, such as creating a new menu item when specified by the application developer. For instance, in the example set forth above regarding the inputting of a number of parameters for the creation of a new menu item and the conversion of the input parameters into a declarative pseudo-markup language, the parameters in the pseudo-markup language were stored in the config.xml file and may have been retrieved and stored in fields of a given template instruction set. Such a template instruction set may have been arranged to accept all of the instructions for all additional menu items whereby a single class of instructions having a single unique file name would have been created in order to provide the functionality to generate all of the additional menu items in the various context-sensitive menus.
An example of the advanced additional menu item feature is indicated in
Proceeding with the same example, it will be recalled that the target URL of the additional menu item was “http:www.giggle.com”. If a selection of the new menu item 232A “search” is detected in
It thus can be seen that the improved tool 30 enables relatively sophisticated Java applications to be created without requiring actual Java coding, and rather being operable with html, JavaScript, and other simple types of inputs. The ability to execute a web page as an embedded resource of a Java application enables greater functionality by permitting customized security parameters to the application. The dynamic code creation operation also successfully assigns unique names to each new class, thus increasing the likelihood of a successful compiling operation. Also, the advanced additional menu item feature enables a web developer to make changes to a context-sensitive function, i.e., a function that typically would require Java coding, to be implemented using relatively simple inputs such as pseudo-markup and URL-based syntax, to create such additional rich functionality.
While specific embodiments of the disclosed concept have been described in detail, it will be appreciated by those skilled in the art that various modifications and alternatives to those details can be developed in light of the overall teachings of the disclosure. Accordingly, the particular arrangements disclosed are meant to be illustrative only and not limiting as to the scope of the disclosed concept which is to be given the full breadth of the claims appended and any and all equivalents thereof.
The instant application claims priority from U.S. Provisional Patent Application Ser. No. 61/106,591 filed Oct. 19, 2008, the disclosures of which are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
61106591 | Oct 2008 | US |