Jargon Software logo

Mobile and Handheld Application Development and Deployment
for PocketPC, Windows CE, PC and Tablet Devices

HOME PRODUCTS DEMOS DOWNLOAD SUPPORT PARTNERS NEWS ABOUT US

Search for:   
  Site Map You are here: Home > How It All Works > Write Host Business Procedures

3. Write host business procedures in the appropriate language


Write business procedures in the same language in which your back-office busines application is written. These procedures will receive input parameters from the Jargon Reader client application (as name/value pairs in the HTTP input request). The procedures will perform the required business logic using these input parameters (if any) and will send back one or more responses to the client application.

These responses may include both data to be displayed into some GUI component on the client screen as well as non-display commands (such as disabling a field). The Jargon Software client/host interface library contains routines specific to each supported language to make this task easier.


3.1 Progress 4GL Language
For Progress, write Progress 4GL programs (".p" and ".i" files), using the Jargon Software interface library include files to receive and send client-side information. Here is an example of Progress 4GL code for the "DoLogin" procedure.

In this procedure, the "jsi/getchar.i" include file references at lines 30-31 are Jargon interface routines that parse the inbound Sales Rep and password parameter values from the URL string and populate local variables with those values.

Likewise, the "jsi" include references at lines 42, 45, 53-58 and 63-65 are used to send data and commands back to the client.

Progress 4GL Host Procedure

 

3.2 Oracle PL/SQL Language
For Oracle, write PL/SQL procedures (".sql" files), using the Jargon Software interface library stored procedures to send client-side information. Here are examples of portions of PL/SQL procedures to accomplish the same actions as in lines 45 and 64 of the above Progress procedure:
 

CREATE OR REPLACE PACKAGE JSIEXAMPLES IS

PROCEDURE FrameShow;
PROCEDURE GridEmpty;
/* etc */

END JSIEXAMPLES;
/

CREATE OR REPLACE PACKAGE BODY JSIEXAMPLES AS

PROCEDURE FrameShow IS
BEGIN
  FRAME.SetVisible('fTable'); /* Jargon stored procedure */
END FrameShow;

PROCEDURE GridEmpty IS
BEGIN
  /* note that Progress 'table' is Oracle 'grid' component */
  GRID.RemoveAllItems('tableSave'); /* Jargon stored procedure */
END GridEmpty;
/* etc */

END JSIEXAMPLES;
/



 
3.3 Java Language
For Java environments (such as IBM WebSphere), write Java classes (".java" files), using the Jargon Software interface library classes to send client-side information. Here are examples of portions of a Java class to accomplish the same actions as in lines 45 and 64 of the above Progress procedure:
 


import javax.naming.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.sql.*;
import javax.sql.*;
import jargonsoft.jsi.*;

public class jsiExamples extends HttpServlet
{
// Handle the HTTP POST method
public void doPost (HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
{
// set content type and other response header fields first
response.setContentType("text/html");

// then write the data of the response
PrintWriter out = response.getWriter();
out.println( frame.setVisible("fTable", true) );
out.println( grid.removeAllItems("tableSave") );
out.close();
}



Previous page Return to top Next page



Home | Products | Demos | Download | Support | Partners | News | About Us

Copyright© 2000-2002 Jargon Software Inc.    |   Privacy Policy    |   Terms of Use