PlanetJ corporation

 

WOW 6.0 Walkthrough


* WOW Tutorial *

Creating WOW Applications

ã PlanetJ Corporation

1821 Kelson Place, Escondido CA 92029

Phone 760-432-0600 • Fax  760-432-0600

 


Table of Contents

Purpose  3

Introduction  3

Building the Application  5

Starting WOW   5

Creating a Connection  6

Adding an SQL Operation  10

Running the Application  14

Creating Field Descriptors  16

Additional Enhancements/Features  21

 

 


Chapter

1


Introduction

Purpose

 

This document describes how to create a sample Web-based DataEngine Application using the Web Object Wizard.

 

Introduction

 

 

 

Web Object Wizard

 

WOW is a rapid application development (RAD) tool used for creating Web Applications that access AS/400 files and programs. WOW runs on top of IBM’s WebSphere application server or Apache’s Tomcat.   Most programs require no or very little manual coding.  For more complex applications, the WOW can provide a base functionality, which can be further customized by application designers using the industry standard Java programming language.  Web applications are created by specifying SQL/JDBC statements.  WOW generates and displays the results in HTML to the user’s browser. 

 

WOW Application Example

 

For the demonstration, the AS/400 data used is stored in the EMPLOYEE table in the PJDATA library.  For reference, use the table and field names in the below screen shot. 

 

 

 

 


Chapter

2


 

Building the Application

Building the Application

 

This section describes how to define a DataEngine Application using the WOW

 

 

Starting WOW

 

You can download WOW or run it from PlanetJ’s servers.  I recommend first running an example from the PlanetJ’s servers and then installing a copy on your servers.

 

 

Running WOW From Your Servers (Optional):

See instructions on the bottom of this document for details on downloading.

 

Running WOW From PlanetJ’s Site:

 

Open an Internet Explorer browser and logon to:

 http://www.planetjavainc.com/wow60/wow

 

This will open the WOW builder application.  This is the IDE environment used by WOW programmers to create Web applications.  Once you have started WOW, you will see the sign-on screen in your browser:

 

 

If you have already registered, enter your email address and password to login.  If you have not registered yet, click the “Sign Up Now” button to go to the registration screen:

 

 

Required fields on the registration screen are indicated with a red asterisk.  After you have entered your information, click the insert button to store your new account into the database.  You can now login using the email address and password you specified in the registration information.

 

Creating a Connection

 

After signing on, you should see the main screen of the WOW:

 

 

 

There are a set of four wizard steps that guide WOW programmers through the process of creating Web applications. 

 

Step 1  Create a Connection

 

Before creating an application, first define a database connection that the application will use.

 

If using the WOW from the PlanetJ site, may skip this step and proceed to Step 2 (“
Setup Applications”).  A connection will be automatically supplied for you. 

 

If running the WOW locally (on your own servers), you will setup the connection now.  This process is described below.

 

Click on the “1 Setup Connection(s)” link along the top to view a list of all the database connections.  Unless a connection has been defined, this screen will be blank.  Click the “insert” button to create a new connection definition:

 

 

 

To define a database connection, specify the following attributes:

 

 

When done, click the “insert” button to save the new connection definition.  This will return you to a listing of all the connection definitions that have been created, which will now include the newly created connection definition.

 

 

Step 2:  Setup the Application

 

After creating a connection definition, select the “2 Setup Application(s)” link along the top of the page.   NOTE:  If running from PlanetJ servers, a connection will be available for you to use.  To insert a new application, click the “Create Application” menu item on the left hand of the screen.  This brings up the Application Creation screen:

 

 

 

This screen allows information to be entered, which will define the application.  The properties of a WOW Application include:

 

 

There are additional advanced application properties that can be set for advanced programming.  

 

*It is only necessary to fill in three of the fields: name, description, and connection alias.  After filling in the values as shown above, click the insert button, and then the cancel button to return to the main WOW screen.  The application just defined should be listed in the view of all applications:

 

 Adding an SQL Operation

 

A WOW Application contains one or more operations.  Although the WOW can create various operations, in this example, focus will be on the production of SQL operations.  By using SQL, various data inquiry operations can be built in the application.  In this sample application, we will retrieve data from the EMPLOYEE table.

 

To add an SQL operation to the application just created, select the application, and click on the “3  Setup Operations” link along the top.  This brings up a list of all the operations in the application.  (Since the application was just created, it won’t contain any operations.)  Choose the “Create an Operation” menu item to create a new SQL Operation.

 

The Create Operation screen allows you to specify the attributes of an SQL Operation.  When it first appears it will contain several default values:

 

 

The attributes of an operation include:

 

 

For this example it is only necessary to fill in four additional fields.  For the label field enter “Employees”.  This is the text that will link to this SQL Operation when the user is running the application.  For the title field enter “Employees”, and for the description enter “Get all employees in company”.

 

For the SQL field enter the SQL statement

 

SELECT * from pjdata.employee

This will select all of the fields and employees from the employee table in the pjdata library. NOTE:  You can specify any valid file and library if you don’t have access to the sample data. The sample SQL statement is fairly simple, but a more complex statement could be entered.  This is what the screen should look like after entering in the values:

 

 

 

Click insert and that’s it – the sample WOW Application is complete with a single operation shown below.

 


Chapter

3


 

Running the Application       

Running the Application

 

To see the application in action, click the application name or select the application then click on the step 4 Run button under Web Application Creation Steps.

 

A new browser window will open with the running application. 

 

The labels of all the application’s operations (in this case there is only one SQL Operation) are shown in a column on the left side of the screen.  Clicking on the “Employees” link brings up the screen of the SQL Operation:

 

This Operation shows all the employee records in the EMPLOYEE table.  Insert additional operations using SQL statements to try out the various features.  You may directly specify field names as shown in the EMPLOYEE data file image above.  For example, repeat the previous steps adding a new operation called “Employees by Dept” and use SQL “Select lastname, workdept, phoneno from PJDATA.EMPLOYEE order by lastname”.  Experiment with your own files if you wish.  WOW can access any data. 

Add another advanced operation using SQL  “select * from pjdata.employee where lastname like ? ”

The ? tells WOW to prompt the user for input. 

 

WOW Standard, Pro and Enterprise Editions allow much more powerful features such as dynamic prompting, real time updates/deletes/inserts, security, and web services.  These advanced versions are fee based products and are available by contacting PlanetJ Corporation.  

WOW Entry Edition has the full capabilities of WOW Enterprise Edition however if a fee based feature is used, a warning message will be shown to the user.  The license allows WOW Entry users to test and use all features in development mode but fee based features cannot be used in production applications.  

Contact PlanetJ Corporation if you have questions or require advanced WOW versions.  

 

 

 

 

 


Chapter

4


Creating Field Descritpors

Creating Field Descriptors

 

A Field Descriptor (FD) describes a field in the database (such as “FIRSTNME”, or “HIREDATE” in the EMPLOYEE table).  A Field Descriptor contains information such as the external name of a field, whether or not the field is required, or the type of data a field can hold (numeric, time, etc).  Field Descriptors can be created for files to allow the column headers and various attributes of target fields to be customized.

 

To create Field Descriptors for the EMPLOYEE table, click on the small “FD” icon above the result data table.  NOTE:  If running from the PlanetJ site, these will have been already created. 

 

 

 

This will bring up the Field Descriptor Manager in a new window.

 

 

Click the “Create FDs” button (under the table functions).  This will read the database and create Field Descriptors for every field in the EMPLOYEE table.  The list of Field Descriptors will then be displayed (scroll down to see the whole list):

 

 

Here, you could edit a Field Descriptor’s external name by typing text into the “External Name” column.  NOTE:  DO NOT change the field name, this must match the field actual name in database.  When complete, click the “Update Table” on the bottom of the screen to apply your changes. 

 

 

 

Now go back to the window containing the application, and rerun the query.  Now the column headers will show the new external names you specified:

 

 

Deploying Your Application To Users:

            Once an application has been built, it is ready to be run by users.  A WOW application can be run by any user on your network or Internet/Intranet/Extranet.  WOW applications can be run by specifying a URL in the form:  http://IP://wow60/run?id=x  where IP is the TCP/IP address of the WOW server and x is the WOW application id.  The IP can be found by opening a DOS window on the WOW server and issuing an IPCONFIG command as shown below:

 

In this example, WOW applications can be run using:

http://192.168.0.2/wow60/run?id=0      where 0 is the WOW application id which is found in Step 2  Setup Applications in the WOW Builder.  Each new WOW application gets the next sequential number. 

 


Chapter

5


Additional enhancements and Exercises    

Additional Enhancements/Features

Uses of WOW: 

As you have seen, Web applications can be built in minutes that are customizable.  Building a similar application in Java or CGI may take weeks or months. 

You can put WOW to use to build applications such as:

1.      Management Reports.  WOW can be used to query order and sales files bring real time data to management with a single browser click. 

2.      Employee directories

3.      Customer inquiries

4.      Product and inventory viewing

5.      Insurance claims

6.      CRM, Help Desks, FAQs,  Q &A databases, Etc.  

ADDITIONAL ENHANCEMENTS/FEATURES

 

For additional information:  

 

Tutorials:  http://www.planetjavainc.com/learn_wow.html

Manuals:  http://www.planetjavainc.com/wow_docs/WowHelp6.htm