Corporate Headquarters BluePhoenix Solutions Vlierwerf 7B 4704 SB Roosendaal The Netherlands +31 (0) 165 399 401 +31 (0) 165 396 308 fax USA Headquarters BluePhoenix Solutions USA, Inc. 8000 Regency Parkway Cary, NC 27511 United States +1 919.380.5100 +1 919.380.5111 fax www.bluephoenixsolutions.com
1992-2003 BluePhoenix Solutions All rights reserved. BluePhoenix is a trademark of BluePhoenix Solutions. All other product and company names mentioned herein are for identification purposes only and are the property of, and may be trademarks of, their respective owners. Portions of this product may be covered by U.S. Patent Numbers 5,495,222 and 5,495,610 and various other non-U.S. patents. The software supplied with this document is the property of BluePhoenix Solutions, and is furnished under a license agreement. Neither the software nor this document may be copied or transferred by any means, electronic or mechanical, except as provided in the licensing agreement. BluePhoenix Solutions has made every effort to ensure that the information contained in this document is accurate; however, there are no representations or warranties regarding this information, including warranties of merchantability or fitness for a particular purpose. BluePhoenix Solutions assumes no responsibility for errors or omissions that may occur in this document. The information in this document is subject to change without prior notice and does not represent a commitment by BluePhoenix Solutions or its representatives.
TABLE OF CONTENTS
Table of Contents
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
Using Online Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 Using the Online Books. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
ii
CHAPTER
INTRODUCTION
This document introduces the Construction Workbench of the AppBuilder producta suite of tools you use to rapidly develop, build, and test software applicationsand shows how to create a Hello World application for deployment as a Java application. Among the tools in the Construction Workbench. For more details on the use of the full set of tools available in the Construction Workbench, refer to the Development Tools Reference Guide. This guide teaches you how to use these tools by building a sample application. It takes about three hours to complete the tasks and create the project. Steps in this tutorial include building the application hierarchy, creating the user interface, creating and preparing rules, and configuring for deployment and execution. This intended for deployment as a Java application. Refer to the Developing Applications Guide, the Deploying Applications Guide, and the ObjectSpeak Reference Guide for further help with creating and deploying Java applications.
1-1
Documentation Conventions
This book uses the conventions described in Table 1-1.
Table 1-1 Conventions Specifies this type of information Type the text, as it appears in this guide. Select the option, function, button, or selection in the window. Select the menu and option. Press the specified keys, at the same time. Perform the specified task or procedure, in order. This Convention
DEV_GRT_LB
OK Analysis > Verify Alt + B 1. Type the name. 2. Select OK. 3. Close the window. Apples Oranges Pears 1. Open the file: a. Double-click on the icon. b. Select Open. The Open window appears. 2. Select the choice, then select OK. start <filename>
Perform a high-level task or procedure. The procedure may include sub-tasks. Replace the italic text with a specific variable or option.
1-2
Introduction
Figure 1-1
Use the Previous and Next buttons to navigate throughout the help text. Use the Synchronize button to display your current location within in the book. Some text and graphics may contain hyperlinks. Click on the link to display the associated information. For more information about the online help and the printable version of documentation, refer to the Documentation Reference Guide.
Note
Adobe Acrobat is required to display and print documents in PDF format. You can download it from the Internet at http://www.adobe.com.
These books include the workstation documentation set for AppBuilder. (The online and searchable version of these guides are also available by pressing the Help button or pressing F1 from the AppBuilder
1-3
Construction Workbench.) For more information about the printable version of documentation and the online help, refer to the Documentation Reference Guide.
1-4
Introduction
CHAPTER
AppBuilder provides a robust, integrated toolset to design, implement, and maintain high volume, multi-platform, distributed applications. The first step is to start the environment on your workstation. This involves: Connecting to a Repository Understanding the Construction Workbench Planning the Sample Application
Connecting to a Repository
When starting AppBuilder, you must access a repository to store your project and options. A repository is a centrally located, intelligent, relational database that holds software application objects, the methods and facilities used to access the objects, and the relationships among the objects. 1. From the Windows desktop, click on Start, then select Programs > AppBuilder > Construction Workbench. The Connect to Repository dialog appears, as in Figure 2-1.
Figure 2-1 Connect to Repository dialog
2. 3.
From the Repository drop-list, select the repository to access. Enter your User name and Password and click on Connect.
Contact your system or repository administrator for the necessary information. If you are using a personal repository, refer to the Personal Administration Reference Guide.
Note
The AppBuilder Construction Workbench appears. Figure 2-2 on page 2-2 identifies the parts of the workbench. The system also displays the Tip of the Day.
2-1
4.
Click on Close to close the Tip of the Day window and begin using AppBuilder.
If the Construction Workbench takes a long time to load or the repository takes a long time to find, you may have the ODBC trace set on your workstation. If the ODBC trace is set, a lot of logging is being done when accessing the underlying repository database. Once the tracing is stopped and this setting is applied, the connection time returns to normal. In Control Panel > Administrative Tools > Data Sources (ODBC) > Tracing (for Windows NT) or Control Panel > Data Source (ODBC) (for WIndows 2000), set Stop Tracing Now and click OK.
Note
Toolbar(s)
Hierarchy window
Output window
Status bar
2-2
The AppBuilder Construction Workbench contains several features to help you work more efficiently. Move the cursor to any button or icon on a toolbar and the system displays the name of the button. Each part of the workbench (for example, Hierarchy or Status window) can be resized or converted into a floating window and positioned anywhere on the Windows desktop. The system only displays menus, toolbars, and options that are valid at any given time, based on the currently selected object. To customize the interface and tools, select Tools > Workbench Options from the Construction Workbench menu. Each tool within the Construction Workbench (for example, Hierarchy window or preparation tool) contains a tab with tool-specific options. These are explained in detail in the Development Tools Reference Guide.
The sample application is designed as a standalone Java application that can run locally on your machine. Chapter 7, Creating the Configuration Hierarchy discusses other possible configuration and deployment scenarios.
Note
You must have the Java runtime compiler installed on your workstation PC in order to create the sample application. Consult your system administrator for more information.
When building the sample application, be sure to save your work often (that is, commit to the repository). Select File > Commit from the Construction Workbench menu or click on the Commit button in the toolbar to save the sample application. If the Commit button is disabled (grayed out), the repository already contains the most recent changes.
2-3
2-4
CHAPTER
The hierarchy diagram describes the structure (or part of the structure) of the application. This structure specifies how the application executes. Use the Project tab of the Hierarchy window to build the objects (such as rules and windows) in the application hierarchy and their relationships. The common tasks in defining the hierarchy include: Using the Hierarchy Toolbars Creating the Project Adding a Function Adding a Process Adding a Rule Adding a Window Adding a View Adding a Field
Function
Rule
View
The other hierarchy objects are not used in the sample application.
3-1
Insert sibling
Delete object
In addition to using the toolbar, you can also work with objects by using one of the following methods: Right-clicking on an object in the Hierarchy window and selecting a function from the pop-up menu. Selecting an object in the Hierarchy window and selecting Insert or Edit from the Construction Workbench.
3-2
Figure 3-3
2.
HELLO_WORLD
Select Java application
Database type
N/A
Un-select
Un-select
Caution
If you use a group (that is, a Workgroup or Enterprise) repository, add a unique identifier to the end of each object you create for the sample application (for example, Project Name). This eliminates potential problems if other developers also attempt to create the sample application.
3-3
3.
Click on OK. The Hierarchy window appears, as in Figure 3-4, showing the new project as the top of the application hierarchy on the Project tab. Note that Standalone appears in the status bar of the construction workbench.
Note
Figure 3-4
If the system displays a Security Validation Failed message contact your system administrator or repository administrator to gain the necessary permissions. Hierarchy window with function
AppBuilder automatically adds a function to a new project (with the same name as the process).
3-4
Adding a Function
Adding a Function
A function represents the highest-level business function the purpose of the application. At execution time, the function may appear as a desktop icon or menu option that the end-user can access. Functions contain groups of processes that sub-divide the application. For the sample application, the function accepts user input and echoes the input back to the user. The system automatically created the HELLO_WORLD function when creating the project. 1. Right-click on the HELLO_WORLD function on the Project tab of the Hierarchy window and select Properties from the pop-up menu. The Properties dialog appears, as in Figure 3-5.
You can configure the Construction Workbench options to use double-click to show the properties of an object from the Hierarchy window. Properties - [Function] dialog The system automatically assigns a unique System ID for each object in the hierarchy.
Tip
Figure 3-5
Specifies how the functions under this process appear to the end user.
2.
Type Hello World Application in the Menu description field and click on OK.
3-5
Adding a Process
Adding a Process
A process represents a logical unit of work or activity that can manipulate the data within the application. In an AppBuilder application, processes appear as options on pull-down menus. For the sample application, we create a process to allow user input and system output. 1. Select the HELLO_WORLD function and click on the Process button toolbar. You can also add a process by: Right-clicking on the HELLO_WORLD function and selecting Insert Child > Process from the pop-up menu. Selecting the HELLO_WORLD function and selecting Insert Child > Process from the Construction Workbench menu. Clicking on the Insert Child button Process from the pop-up menu. 2. in the Hierarchy Operations toolbar and selecting in the Hierarchy Objects
In the Insert Process dialog, type HELLO_CLIENT_PROC in the Name field and click on Insert. The Hierarchy window shows the new process as a child of the HELLO_WORLD function, as in Figure 3-6
Figure 3-6
3-6
Adding a Rule
Adding a Rule
In an AppBuilder application, rules are programming statements that define the logic of the application (that is, how the application works). At execution time, each rule performs a unique action. The sample application requires two rules: one rule (client) to handle the user interface (input and output) and one rule (server) to handle the business logic. In this procedure, we add the rules to the hierarchy. In Chapter 5, Creating Rules we add the actual rule code. 1. Select the HELLO_CLIENT_PROC process and click on the Rule button toolbar. You can also add a rule by: Right-clicking on the HELLO_CLIENT_PROC process and selecting Insert Child > Rule from the pop-up menu. Selecting the HELLO_CLIENT_PROC process and selecting Insert Child > Rule from the Construction Workbench menu. Clicking on the Insert Child button from the pop-up menu. 2. in the Hierarchy Operations toolbar and selecting Rule in the hierarchy
In the Insert Rule dialog, type HELLO_CLIENT in the Name field and click on Insert. This rule accepts the user input and displays the output. The Hierarchy window shows the new rule as a child of the process.
3.
Add a second rule as a child of the HELLO_CLIENT rule. Name this rule HELLO_SERVER. This rule copies the user input to the output.
Your hierarchy diagram should look like the one shown in Figure 3-7.
Figure 3-7 Hierarchy window with rules
3-7
Adding a Window
Adding a Window
Windows are screens that accept input or display data to the end user. In an AppBuilder application, windows are linked to views that contain the actual data elements (such as fields) for the window. For our sample application, we need to create a window to handle the end-user input and the system output. In this procedure, we add the window to the hierarchy. Windows are used on the client side and are not on the server. That is why we add the window as a child of the client and not the server. In Chapter 4, Creating the User Interface we create the actual window GUI (graphical user interface). 1. Select the HELLO_CLIENT rule and click on the Window button You can also add a window by: Right-clicking on the HELLO_CLIENT rule and selecting Insert Child > Window from the popup menu. Selecting the HELLO_CLIENT rule and selecting Insert Child > Window from the Construction Workbench menu. Clicking on the Insert Child button Window from the pop-up menu. 2. in the Hierarchy Operations toolbar and selecting in the hierarchy toolbar.
In the Insert Window dialog, type HELLO_WIN in the Name field and click on Insert. The Hierarchy window shows the window as a child of the HELLO_CLIENT rule and a sibling of the HELLO_SERVER rule, as in Figure 3-8.
Figure 3-8
3-8
Adding a View
Adding a View
Views are structures that contain data elements (such as fields or other views) and define the data structure of the application. Views attached to a window are called window message views. These views define the data displayed to a user, data entered by a user, and data stored by the system. For our sample application, we need to create views to handle: Input by the user Output to the user Data displayed on a window 1. Select the HELLO_SERVER rule and click on the View button You can also add a view by: Right-clicking on the HELLO_SERVER rule and selecting Insert Child > View from the pop-up menu. Selecting the HELLO_SERVER rule and selecting Insert Child > View from the Construction Workbench menu. Clicking on the Insert Child button from the pop-up menu. 2. in the Hierarchy Operations toolbar and selecting View in the hierarchy toolbar.
In the Insert View dialog, type HELLO_SERVER_IV in the Name field and click on Insert.
The IV indicates that this is an input view. We recommend that you use a standard naming convention to easily identify the objects in your applications and repositories.
Note
The Hierarchy window shows the new view as a child of the rule. 3. Right-click on the newly created view and select Relationship Properties from the pop-up menu. The Properties [owns View] window appears, as in Figure 3-9 on page 3-9.
Properties [owns View] window Type of view
Figure 3-9
4.
Select Input View from the View usage drop-list and click on OK. This specifies how the parent rule uses the data in this view.
3-9
Adding a Field
5.
Repeat steps 1 4 to add the following additional views: A view as a child of the HELLO_SERVER rule. Name this view HELLO_SERVER_OV. Set the View usage to Output View. This view handles the output view. A view as a child of the HELLO_WIN window. Name this view HELLO_WIN_V. Set the View usage to Input & Output View. This view handles the end-user window.
Your hierarchy diagram should look like the one shown in Figure 3-10.
Figure 3-10 Hierarchy window with views
Adding a Field
Fields are the smallest unit of data in an AppBuilder application. Fields can record the input/output definition of objects or contain information about part of a database file (such as a column in a database table). An edit field object defines a field in which the end user can either enter and change data, or view read-only data. For the sample application, we need to create input and output fields for each view. 1. Select the HELLO_SERVER_IV view and click on the Field button You can also add a view by: Right-clicking on the HELLO_SERVER_IV view and selecting Insert Child > Field from the popup menu. Selecting the HELLO_SERVER_IV view and selecting Insert Child > Field from the Construction Workbench menu. Clicking on the Insert Child button from the pop-up menu. in the Hierarchy Operations toolbar and selecting Field in the hierarchy toolbar.
3-10
Adding a Field
2.
In the Insert Field dialog, type INPUT_MESSAGE in the Name field and click on Insert. This field handles the end-user input. The Hierarchy window shows the new field as a child of the view.
3.
Right-click on the INPUT_MESSAGE field in the Hierarchy Function Diagrammer window and select Properties. The Properties - [Field] window appears, as in Figure 3-11.
You can configure the Construction Workbench options to use double-click to show the properties of an object from the Hierarchy window. Select Tools > Workbench Options from the Construction Workbench menu. Use the Double-click actions combo box on the Hierarchy tab to specify the default action for double-click. Properties - [Field] dialog with General tab
Tip
Figure 3-11
4.
Change the following fields and click on OK. Screen literal long: Enter Input Message Field format: Character Field length: 30
5.
Repeat steps 1 4 to add the output field as a child of the HELLO_SERVER_OV view. Name this field OUTPUT_MESSAGE. This handles the output view. Field format: Character Field length: 256
3-11
Adding a Field
6.
Because these fields also are included on the end-user window, you must add the fields to the HELLO_WIN_V view. a. Select both the INPUT_MESSAGE and OUTPUT_MESSAGE fields.
Tip
To select multiple objects, press Ctrl while clicking on the object names.
b. Select Edit > Copy from the Construction Workbench menu. You can also right-click and select Copy from the pop-up menu. c. Select the HELLO_WIN_V view. d. Select Edit > Paste from the Construction Workbench menu. You can also right-click and select Paste from the pop-up menu. You can also copy fields (and other objects) by pressing Ctrl while dragging and dropping the fields to the view. The system creates a copy of both fields as children of the HELLO_WIN_V view. The hierarchy diagram should look like the one shown in Figure 3-12.
Figure 3-12 Completed hierarchy diagram
To save the hierarchy, commit all changes to the repository. Select File > Commit from the Construction Workbench menu. You can also commit changes by either clicking on the Commit button Ctrl+M. in the toolbar or typing
Now that the application hierarchy is built, we must create the user interface. Continue with Chapter 4, Creating the User Interface.
3-12
CHAPTER
Use the Window Painter to create the end-user interface for each window in an AppBuilder application. You can create objects within the window (for example, text fields, list boxes, or push buttons) to allow the end-user to view or modify the data and control the application. The Window Painter contains extensive tools for customizing the size, color, and other attributes of each object. The sample application contains a single window named HELLO_WORLD_WIN. In this section we create the GUI presentation for windows. The common tasks in creating the user interface include: Using the Window Painter Creating the Window Adding an Edit Field Adding Static Text Adding a Push Button
4-1
Static text
The other window objects are not used in the sample application.
In addition to using the toolbar, you can also add window objects by selecting the window and then selecting Insert from the Construction Workbench menu. The Window Layout toolbar(Figure 4-2 on page 4-2) allows you to quickly and easily align objects in the window. Select one or more objects, then click on the appropriate button in the Window Layout toolbar.
Figure 4-2 Preview window Window Layout toolbar Center objects
Align objects
Distribute objects
In addition to using the toolbar, you can also manipulate window objects by selecting the object and then selecting Layout from the Construction Workbench menu.
4-2
Figure 4-3
Use these fields to customize the window (for example, colors or scroll bars).
3.
In the Text field, type Hello World Application and press Enter. This is the name of the window. At runtime, this text displays in the window title bar.
4-3
Note
Figure 4-4
Use these fields in this window to customize the field (for example, color or protected).
4.
Create a mutli-line edit field to handle the application output. Click on the Multiline Edit Field button in the window object toolbar and move the cursor to the Window Painter window. The cursor changes to a plus (+).
4-4
5.
Repeat steps 2 3 to add the output field. Link this field to OUTPUT_MESSAGE. Change the Editable field to True. Change the Word wrap field to True.
6.
To align the fields, select both fields then select Layout > Align > Left from the Construction Workbench menu.
To select multiple fields, press Ctrl while clicking on the field names.
Tip
You can also align objects by selecting the objects then clicking on the Align Left button Window Layout toolbar. Your window should look like the one shown in Figure 4-5.
Figure 4-5 Hello World Application window with fields
in the
4-5
Note
If you add fields to the window by dragging them from the hierarchy (as in Adding Fields from the Hierarchy on page 4-5), the system automatically includes a text label, if it is identified in the properties of the field. You can edit or change this label, as needed.
1. 2.
Click on the Static Text button in the window object toolbar and move the cursor to the Window Painter window. The cursor changes to a plus (+). In the Window Painter window, click on the Hello World Application window object to add the text to the window. The system places a blank text box in the window. To move the text box, click and drag the text box. To resize the text box, click and drag one of the text box handles.
3.
In the Text field of the Properties window of the Text Object in the Hello World Application window (as in Figure 4-6) type Enter Input Message and press Enter. This is the text label that appears for the window input field (HELLO_WORLD_INPUT.)
If the Properties window is not visible, right-click on the text box and select Properties. Field Property window
Note
Figure 4-6
4.
Repeat steps 1 3 to add the following static text for the window output field: Output Message from Server
5.
To align the fields, select both fields then select Layout > Align > Left from the Construction Workbench menu. You can also align objects by selecting the objects then clicking on the Align Left button Window Layout toolbar. in the
Tip
To select multiple fields, press Ctrl while clicking on the field names.
Your window should look like the one shown in Figure 4-7.
4-6
Figure 4-7
Text
Note
If the Properties window is not visible, right-click on the button and select Properties.
4-7
Figure 4-8
Button Properties window Use these fields in this window to customize the button (for example, colors or size).
4.
Repeat steps 1 3 to add a second button to close a window. Use the following properties for this button: HpsID = CloseButton Text = &Close
Your window should look like the one shown in Figure 4-9.
Figure 4-9 Completed Hello World Application window
To preview how the window will appear, open the window and select Layout > Preview in runtime from the Construction Workbench menu or click on the Preview button in the Window Layout toolbar. Be sure that you save changes by Committing Changes.
4-8
Committing Changes
To save the window (that is, commit all changes to the repository), select File > Commit from the Construction Workbench menu. You can also commit changes either by clicking on the Commit button Ctrl+M. in the toolbar or by typing
Now that the user interface is complete, we must write the rules to control the application. Continue with Chapter 5, Creating Rules.
4-9
4-10
CHAPTER
CREATING RULES
To create and edit the rules that control how the application executes, use the Rule Painter in the Construction Workbench. Creating a rule is similar to creating a procedure in a computer language (such as C or COBOL). The Rule Painter includes several tools for quickly building and testing rule statements. The common tasks in creating rules include: Using Rule Painter Adding a Client Rule Adding a Server Rule Verifying Rules For the sample application, you create the rule statements for the two rules, HELLO_CLIENT and HELLO_SERVER, as shown in Figure 3-12 on page 3-12.
Figure 5-1
The other rule objects are not used in the sample application.
Verify
Record Macro
In addition to using the toolbar, you can also add items to rules by using one of the following methods: Right-click in the Rule Painter window and select an item from the pop-up menu. Click on the Rule Painter window and select Tools from the Construction Workbench menu.
5-1
4.
To add the second procedure (Close), type the following procedure in the rule window. proc CloseButtonClick for Click object CloseButton (e object type ClickEvent) HELLO_WIN.Terminate endproc Your window should look like the one shown in Figure 5-2 on page 5-3.
5.
To save the rule, commit all changes to the repository. Select File > Commit from the Construction Workbench menu. You can also commit changes either by clicking on the Commit button typing Ctrl+M. in the toolbar or by
5-2
Creating Rules
Figure 5-2
HELLO_CLIENT rule
5-3
map INPUT_MESSAGE of HELLO_SERVER_IV to LOGSTRING print LOGSTRING map 'Received this message from HELLO_CLIENT: ' ++ INPUT_MESSAGE of HELLO_SERVER_IV to OUTPUT_MESSAGE of HELLO_SERVER_OV return Your window should look like the one shown in Figure 5-3.
Figure 5-3 HELLO_SERVER rule
HELLO_SERVER
HELLO_CLIENT
To save the rule, commit all changes to the repository. Select File > Commit from the Construction Workbench menu. You can also commit changes either by clicking on the Commit button typing Ctrl+M. in the toolbar or by
5-4
Creating Rules
Verifying Rules
Verifying Rules
AppBuilder includes two options for verifying rules before preparing the application: Verify Syntax Checks for valid syntax only Verify All Checks for valid syntax and valid hierarchy structure Use the Verification Language option to specify the execution environment (for example, C, Java, or COBOL) of the rule. 1. 2. Open the Rule Painter window for a rule. Right-click in the Rule Painter window for the rule and select Verification Language > Java. This ensures that AppBuilder verifies the rule for a C environment, since you are designing the Hello World Application as a standalone, Java application. You can also set the verification language by selecting Build > Verification Language > Java from the Construction Workbench menu. 3. Right-click in the Rule Painter window for the rule and select Verify Syntax or Verify All from the pop-up panel. You can also verify a rule by selecting Build > Verify Syntax or Build > Verify All from the Construction Workbench menu or by clicking on the Verify button in the Text toolbar. The system checks the rule and displays the results on the Verify tab of the Status window, as in Figure 5-4 on page 5-5.
Figure 5-4 Verify tab of Status window
If there are errors in the rules, double-click on the error or warning in the Status window. AppBuilder displays the associated line of the rule in the Rule Painter window. After verifying that all rules are correct, commit all changes to the repository. Continue with Chapter 6, Preparing and Executing the Application.
5-5
Verifying Rules
5-6
Creating Rules
CHAPTER
When AppBuilder prepares your application, it performs the following functions: Transforms the rules you have written in the Construction Workbench into an executable program Compiles the source code for any third-generation language components used by your rules Prepares any files your rules or components access, and creates their corresponding database tables Prepares the sets the application uses Makes available to the run-time environment the menus, icons, windows, and workstation reports that comprise your application end-user interface The common tasks in preparing and executing the application include: Setting Preparation Options Preparing the Application Executing the Application Depending on your planned deployment and execution environment, you may also be able to prepare mainframe rules for test execution on the workstation or check the syntax of mainframe rules. You can prepare a single element in the hierarchy (for example, a rule or function) or the complete application.
6-1
Figure 6-1
2.
Table 6-1 Field By default prepare as Standalone application What to enter Standalone application Java application Description The sample application runs locally on your PC and does not require connection to a database or server. AppBuilder prepares the application and rules to execute in a Java environment. The sample application runs locally on your PC and does not require connection to a database or server. Database type N/A Leave the other database fields (Database name, User name, and Password) blank. Use local database Leave blank
6-2
Table 6-1 Field Include mainframe rules What to enter Leave blank Description The sample application runs locally on your PC and does not require connection to a mainframe host.
3.
Click on OK.
If any object does not prepare successfully, right-click on the object and select Details. The system displays a detailed error report for the object. The Prep List tab maintains a history of each Prepare and SuperPrepare command submitted.
6-3
C Client Menu bar description from the HELLO_WORLD function (see the properties in Figure 3-5 on page 3-5)
The system also displays the following message: Do you wish to start the RuleView? RuleView is a debugger that can be used to test and debug an AppBuilder rule. Refer to the Developing Applications Guide for details on using RuleViewer. 2. 3. Click on No. From the execution client menu, select Hello World Application > HELLO_WORLD_PROC. The Hello World Application window appears, as in Figure 6-4.
Figure 6-4 Hello World Application
4.
Type your message in the Enter Input Message field and click on Call Server. The system copies your message to the Output Message from Server field.
5.
Congratulations! You have successfully developed an application using the AppBuilder environment. Refer to the other guides in the AppBuilder library for additional information on developing custom applications for your business.
6-4
CHAPTER
7
Note
For the sample application, we created an application that ran locally on your PC. This standalone application did not require a deployment configuration. This section explores some of the possible configurations if you were to deploy the sample application to other runtime environments (that is, a distributed application, one the that runs in a distributed environment)..
Although you can build the configurations in this section, you will not be able to run the application from your PC. These procedures are shown only as examples of the preliminary steps in developing an application that would involve possible configurations for deployment on other machines. The actual deployment is beyond the scope of this guide.
The configuration hierarchy associates client processes and logical servers with databases and physical machines, creating an application configuration. These partitions contain the necessary information to prepare the objects of the application hierarchy to the correct locations in a preparation network. Use the Configuration tab of the Hierarchy window to build the configuration hierarchy. The common tasks in creating the configuration hierarchy include: Using the Configuration Tab For detailed information on configuration options, refer to the Developing Applications Guide and Deploying Applications Guide.
7-1
To understand the Configuration tab, read about: Hierarchy Objects Toolbar Application Configuration Object Partition
Figure 7-2
Application Configuration
Partition
Server
Database
Rule
7-2
In addition to using the toolbar, you can also add objects to the configuration hierarchy by using one of the following methods: Right-clicking on an object in the configuration diagram and selecting Insert. Selecting an object in the configuration diagram and selecting Insert from the Construction Workbench. For detailed information on configuration objects, refer to the Deploying Applications Guide.
Partition
Partitions define the associations between a client or server and its associated machines or databases. Each partition must be associated with an application configuration. Client partitions Client partitions contain the processes of a project that execute on the client-side. When you add a process from the project hierarchy to the configuration, AppBuilder automatically includes all the necessary child objects (for example, rules or views). In addition, the client partition includes a machine object that indicates the client runtime environment. Although the server objects from the hierarchy are in the client partition, they are not prepared on the client, because they are included in the server. Server partitions Server partitions include a server object that defines the type of server (for example, an EJB server). In the server partition, processes and rules that execute on the server-side are included. During preparation, use the Project Options dialog (as in Figure 6-1 on page 6-2) to select the specific configuration and/or partitions to use.
7-3
7-4
Index
INDEX
AppBuilder 2.1.0 Getting Started Guide
A
adding buttons 4-7 to 4-8 edit fields 4-4 to 4-5 fields 3-10 to 3-12 functions 3-5 process 3-6 rules 3-7, 5-2, 5-4 static text 4-6 views 3-9 to 3-10 windows 3-8, 4-3 application configuration 7-3
F
fields adding 3-10 to 3-12 format 3-11 length 3-11 Screen Literal 3-11 format, fields 3-11 Function properties window 3-5 functions, adding 3-5
G
graphical user interface 4-1 graphical user interface (GUI) 2-2 GUI. see window
B
buttons adding 4-7 to 4-8
H
help online help 1-2 printable documentation 1-3 hierarchy application 3-1 committing 3-12 diagram 3-2 to 3-12 saving 3-12 toolbar 3-2 Hierarchy Function diagram window 3-6, 3-7, 3-8, 3-10, 3-12 hierarchy objects toolbar 3-1, 7-2 Hierarchy window 3-4
C
client rules adding 5-2 see also rules committing hierarchy 3-12 rules 5-4, 6-3 window 4-9 Configuration Diagram 7-2 Construction Workbench overview 2-2 window 2-2 creating. see adding
D
database. see repository documentation library 1-3
L
length, fields 3-11 library, documentation 1-3
E
edit field, adding 4-4 to 4-5
M
macros Map Wizard 5-3 see also rules
O
online books 1-3 online help, AppBuilder 1-2 options, workbench 2-3
P
partitions definition 7-3 types 7-3 Prep Status tab 6-3 preparation options 6-2 to 6-3 preparing 6-1 application 6-3 preview, windows 4-8 process, adding 3-6 project options 6-2 to 6-3 Project Options dialog 6-2 Properties - Field dialog 3-11 Properties - Function dialog 3-5 Properties window button 4-8 edit field 4-4 static text 4-6 window 4-3 push button. see buttons
static text adding 4-6 labels 4-6 status bar 2-2 Status window Prep Status tab 6-3 Verify tab 5-5 SuperPrepare. see prepare syntax of rules, verifying 5-5
T
Text toolbar 5-1 text, static 4-6 tool window 2-2 toolbars configuration objects 7-2 hierarchy 3-2 hierarchy objects 3-1, 7-2 Text 5-1 window 4-2
V
Verify tab 5-5 verifying rules 5-5 views, adding 3-9 to 3-10
W
window adding 3-8 buttons 4-7 to 4-8 committing 4-9 creating 4-3 edit fields 4-4 to 4-5 preview 4-8 static text 4-6 toolbar 4-2 Window Painter 4-1 see also window 4-1 workbench options 2-3 Workbench, Construction 2-2
R
Rule Painter 5-1 toolbar 5-1 window 5-3, 5-4 rules adding 3-7, 5-2, 5-4 committing 5-4, 6-3 tools 5-3 verifying 5-5 Rules window 5-4 RuleView 6-4
S
sample application, planning 2-3 saving. see committing Screen Literal fields 3-11 Security Validation Failed message 3-4 server rules adding 5-4 see also rules
ii