Nombas Logo: Simplicity and Power Through Scripting

Scripting

Products

Purchase

Download

Support

Company

Nombas > Products > ScriptEase ISDK > Device JavaScript > In Action

Jargon Software uses Device JavaScript as a key enabling technology inside of their connected, cross-platform applications. Below you can read all about the technical approach Jargon used to employ our ScriptEase Integrated SDK on wireless handheld platforms.

Technical Overview

Applications written for Jargon Software's Jargon Reader(tm) are described and distributed as an XML file. The UI layout and actions performed by the UI elements are embedded within this XML file. All application functional behaviors are specified using embedded Nombas Device Javascript scripts.

Consider the XML source code for the "Sports 2000 Customer Setup" application, part of the Jargon Palm Demo.

The XML document is divided into several sections. Each of first few sections, delimted by <frame> tags, contains XML source describing the layout of the application's UI. The various <label>, <textfield>, and <button> tags define the attributes (titles, sizes, and behaviors) of the elements within the form.

These XML tags define the first row of the customer information frame of the demo application:

<label name="label0" text="Cust. No.">
  <gbc/>
</label>
<textfield name="tCustNum" columns="5">
  <gbc gridX="1" rightInset="5"/>
</textfield>
<button name="bDisplay" label="Display"
 isSeparated="false">
  <gbc gridX="2" gridW="2" bottomInset="2"/>
  <ActionEvent taskNames="Display"/>
</button>

The <label> tag describes a field label ("Cust. No."), the <textfield> tag a editable field (containing the customer number), and the <button> tag a push-button ("Display"). The button description inclues an <ActionEvent> tag, which indicates the action to take when the button is pressed.

The second part of the XML document, delimited by the <script> tags and written using Nombas' Device Javascript, contains the application functionality.

The functionality of the "Display" button is specified by these two functions:

function CallRemoteProc(TranType, CustID) {
  rpc.SetRemoteProgram("a5/customers.p");
  rpc.SetRemoteProcedure("getcust");
  rpc.AddNameValuePair("tCustNum", CustID);
  rpc.AddNameValuePair("H-action-type", TranType);
  rpc.Execute();
}

...

function Display() {
  CallRemoteProc("get", tCustNum.GetText());
}
When user presses the "Display" button, the Display() JavaScript function is called. The global tCustNum object, created when the application is run, represents the frame's customer number field; calling tCustNum.GetText() retrieves the value of that field. This is then passed to CallRemoteProc(), responsible for the mechanics of the remote procedure call request to the database server. The end result for the user is that device retrieves the specified record from the server and displays it within the Jargon application.

All of this functionality is completely transparent to the user of the software. Device Javascript runs exceptionally fast and has minimal system requirements. For Jargon Software, all of this adds up to a no-compromise solution for cross-platform, wireless, rapid application development.

Want to see more? Download a free demo of the Jargon Software's product.

 

Want To See More? Click here to download a demo of their product and see Device JavaScript operate in the real world.

 

 

Home | Scripting | Products | Purchase | Download | Support | Company

Copyright ©2001, Nombas, Inc. All Rights Reserved.
Questions? Visit
http://support.nombas.com/