APPBUILDER2Standard AppBuilder Class

download APPBUILDER2Standard AppBuilder Class

of 237

Transcript of APPBUILDER2Standard AppBuilder Class

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    1/237

    1

    1

    AppBuilder

    Basic Training

    2006

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    2/237

    2

    Section 1Introduction to AppBuilder

    2

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    3/237

    3

    Who are BluePhoenix?

    Founded October 2001

    Leaders in IT Modernization solutions

    Owners of AppBuilder (formerly known as HPS)Previous owner was Level 8 Systems (98 01)

    Before that SEER Technologies (90 98)

    AppBuilder - key element in modernization story

    (Redevelopment)

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    4/237

    4

    What is AppBuilder?

    Repository based,

    application development toolsetand code generator

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    5/237

    5

    Analysis toolsData & process modelling, database design

    Development toolsWindow design, report design, code editor

    Testing toolsPC & mainframe based debugging

    Change management toolsWhat if? scenarios

    Application Development Tool

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    6/237

    6

    From a single sourceinput AppBuildercan generateJava, J2EE, C & Cobol

    Code Generator

    Clients MS Windows

    Java Virtual Machine

    Browser

    Java HTML C

    Java EJB C WebServices

    Servers MS Windows

    Unix

    Java Virtual Machine

    Web Server

    App Server

    Mainframe CICS

    IMS

    Batch

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    7/2377

    Every source object created using

    AppBuilder is stored in its own

    repository (internal database).

    When objects interact, relationships

    are formed and stored.

    Repository Based

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    8/2378

    Types of Repository

    PersonalFits on a PC

    Only you can see whats in it

    Needs to be synchronized with Enterprise Repository

    FreewayNeeds a Server

    Accessed by many developers

    Normally synchronized with Enterprise Repository

    EnterpriseLives on a mainframe

    Central to most AppBuilder environments

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    9/2379

    Repository Topologies

    Workgroup Personal &

    Enterprise

    Real time object sharingManual Upload / Download

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    10/23710

    The AppBuilder Solution

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    11/23711

    Immunity from technology changes

    More accurate application specification

    Re-use Faster development

    More flexible development

    Development cost savings

    Lower maintenance costs

    Benefits of using AppBuilder

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    12/23712

    Section 2Objects, Relationships

    & Attributes

    12

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    13/23713

    What is an Object?

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    14/23714

    What is an Object?

    Attributes

    AuditRemote

    AuditText

    Keywords

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    15/23715

    Properties of an Object

    Each object has

    different

    set of properties

    Refer to

    documentation

    for full list

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    16/237

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    17/237

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    18/23718

    What is a Relationship?

    Attributes

    AuditRemote

    AuditText

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    19/237

    19

    Attributes of a Relationship

    No System Id

    No Name

    Identified usingName of Parent

    + Name of Child

    Sequence NumberIndicates position insibling list

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    20/237

    20

    Repository Security

    User Group Project

    Objects (and relationships) are kept secure

    inProjectswhich can only be updated by

    certainGroupsofUsers.

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    21/237

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    22/237

    22

    Audit Information

    W h e r e ?

    W h o ?

    W h e n ?

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    23/237

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    24/237

    24

    Section 3Construction Workbench &

    Hierarchy Diagrammer

    24

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    25/237

    25

    Starting AppBuilder

    1.

    2.

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    26/237

    26

    Integrated Development

    Hierarchyspace

    Tool area

    e.g. Window Painter

    Rule Editor

    Preparation results

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    27/237

    27

    Hierarchy Diagrammer

    Critical in AppBuilder development

    Way of viewing objects in the repository

    Way of creating new objects in the

    repository

    PressF4to open theHierarchy Diagrammer

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    28/237

    28

    Relationship

    Child object

    Expand/Contract

    Siblings

    Parent object

    Object Type

    Parts of a Hierarchy

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    29/237

    29

    Building a Hierarchy 1

    Type in name of new

    object. No spaces or - Use_ Press Insert to place in

    Hierarchy

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    30/237

    30

    Building a Hierarchy 2

    Do not use in Query

    Can use %%

    Use Shift orCTRL tochoose multiples

    Press Insert to place in

    Hierarchy

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    31/237

    31

    Example Relationships

    ViewField

    ViewView

    WindowViewWindowSet

    RuleView

    RuleWindowRuleSet

    RuleComponent

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    32/237

    32

    Commit & Rollback

    Commit your workCTRL + M

    Repository

    Commit (CTRL + M)

    Rollback

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    33/237

    33

    Before pressing DELETE After pressing DELETE

    Right ClickClear has the same effect

    Collapses children into parentUseful for hiding things

    Some useful keys

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    34/237

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    35/237

    35

    Inverted Hierarchy (CTRL+ALT+I)

    Shows parents of objectsUseful for identifying reuse

    May not be complete list

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    36/237

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    37/237

    37

    Removing a relationship

    Right Click on it

    Choose Delete Relationship

    Confirm or reject

    Both the parent & child objects still exist in Repository

    1.Highlight the child object

    Press CTRL + Backspace

    Confirm or reject

    2. or 2.

    x

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    38/237

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    39/237

    39

    Before deleting Field: NAME After deleting Field: NAME

    Removing an object (from the repository)

    Deleting an object from the repository also

    deletes all the relationships that object had

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    40/237

    40

    Section 4AppBuilder Objects

    40

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    41/237

    41

    AppBuilder Data Model

    43 types of object

    51 types of relationship

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    42/237

    42

    Simplest object type in AppBuilder

    Represents a variable

    Mandatory properties

    o

    Nameo Format

    o Length

    Optional properties

    o Literal valueso Ranges

    Implementation Name = Column name in Table

    Only possible parent is a View

    The Field Object

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    43/237

    43

    The View Object Used to group together Fields

    A View MUST have at least one childeither

    another View or a Field

    Mandatory properties

    o Name

    Possible parents are View, Rule, Window and

    Component

    Example View

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    44/237

    44

    Represents a user interface (window)

    In order to display data, a Window MUST have

    only one child View (normally suffixed _W)

    Mandatory properties

    o Name

    Only possible parent is a Rule

    The Window Object

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    45/237

    45

    A program

    Written in the AppBuilder Rules language

    Mandatory properties

    o Nameo Implementation Name (8 characters only)

    Possible parents are Rule & Process

    The Rule Object

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    46/237

    46

    A program

    Written in Java, Cobol, C, PL/1 or Assembler

    Mandatory properties

    o Name

    o Implementation Name (8 characters only)

    o Language

    Possible parents are Rule & another Component

    The Component Object

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    47/237

    47

    A collection of static values and their meanings

    Mandatory properties

    o Name

    o Implementation Nameo Format & Length

    o Style

    Possible parents are Rules, Components &

    Windows

    The Set Object

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    48/237

    48

    Section 5Painting Windows

    48

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    49/237

    49

    Window Hierarchy

    Window object MUST onlyhave 1 View attached to it.

    Named same as Window + _W

    Attach Data Views to thisView, not to the Window.

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    50/237

    50

    How to Paint WindowsTo open the Window painter

    Highlight the Window & press Enter

    Use the black grab

    boxes to re-size the

    window.

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    51/237

    51

    Double Click

    here to display

    Window

    Attributes

    Window Attributes

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    52/237

    52

    Window Attributes

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    53/237

    53

    Do not delete

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    54/237

    54

    Placing Objects on Windows

    Highlight thefield(s). Drag &

    drop onto window

    Click &

    drop these

    objects

    onto the

    window

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    55/237

    55

    Window Object Attributes

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    56/237

    56

    Do not delete

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    57/237

    57

    Window Painter Objects

    Edit

    Field

    MultiLine

    Edit

    Field

    Combo

    Box

    List

    Box

    Check

    Box

    Radio

    Button

    Push

    Button

    MCLB

    ChartStatic

    Text

    Group

    Box

    Square

    Ellipse

    Select

    Bitmap

    Preview

    Runtime

    Align

    Left

    Align

    Right

    Align

    Top

    Align

    Bottom

    Centre

    Vertically

    Centre

    Horizontally

    Distribute

    Horizontally

    Distribute

    Vertically

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    58/237

    58

    Do not delete

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    59/237

    59

    Do not delete

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    60/237

    60

    Do not delete

    Th LINK

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    61/237

    61

    The LINK

    Link

    No LINK, no data

    T bbi O d (CTRL + T)

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    62/237

    62

    Tabbing Order (CTRL + T)

    Use the up & down arrows

    to change Tab order.

    Natural Tab order is top left

    to bottom right.

    M Edit (CTRL + U)

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    63/237

    63

    Menu Editor (CTRL + U)

    Use these to structure the menus.

    Textwhat the user sees

    HpsIDwhat the Rule receives

    Pop-up looks

    like this

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    64/237

    64

    A l t K

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    65/237

    65

    Accelerator Keys

    Menu Items

    Push Buttons

    Panel Layout (Alt + L)

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    66/237

    66

    Panel Layout (Alt + L)

    Position the window relative to the screen. Note the screen sizes.

    Window position can be changed at runtime.

    Other Window Painter tools

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    67/237

    67

    Other Window Painter tools

    Guide Settings (Grid)

    CTRL + G

    Preview in Runtime

    CTRL + V

    VerifyAlt + F7

    Workbench Window Painter

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    68/237

    68

    Workbench Window Painter

    Options

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    69/237

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    70/237

    MultiColumn Listbox Editor

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    71/237

    71

    MultiColumn Listbox Editor

    MCLBs and D namic Vie s

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    72/237

    72

    MCLBs and Dynamic Views

    ID FIRST_NAME LAST_NAME

    ID FIRST_NAME LAST_NAME

    ID FIRST_NAME LAST_NAME

    Produces

    Appendstatement

    produces..

    Creating HTML Windows

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    73/237

    73

    Creating HTML Windows

    Modifying HTML Windows

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    74/237

    74

    Modifying HTML Windows

    Executing HTML Windows

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    75/237

    75

    Web Server

    Browserhttp://myserver/Customer_Details_DisSvlt

    prepare & deploy

    HTML

    Executing HTML Windows

    Window Flow Diagrammer

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    76/237

    76

    Window Flow Diagrammer

    WFD allows you test & simulate the window flow without writing code

    Window Flow Diagrammer

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    77/237

    77

    Window Flow Diagrammer

    Window Flows

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    78/237

    78

    Window Flows

    Normal

    Flow

    Detached

    Flow

    Nested

    Flow

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    79/237

    79

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    80/237

    80

    Section 6AppBuilder Rules &Rules Language

    80

    What is an AppBuilder Rule ?

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    81/237

    81

    What is an AppBuilder Rule ?

    Its a Program

    Written in AppBuilder Rules Language

    Simple

    Easy to learn Does 85% of what you want very easily

    Procedural, not OO

    Generates into either Java, J2EE, Cobol or C

    Rules Code Editor

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    82/237

    82

    Rules Code Editor

    Line & Column

    Double Click

    Enter

    Creating a Rule Option 1

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    83/237

    83

    Creating a RuleOption 1

    Right Click

    Creating a Rule Option 2

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    84/237

    84

    Creating a RuleOption 2

    Insert new Rule name here

    Comments & Text

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    85/237

    85

    // Write a comment like this

    *> Or like this

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    86/237

    Declaring Local Variables

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    87/237

    87

    Declaring Local Variables

    dclL_FIELD1 char(17);

    L_FIELD2 integer;L_FIELD3 Boolean;

    L_FIELD4 pic 9999;

    L_FIELD5 date;

    L_VIEWview containsL_FIELD1,

    L_FIELD2;

    enddcl

    Local variables can be declared in a Rule, though most

    variables you will use will be in the Rules Hierarchy

    Referencing Variables

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    88/237

    88

    Referencing Variables

    FIELD1of A_DATA_VIEWof A_VIEW

    or

    A_VIEW.A_DATA_VIEW.FIELD1

    Whilst coding this Rule

    You want to reference this

    Field

    Moving data around

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    89/237

    89

    Moving data around

    Set FIRST_NAME := Bob

    or

    MapBobto FIRST_NAME

    The IF Statement

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    90/237

    90

    ifHPS_EVENT_VIEW.EVENT_SOURCE =OK

    use rule CUSTOMER_DETAILS_DIS

    elsereturn

    endif

    The IF Statement

    IF condi t ionstatements

    [ELSE]

    statements

    ENDIF

    The CaseOf Statement

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    91/237

    91

    CaseOf variablename

    Casevalue

    statements

    Casedif ferent valuestatements

    [CaseOTHER]

    statements

    EndCase

    The CaseOf Statement

    The DO Statement

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    92/237

    92

    The DO Statement

    DO [from n to n [index variable] ]statements

    [WHILE]

    statements

    ENDDO

    do from1to10indexL_COUNTER

    set CUSTOMER_DATA.FIRST_NAME(L_COUNTER) := Mike

    enddo

    Defining Procedures in Rules

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    93/237

    93

    To define

    Proc proc edure name[(parameter datatype), :output type]

    [dclenddcl]

    statements

    EndProc

    To call

    procedure name[(inputdata)]

    To return

    proc return

    Defining Procedures in Rules

    Displaying Windows

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    94/237

    94

    Displaying Windows

    All code in a Window display Rule MUST be writtenin a Procedure

    There can be many Procedures in a Rule

    The Window is displayed automatically when the

    Rule starts Window events are handled by event procedures

    Event Procedures

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    95/237

    95

    Event Procedures

    A Procedure which is automaticallyexecutedwhen an event occurs on a Window.

    proc ReturnClickfor Clickobject RETURN_PB

    ( e object type ClickEvent )

    code

    endproc

    Name of Procedure

    Event Type

    Object on which to listen

    Reference to the

    object which

    triggered the event

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    96/237

    Example Window Display Code

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    97/237

    97

    Example Window Display Code

    Procedure When is it executed?Pre-loop When the window triggers the initialiseevent

    Pre-converse 1. After pre-loop

    2. Each time the window triggers the

    converseevent

    Post-converse Each time the window triggers the

    converse event

    Post-loop When the window triggers the terminateevent

    Suggested structure for Rules which display Windows

    Use Rule Statement

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    98/237

    98

    The called Rule must be a child of the calling Rule.

    Use Rule Statement

    Use Rule ru lename[Nest] [Detach]

    e.g.

    Use RuleT0_CAR_DETAILS_DIS

    Nest & Detach

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    99/237

    99

    Nest & Detach

    Use rule RULE_2

    Use rule RULE_2 DETACHUse rule RULE_2 NEST

    Putting it all together

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    100/237

    100

    1

    Putting it all togetherRule / Window Interaction

    2

    6

    4

    3Use Rule Customer_Details Nest

    5Return

    Putting it all together

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    101/237

    101

    Putting it all together2 ways of Capturing Window Events

    proc CancelClickfor Clickobject CANCEL_PB( e object type ClickEvent )

    code

    endproc

    If EVENT_SOURCE= CANCEL_PB

    code

    Endif

    Putting it all together

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    102/237

    102

    dcl

    skipDisp boolean;exitLoop boolean;

    exitRule boolean;

    enddcl

    proc preLoop

    endproc

    proc preConverse

    endproc

    proc postConverse

    endproc

    proc postLoop

    endproc

    proc for initialize type window(p object type initializeEvent)

    preLoop

    if exitLoopor exitRule

    CUSTOMER_LIST.terminate

    proc return

    endif

    do

    preConverse

    if exitLoopor exitRule

    CUSTOMER_LIST.terminate

    proc return

    endif

    while skipDisp

    postConverse

    if exitLoopor exitRule

    CUSTOMER_LIST.terminate

    proc return

    endif

    enddo

    endproc

    Putting it all together

    Putting it all together

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    103/237

    103

    proc for converse type window

    (p object type converseEvent)

    do

    postConverse

    if exitLoopor exitRule

    CUSTOMER_LIST.terminate

    proc return

    endif

    preConverse

    if exitLoopor exitRule

    CUSTOMER_LIST.terminate

    proc return

    endif

    while skipDisp

    enddo

    endproc

    proc for terminate type window

    (pobject type terminateEvent)

    if exitRule

    proc return

    endif

    postLoop

    endproc

    proc PushButtonClickfor Clickobject EXIT_PB

    ( eobject type ClickEvent)

    set exitLoop:=true

    proc return

    endproc

    proc PushButtonClickfor Clickobject SELECT_PB

    ( eobject type ClickEvent)

    use rule CUSTOMER_DETAILS_DISnest

    proc return

    endproc

    Putting it all together

    Rules Code Verify (Alt + F7)

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    104/237

    104

    Rules Code Verify (Alt F7)

    Alt+F7 to Verify Checks hierarchy Checks code

    Top 5 Verify Errors1. Multiple Input / Output

    Views

    2. Invalid Map Statements3. Spelling mistakes

    4. No EndIf, EndCase, EndDo

    etc

    5. Invalid syntax

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    105/237

    105

    Section 7Views & Fields

    105

    Reminderwhats a View?

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    106/237

    106

    e de at s a e

    In most programming languages you declarevariables within code.

    You can do this in AppBuilder with DCLENDDCL

    Better way is to add Views to Rules.

    Promotes object re-use

    Cleaner code

    View is a collection of Fields & subordinate Views

    Reminderwhats a View?

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    107/237

    107

    Views are attached to

    Rules like this

    Views attached to Rules

    rarely contain Fields,they usually contain

    child Views, which then

    contain Fields.

    Types of View

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    108/237

    108

    View Type Description

    yp

    Window (_W) Attached to a Window, data is only accessible by the

    parent Rule of the Window

    Work (_K) Attached to a Rule. Fields are private to the Rule and

    can only accessed by the Rule

    Input (_I) Attached to a Rule. Fields can be accessed by the

    Rule and its parent Rules.

    Output (_O) Attached to a Rule. Fields can be accessed by the

    Rule and its parent Rules.

    Global (_G) Attached to many Rules. Fields can be accessed by

    any Rules to which the Global View is attached.

    Data Attached to other Views. A data view contains Fields,whilst most of the above Views do not.

    Work Views

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    109/237

    109

    A Work View is private to the Rule which owns it

    Rules can have many Work Views Normally suffixed_K

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    110/237

    Input Views

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    111/237

    111

    p

    An Input View is shared between a Parent and Child Rule

    It is used to pass data FROM the parent TO the child It mustbe a child of the child Rule

    A Rule can only have one Input View

    CUSTOMER_LIST_DIS passes data into CUSTOMER_DETAILS_DIS_I

    CUSTOMER_DETAILS_DIS can access CUSTOMER_DETAILS_DIS_I

    Output Views

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    112/237

    112

    p

    An Output View is shared between a Parent and Child

    It is used to pass data from the child backto the parent It mustbe a child of the child Rule

    A Rule can only have one Output View

    CUSTOMER_DETAILS_DIS puts data into CUSTOMER_DETAILS_DIS_O

    CUSTOMER_LIST_DIS can access CUSTOMER_DETAILS_DIS_O

    More on Input & Output Views

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    113/237

    113

    p p

    An Input View is populated by a Parent Rule The data in an Input View is used by the Child Rule

    An Output View is populated by a Child Rule

    The data in an Input View is used by the Parent Rule

    Input & Output View Law

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    114/237

    114

    p p

    1 Input View per Rule1 Output View per Rule

    Never re-use Input or Output Views

    Q. What data needs to be passed TO the Rule?

    A. Input View structure

    Q. What data is passed back FROM the Rule?

    A. Output View structure

    View Usage Parameter

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    115/237

    115

    g

    Getting data into variables

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    116/237

    116

    g

    Set FIRST_NAME := Mikeor

    MapMiketo FIRST_NAME

    SetA_Numeric_Field :=123

    SetA_Character_Field := Blue

    Set A_Field :=Another_Field

    SetView :=View

    SetOccurring_View(3) :=Occurring_View(3)

    SetOccurring_View :=Occurring_View

    Map123 toA_Numeric_Field

    MapBlue toA_Character_Field

    Map A_Field toAnother_Field

    MapView toView

    MapOccurring_View(3) toOccurring_View(3)

    MapOccurring_View toOccurring_View

    Qualification of Data

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    117/237

    117

    Set FIRST_NAME :=Mike

    Set CUSTOMER_DATA.FIRST_NAME:=Mike

    Set CUSTOMER_DISPLAY_W. CUSTOMER_DATA.FIRST_NAME

    := Mike

    I want to get data in here

    Copying View-to-View

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    118/237

    118

    py g

    Set View2:= View1

    Making Coding Easy

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    119/237

    119

    g g y

    Views & Fields CTRL + Shift + V

    AppBuilder Set-up

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    120/237

    120

    Whats legal, whats not

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    121/237

    121

    SMALLI NT INT EGER DECI MAL CHAR VARCHAR PI C (signed)

    PIC

    (unsigned) DATE TIME TIMESTAMP

    SMALLINT L L L E E L W E E E

    INTEGER W L L E E L W E E E

    DECIMAL W W L E E L W E E E

    CHAR E E E L L E E E E E

    VARCHAR E E E L L E E E E E

    PIC (signed) L L L E E L W E E E

    PIC (unsigned) L L L L L L L E E E

    DATE E E E E E E E L E E

    TIME E E E E E E E E L E

    TIMESTAMP E E E E E E E E E L

    L=Legal W=Warning E=Error

    The Overlay Statement

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    122/237

    122

    06373Tom Jones Mr M 230643Entertainer

    06373TomJones

    MrM230643Entertainer

    overlay CUSTOMER_RECORDto CUSTOMER_DATA

    A Rules Data Scope

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    123/237

    123

    Rules can access

    Their Work View(s)

    Their Output View

    Their Global View(s)

    Their Window View

    Their Input View

    Their child Rules Input Views

    Their child Rules Output Views

    NOT their grandchild Rules Input & Output Views

    Local Variables (DCL)

    Data Initialisation

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    124/237

    124

    Local variables (DCL), Work views (_K) and Outputviews (_O) are initialised every time a rule is called and

    before any code is executed

    The input view of a Rule is initialised by the parent Rule

    Global views are initialised once when the application

    starts

    In Java, all variables are initialised to NULL, though initial values areassumed - spaces for character fields, 0 for numeric fields.

    See AppBuilder.INISHOW_ZERO_ON_NULL and PROPAGATE_NULL_TO_DATABASE values

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    125/237

    125

    Section 8

    AppBuilder Functions

    125

    CLEAR Statement

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    126/237

    126

    Sets a variable (Field) or a collection of

    variables (View) to spaces or zeros

    Clear Fieldname or Clear Viewname

    e.g. Clear CAR_DATA of T0_CAR_LIST_W

    Corresponding functionISCLEAR

    Checks if a variable is set to its initial value orwhether it has changed

    Operators

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    127/237

    127

    = Equals

    > Greater Than

    < Less Than Not Equal

    = Greater Than or Equals

    + Add

    - Subtract

    / Exact Division

    * Multiply

    ** Exponential

    DIV Integer DivisionMOD Provides Modulus

    NOT

    AND

    OR

    Order

    of

    Precedence

    AppBuilder Functions

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    128/237

    128

    INT Converts to Integer

    DECIMAL Converts to DecimalCEIL Returns next highest number

    FLOOR Returns next lowest number

    ROUND Rounds up or down

    TRUNC Truncates significant digits

    ++ Concatenate 2 strings

    RTRIM Truncate a string

    STRLEN What is the length of a string?

    UPPER Convert string to upper case

    LOWER Convert string to lower caseSTRPOS Searches for string & returns start position

    VERIFY Compare 2 strings

    SUBSTR Copy out a substring from a string

    CHAR Converts to character

    Date & Time

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    129/237

    129

    AppBuilder stores the date as an integerwhich is the number of days since

    01/01/0001

    AppBuilder stores the time as an integer

    which is the number of seconds elapsed

    since 00:00

    Date Functions

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    130/237

    130

    Date Returns current date

    Char Converts date field to character

    Int Converts date field to integer

    Day Returns day of the month from given date

    MonthReturns month from given date

    Year Returns year from given date

    Day_of_Year Returns Julian day

    Day_of_Week Returns number between 1 & 7

    Time Functions

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    131/237

    131

    Time Returns current time

    Char Converts time field to character

    Int Converts time field to integer

    Hours Returns the hour from given time

    Minutes Returns the minute past the hour from given time

    Seconds Returns the number of seconds elapsed in thecurrent minute from given time

    Seconds_of_Day Seconds elapsed since midnight

    Minutes_of_Day Minutes elapsed since midnight

    Date Format Strings

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    132/237

    132

    %Y Year with century%M Month name (January, February etc)

    %D Ordinal day (1st2nd3rdetc)

    %W Day name (Monday, Tuesday etc)%0d Day with leading zero (01,02, 03 etc)

    %m Monthwith no leading zero (1,2,3 etc)

    Using Date & Time Functions

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    133/237

    133

    A_DATE_FIELD:= Date

    Result in A_DATE_FIELD = 3045

    A_CHAR_FIELD :=

    Char(A _DATE_FIELD,%0d/%0m/%Y)

    Result in A_CHAR_FIELD = 25/09/2002

    View APPEND

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    134/237

    134

    ID FIRST_NAME LAST_NAME

    ID FIRST_NAME LAST_NAME

    + =

    ID FIRST_NAME LAST_NAME

    View Replace & Insert

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    135/237

    135

    ID FIRST_NAME LAST_NAME

    ID FIRST_NAME LAST_NAME

    Replace (3) =

    ID FIRST_NAME LAST_NAME

    ID FIRST_NAME LAST_NAMEInsert (3) =

    ID FIRST_NAME LAST_NAME

    ID FIRST_NAME LAST_NAME

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    136/237

    136

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    137/237

    137

    Section 9

    Writing SQL in Rules

    137

    Rule Name & Properties

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    138/237

    138

    Default

    DBMS usage = Not Applicable

    Change to DB2 for SQL

    Rules

    Prepare will not work otherwise.

    Rule name should have SQL in it somewhere. Also an indication

    of what type of statements would be useful.

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    139/237

    SQL ASIS Block

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    140/237

    140

    SQL ASISWrite your SQL Statements here

    ENDSQL

    SQL Builder (CTRL + Shift + B)

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    141/237

    141

    File Objects

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    142/237

    142

    Name of Table

    Alt + Enter

    Alt + Enter

    SQL Builder

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    143/237

    143

    Choose Tables (Files) &

    Choose Columns (Fields)

    If this is blank, then you havent got

    any File objects attached to the Rule

    Define a where clause

    You may specify joins if you wish, by

    using the And / Or radio buttons

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    144/237

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    145/237

    145

    Section 10AppBuilder Set Objects

    145

    Sets

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    146/237

    146

    Collection of values

    Each value has a meaning in the Set

    0

    100

    -803

    -818

    -802

    Red

    Blue

    Green

    Pink

    Yellow

    Set of SQL Codes Set of Colours

    Sets

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    147/237

    147

    Each value has a meaning in the Set

    The same value might appear in multiple Sets,but have different meaning

    Multiples of 3 Multiples of 5

    3

    9

    615

    2130

    24 27

    18

    12

    510

    25

    2015

    30

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    148/237

    Set Properties

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    149/237

    149

    Name of Set

    Format

    Length

    Style

    (Like Fields)

    Set Styles

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    150/237

    150

    Values Older style Set. It has a hierarchy ofValue objects beneath it.

    Define Simplest Set. Two columnsDefine andEncoding.

    LookUp Used for Combo-box and MCLB celldomains. Has extra Display column.

    Error Like LookUp Set, has extra Displaycolumn, but used for standardising error

    messages in an application.

    Values Sets

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    151/237

    151

    CTRL+ Enter

    Alt + Enter

    Define Sets

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    152/237

    152

    Define is the meaning (always UPPER) Encoding is the value

    Double-Click

    LookUp Sets

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    153/237

    153

    Define is the meaning (always UPPER)

    Encoding is the value

    Display is what you see on a Window

    Double-Click

    Error Sets

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    154/237

    154

    Define is the meaning (always UPPER) Encoding is the value

    Display is the message which will be

    displayed to the user

    Double-Click

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    155/237

    Domains for MCLB columns

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    156/237

    156

    Using Sets

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    157/237

    157

    SQLCA.SQLCODE := 0

    SQLCA.SQLCODE:=SuccessinSQLCODES

    Use in Rules code instead of hardcoding values

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    158/237

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    159/237

    159

    Section 11Rules Language -ObjectSpeak

    159

    What is ObjectSpeak?

    A t f J lik f ti ithi th

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    160/237

    160

    A set of Java-like functions within the

    AppBuilder Rules language.

    Methods and properties are available for all

    these object types

    Accelerator

    CheckBox

    Color

    Column

    ComboBoxConstants

    Dimension

    EditField

    Locale

    Menu

    MenuBar

    MenuItem

    MessageBoxMultiLineEdit

    PasswordField

    Point

    Ellipse

    Font

    Format

    GlobalEvent

    GroupBoxGuiObject

    Label

    ListBox

    PopupMenu

    PushButton

    RadioButton

    Rectangle

    RuleTable

    Timer

    Supporting Objects

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    161/237

    161

    AcceleratorFormats (Derived)

    Color

    GlobalEvent

    ConstantsLocale

    Dimension

    Point

    Font

    These objectsare used with

    other objects.

    e.g. BackgroundColor is an

    attribute of an EditField,

    but is set using an

    instance of the Color

    object.

    Object Properties

    E h bj t h t f ti

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    162/237

    162

    Each object has a set of properties

    Properties are referenced asobjectname.propertyname (ob jectname = HPS ID)

    To set a property

    SelectPB.Visible(True) or set SelectPB.Visible := True

    To get a property

    set a_variable := SelectPB.Visible

    Object Methods

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    163/237

    163

    Each object has a set of methods

    Methods are referenced as

    objectname.methodname( [parameters])(where objec tname = HPS ID)

    Some common Methods

    Window

    setLocation(Point)

    setAltered(Boolean)

    clearAltered( )

    clearWindowChanges( )

    terminate( )

    EditField

    setEnabled(Boolean)

    setFormat(Format)

    setShortHelp(String)

    setFocus( )

    setAltered(Boolean)

    PushButton

    setEnabled(Boolean)

    setIgnoreValidation(Boolean)

    setShortHelp Method

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    164/237

    164

    Provides pop-up help for an object based on

    cursor positionotherwise known as tool tips

    Objectname.setShortHelp(This is the title

    field, right click to see valid values)

    or

    Set TitleHelp :=This is the title field, right

    click to see valid values

    Objectname.setShortHelp(TitleHelp)

    Object Events

    Obj t t i t h th d

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    165/237

    165

    Objects trigger events when they are used

    Events are handled using Event Procedures

    Event procedures are defined either for an

    object class or an object instance

    proc PushButtonClickfor Clicktype PushButton

    ( e object typeClickEvent )

    statements

    endproc

    procPushButtonClick forClick objectEXIT_PB

    ( e object typeClickEvent )

    statements

    endproc

    Generic

    Specific

    Declaring Event Procedures

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    166/237

    166

    Declare your event procedures in the DCL

    block if you want to define a procedure for

    Multiple events

    Multiple objects

    Multiple object typesdcl

    procedurenamePROC FOR ClickOBJECT objectname;

    enddcl

    dcl

    procedurenamePROC FOR ClickTYPE objecttype;

    enddclGeneric

    Specific

    Declaring Event Procedures

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    167/237

    167

    Declare your event procedures in the DCL

    block if you want to define a procedure for

    Multiple events

    Multiple objects

    Multiple object typesdcl

    procedurenamePROC FOR ClickOBJECT objectname;

    enddcl

    dcl

    procedurenamePROC FOR ClickTYPE objecttype;

    enddclGeneric

    Specific

    dcl

    ObjectSpeak Examples

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    168/237

    168

    myRed asobject type Color;enddcl

    set myRed := new Color(255,23,23)CustIdFld.setBackGround(myRed)

    dclOpenAccelerator asobject typeAccelerator;

    enddcl

    set OpenAccelerator:= newAccelerator(O, Accelerator.CTRL)OpenMenuItem.SetAccelerator(OpenAccelerator)

    procMaleClickfor ClickobjectMaleCheckBox(eobject type ClickEvent)

    ifMaleCheckBox.Selected =Trueset FemaleCheckBox.Enabled:=Falseelseset FemaleCheckBox.Enabled:= Trueendifendproc

    Dynamic Window Objects

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    169/237

    169

    You can place objects on a Window at runtime

    1. Declare object reference (or alias)

    2. Create new instance of object

    3. Set location

    4. Set other properties5. Add as child of the Window

    6. Declare an Event Handler for the object

    Dynamic Window Objects

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    170/237

    170

    dclCancelPB object type PushButtonPushButtonClickprocforClick typePushButton

    (e object typeClickEvent);enddcl

    set CancelPB := new PushButtonCancelPB.setHpsID('CANCEL_PB')

    CancelPB.setLocation(25,257) //from left, from topCancelPB.setSize(88,25) //width, heightCancelPB.setText('Cancel')CUSTOMER_DETAILS.addChild(CancelPB)

    handler CancelPB(PushButtonClick)

    Proc PushButtonClickfor Clicktype PushButton(eobject type ClickEvent)ife.HPSID = CANCEL_PBset exitRule := Trueproc return

    EndProc

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    171/237

    Using JavaBeans on Windows

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    172/237

    172

    Using JavaBeans on Windows

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    173/237

    173

    The MessageBox Object

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    174/237

    174

    1. Create messagebox

    2. Set type of message

    3. Set push button combination

    4. Set text of message

    5. Set any arguments in text6. Display messagebox

    Object type: MessageBox

    Methods: SetMessageType, SetButtonType, SetTitle

    SetParent, SetMessage, Show, SetArgument1, 2, 3

    Usage: MessageBox.Show

    The Pop-Up Menu Object

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    175/237

    175

    Can be Window pop-up or

    Object pop-up

    1. Create pop-up menu

    2. Build it (MenuItems)3. Allocate it to an Object

    4. Write code to handle items

    Object type: PopupMenu

    Methods: add( Item:MenuItem )

    addSeparator( )

    Usage: ObjectName.setPopupMenu(Name of PopupMenu )

    The Timer Object

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    176/237

    176

    Can be Window pop-up orObject pop-up

    1. Create pop-up menu

    2. Build it (MenuItems)3. Allocate it to an Object

    4. Write code to handle items

    The Rule Object

    I A B ild t d J li ti

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    177/237

    177

    In an AppBuilder generated Java application,

    Rules become Classes Rules are Objects

    The Rule object in the Rules Language is your

    way of interfacing to the executing classes.

    The Rule object has

    0 Properties

    10 Events19 Methods

    The Rule Object - thisrule

    The current executing Rule

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    178/237

    178

    The current executing Rule

    Some useful methods:

    terminate() Stops rule and returns to parent

    getWindow( ) Returns an object reference tothe window displayed by the Rule

    getActiveWindow( ) Returns an object

    reference to the non-detached window most

    recently opened by a rule or

    its parents.

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    179/237

    179

    Section 12Components

    179

    Types of Component

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    180/237

    180

    User You write them Java, Cobol, C, PL1, Assembler

    System Written by BluePhoenix

    Supplied as objects in repository and as

    classes in AppBuilder.JAR

    Using System Components

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    181/237

    181

    1. Include in Hierarchy

    2. Populate Input View

    3. Call Component4. Either check RETURN_CODE or use the

    data returned in Output View

    Component Examples 1

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    182/237

    182

    Use in conjunction with

    these 2 Sets

    Component Examples 2

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    183/237

    183

    Use in conjunction with this Set

    Component Examples 3

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    184/237

    184

    Use in conjunction with these Sets

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    185/237

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    186/237

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    187/237

    Object Preparation Right-Click

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    188/237

    188

    Object Preparation

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    189/237

    189

    AppBuilder

    CodeGen

    Java

    J2EE

    CobolC

    Compiler

    .class

    .class

    load module.dll

    Preparation Steps

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    190/237

    190

    1. Verify Hierarchy2. Create Bindfile

    3. Verify Source Code

    4. Generate Code5. Compile

    6. Move class to runtime directory

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    191/237

    General Preparation Options

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    192/237

    192

    General Preparation Options

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    193/237

    193

    Configuration Projects

    Provide way of dynamically configuring applications

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    194/237

    194

    No Project open Project (BPSIS) open

    y y y g g pp

    Must be used for Servlet, EJB and remote preparations Do not confuse with security Projects

    Preparation without ConfigurationProjects

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    195/237

    195

    1. ToolsWorkbenchOptions

    2. Preparation tab

    3. Choose options

    4. All Rules assume sameoptions

    Not very flexible

    Preparation with Configuration Projects

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    196/237

    196

    1. Create a new Project1. Create a new Project2. Populate options

    3. Build Project Hierarchy

    1. Create a new Project2. Populate options

    Very flexible

    Configuration Objects

    Defines configuration of an application

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    197/237

    197

    Defines configuration of an application

    An Application Configuration can include many Partitions

    Each Partition will need to be prepared on a specific Machine

    If the Partition is a client Partition, it will have a child Process

    If the Partition is defined as a Server, it will have a child Server

    This is interface Ruleyou only see these if you use

    Gateway Partitions

    Rules to be prepared as client Rules are shown like this

    A Partition may include a Database

    Rules to be prepared as server Rules are shown like this

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    198/237

    Server Partitions

    Used to prepare server

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    199/237

    199

    Partition Type

    Server

    Server Interface

    RMI

    WebServiceEJB

    Language

    Java

    portions of an application

    Server Partitions

    CUSTOMER SQL SEL generated as a Remote Service (RMI)

    CUSTOMER SQL SEL generated as a WebService

    CUSTOMER SQL SEL generated as an EJB

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    200/237

    200

    CUSTOMER_SQL_SEL generated as a Remote Service (RMI)

    Import Statements in Customer_Sql_Sel_R.java

    import com.level8.appbuilder.server.*;

    import com.level8.appbuilder.*;

    import com.level8.appbuilder.systemviews.*;

    import com.level8.appbuilder.util.*;

    public final class Customer_Sql_Sel_R extends HpsServerRule

    CUSTOMER_SQL_SEL generated as a WebService

    Import Statements in Customer_Sql_Sel_R.java

    import com.level8.appbuilder.servlet.*;

    import com.level8.appbuilder.*;

    import com.level8.appbuilder.systemviews.*;

    import com.level8.appbuilder.util.*;

    public final class Customer_Sql_Sel_R extends HpsServletRule

    CUSTOMER_SQL_SEL generated as an EJB

    Import Statements in Customer_Sql_Sel_R.java

    import com.level8.appbuilder.server.*;

    import com.level8.appbuilder.*;

    import com.level8.appbuilder.systemviews.*;

    import com.level8.appbuilder.util.*;

    public final class Customer_Sql_Sel_R extends HpsServerRule

    Import Statements in Customer_Sql_Sel_REjb.java

    import com.level8.appbuilder.util.HpsView;

    import com.level8.appbuilder.HpsRule;

    import com.level8.appbuilder.HpsRootContext;

    import com.level8.appbuilder.util.HpsSystem;

    import com.level8.appbuilder.server.HpsSessionBean;

    public class Customer_Sql_Sel_REjb extends HpsSessionBean

    Server Partition JAR & WARFiles

    Depending on the Server

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    201/237

    201

    Interface chosen, the Partition

    is generated as the following

    Cust_Ejb.JAR Cust _Rmi.JAR Cust _Webservices.WAR

    Client Partitions

    Used to prepare client

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    202/237

    202

    Partition Type

    Client

    Client Type

    EventDrivenHTML

    Language

    Java

    portions of an application

    Client Partitions

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    203/237

    203

    CUSTOMER_DETAILS_DIS generated as JavaImport Statements in Customer_Details_Dis_R.java

    import ABVIEW.Customer_Details_W_V;

    import com.level8.appbuilder.gui.*;

    import com.level8.appbuilder.*;

    import com.level8.appbuilder.systemviews.*;

    import com.level8.appbuilder.util.*;

    public final class Customer_Details_Dis_R extends HpsGuiRule

    CUSTOMER_DETAILS_DIS generated as HTMLImport Statements in Customer_Details_Dis_R.java

    import ABVIEW.Customer_Details_W_V;

    import com.level8.appbuilder.servlet.*;

    import com.level8.appbuilder.*;

    import com.level8.appbuilder.systemviews.*;

    import com.level8.appbuilder.util.*;

    public final class Customer_Details_Dis_R extends HpsServletRule

    Import Statements in Customer_Details_Dis_RSvlt.java

    import com.level8.appbuilder.servlet.gateway.HpsServlet;

    public class Customer_Details_Dis_RSvlt extends HpsServlet

    Client Partition JAR & WARFiles

    Depending on the Client Type

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    204/237

    204

    chosen, the Partition is

    generated as the following

    Cust_Java.JAR Cust_HTML.WAR

    Partitioning an Application

    Create a new Application Configuration

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    205/237

    205

    Add child Client Partition to the AppCfg (create)

    Add child Process to the Partition (query)

    Add child Machine to the Partition (create / query)

    Add child Database to the Partition (create / query)Note: This is optional

    Add child Server Partition to the AppCfg (create)

    Add child Machine to the Partition (create / query)

    Add child Database to the Partition (create / query)Note: This is optional

    Add child Server to the Partition (create / query)

    Add child Rule(s) to the Server (query)

    The difference between &

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    206/237

    206

    Rule will be prepared as part of

    Client Partition

    Rule will be prepared as part

    of Server Partition

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    207/237

    207

    Section 14

    Executing AppBuilder JavaApplications

    207

    Executing AppBuilder Java Apps

    Pre-requisites:

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    208/237

    208

    Pre-requisites:

    JVM version 1.3 (+ appropriate path environment variable)

    Classpaths set up for:

    Tools.JAR (normally C:\JDK1.3\Lib)

    AppBuilder.JAR (normally C:\AppBuilder\Java\RT)Application classesthe application, either

    o C:\AppBuilder\Java\RT\Local\ (without Partitions) or

    o C:\AppBuilder\Java\RT\AppCfg Name\Part i t ion Name\

    (depending how you prepared

    AppBuilder.INI

    Font.INI

    The AppBuilder.INI File

    Controls execution of an AppBuilder Java

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    209/237

    209

    generated application.Normally stored in C:\AppBuilder\Java\RT

    FONT_INI_URL = loc ation o f Font.INI fi le

    DEBUG_START = Startup opt ion s for RuleViewDEBUG_URL = locat ion o f debug f i les for use with RuleView

    APP_LEVEL = level of AppBu i lder Debug informat ion as seen in DOS window

    SYS_LEVEL = level of Java Debug inform ation as seen in DOS window

    DB_ACCESS = LOCAL

    DBMS_PREFIX = jdbc:db2:JDBC_DRIVER = COM.ibm.db2.jdbc.app.DB2Driver

    DBNAME = name of database to co nnect to

    USERID = user id to us e when con nect ing to database

    PASSWORD = passwo rd to us e when conn ect ing to d atabase

    The AppBuilder.INI File

    Controls execution of an AppBuilder Java

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    210/237

    210

    generated application.Normally stored in C:\AppBuilder\Java\RT

    FONT_INI_URL = loc ation o f Font.INI fi le

    DEBUG_START = Startup opt ion s for RuleViewDEBUG_URL = locat ion o f debug f i les for use with RuleView

    APP_LEVEL = level of AppBu i lder Debug informat ion as seen in DOS window

    SYS_LEVEL = level of Java Debug inform ation as seen in DOS window

    DB_ACCESS = LOCAL

    DBMS_PREFIX = jdbc:db2:JDBC_DRIVER = COM.ibm.db2.jdbc.app.DB2Driver

    DBNAME = name of database to co nnect to

    USERID = user id to us e when con nect ing to database

    PASSWORD = passwo rd to us e when conn ect ing to d atabase

    Executing AppBuilder Java Apps I

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    211/237

    211

    Function prepare

    Run

    Java

    Executing AppBuilder Java Apps II

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    212/237

    212

    Executing java directly

    java com.level8.appbuilder.HpsRule Rule_Name

    very case sensitive First_Letter_Capitals_For_Name_Of_Rule

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    213/237

    Stepping Through Code

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    214/237

    214

    Setting a Breakpoint

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    215/237

    215

    Changing Data

    Double click on

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    216/237

    216

    icons toexpand View

    structures

    Single click inValue to

    change data

    Watches & Watchpoints

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    217/237

    217

    AppBuilder Exceptions

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    218/237

    218

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    219/237

    219

    Section 15

    Useful things to know

    219

    Changing the Active Project

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    220/237

    220

    Only 1 Project

    can be active at

    any time

    Moving objects from

    Project X to Project Y

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    221/237

    221

    Scripting Tools

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    222/237

    222

    TurboScripter New API to AppBuilder repository

    VBScript or JScript

    TurboCycler Old API to AppBuilder repository

    Proprietary language

    Using TurboScripter

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    223/237

    223

    Using TurboCycler

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    224/237

    224

    Cloning Objects I2. Highlight Cloner template, click Add

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    225/237

    225

    1. Choose object(s) to Clone

    3. Click on Generate

    Cloning Objects II

    CUSTOMER CLIENT 1. Enter replacement strings

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    226/237

    226

    CUSTOMER CLIENT 1. Enter replacement strings

    2. Click on Add

    3. Set Cloning options

    4. Set Text & Keyword options

    5. Choose objects to clone

    6. Choose objects to reuse

    7. Save8. Verify

    9. Review Verify results

    10. Restart Cloner

    11. Clone

    Cloning Objects II

    CUSTOMER CLIENT 1. Enter replacement strings

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    227/237

    227

    CUSTOMER CLIENT p g

    2. Click on Add

    3. Set Cloning options

    4. Set Text & Keyword options

    5. Choose objects to clone

    6. Choose objects to reuse

    7. Save8. Verify

    9. Review Verify results

    10. Restart Cloner

    11. Clone

    Cloning Objects III

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    228/237

    228

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    229/237

    229

    Section 16

    AppBuilder COBOLgeneration

    229

    Classic COBOL

    Requires AppBuilder runtime environment

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    230/237

    230

    Uses SYSTEM Ids, not Long Names Unreadable

    Not maintainable outside AppBuilder

    Can only be generated on mainframe

    Can only be executed on mainframe (CICS / IMS

    or Batch)

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    231/237

    Method 1

    How to generate COBOL

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    232/237

    232

    1. Upload objects Personal repositorymainframe repository or migrate objects from

    Workgroup Repository mainframerepository

    2. Go into AppBuilder workbench on mainframe3. Find the Rule & type PR to prepare it

    4. Review preparation results

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    233/237

    Remote Preparation

    (Classic COBOL or OpenCobol)

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    234/237

    234

    Remote

    prepare

    request

    BindFile SourceCode

    + RemotePrepare

    Server

    Submits driver

    job

    Builds prepare job

    Submits prepare job

    On job completion

    Objects

    read from

    repository

    Either return

    code or

    complete

    results sent

    back to

    preparationclient

    Local Preparation / Remote Compile

    (OpenCobol only)

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    235/237

    235

    Listener

    Submitscompile & link

    job

    On job completion

    Objects

    read from

    repository

    Either return

    code or

    complete

    results sent

    back to

    preparationclient

    CobolSource

    CodeJCL

    +

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    236/237

    BluePhoenix Proprietary and

  • 8/13/2019 APPBUILDER2Standard AppBuilder Class

    237/237

    ConfidentialThis document may be used in its complete form only, and is solely for theuse of BluePhoenix employees and authorized personnel. The material

    herein is proprietary to BluePhoenix and any unauthorized reproduction ofany part thereof is strictly prohibited. In consideration of the receipt of thisdocument and the associated literature, the recipient agrees not to disclose

    or otherwise use or make this document available to individuals outside thegroup directly responsible for the evaluation of its contents, or any thirdparty.