Скачать презентацию Migrating 4 GL to Genero A Case Study Скачать презентацию Migrating 4 GL to Genero A Case Study

85cd95c9795d34e5c6df7bba03258891.ppt

  • Количество слайдов: 34

Migrating 4 GL to Genero A Case Study Tom Smith Fourth Generation Software WAIUG/SEIUG Migrating 4 GL to Genero A Case Study Tom Smith Fourth Generation Software WAIUG/SEIUG Washington 2006

Introduction Tom Smith Senior Tools Developer Fourth Generation Software 2 Introduction Tom Smith Senior Tools Developer Fourth Generation Software 2

Agenda Our Goals The Planning Process The Conversion Process Differences from Four J’s BDL Agenda Our Goals The Planning Process The Conversion Process Differences from Four J’s BDL Technical Topics and Examples Question & Answer 3

Our Starting Point v. Software company v. Tool (RAD/CASE) v. Accounting Package v. Single Our Starting Point v. Software company v. Tool (RAD/CASE) v. Accounting Package v. Single code stream 4

Our Goals v. Goal #1: Standard Windows UI v. Other goals: Major Update NOT Our Goals v. Goal #1: Standard Windows UI v. Other goals: Major Update NOT Rewrite Clean Code Customer Migration Path 5

Big Concessions v. Not Backward Compatible v. Drop Text UI 6 Big Concessions v. Not Backward Compatible v. Drop Text UI 6

Key Features Required v. Standard Windows Key Strokes v. Windows Look & Feel v. Key Features Required v. Standard Windows Key Strokes v. Windows Look & Feel v. Top Menu v. Tool Bars v. Right Click 7

Informix 4 GL 8 Informix 4 GL 8

Four J’s BDL 9 Four J’s BDL 9

Four J’s Genero 10 Four J’s Genero 10

The Planning Process v Levels of Conversion Level 1: Almost no conversion 11 The Planning Process v Levels of Conversion Level 1: Almost no conversion 11

The Planning Process v Levels of Conversion Level 2: Minimum conversion 12 The Planning Process v Levels of Conversion Level 2: Minimum conversion 12

The Planning Process v Levels of Conversion Level 3: Extended conversion 13 The Planning Process v Levels of Conversion Level 3: Extended conversion 13

The Planning Process v. Levels of Conversion Level 4: Full conversion § Do Extended The Planning Process v. Levels of Conversion Level 4: Full conversion § Do Extended conversion plus: § Localized strings § TEXTEDIT § COMBOBOX § RADIOGROUP § CHECKBOX § FOLDER/PAGE ( screen tabs) § GROUP § STRING 14

The Planning Process v. Analysis Scope Programming Consistency Generated Code? Can Code Changes Be The Planning Process v. Analysis Scope Programming Consistency Generated Code? Can Code Changes Be Automated. Retain Dual Environments? Convert all-at-one-time? 15

The Conversion Process v Low level code (libraries) UI statements: Window/form: § OPEN WINDOW, The Conversion Process v Low level code (libraries) UI statements: Window/form: § OPEN WINDOW, OPEN FORM. . . Interactive instructions: § MENU, INPUT ARRAY, CONSTRUCT and DISPLAY ARRAY 4 gl and 'C' routines. Remove references to 'PROMPT' and 'DISPLAY AT' statements v High level code (applications) v Test v Deploy 16

Differences from Four J’s BDL v. What Has NOT changed Language structure Tools: § Differences from Four J’s BDL v. What Has NOT changed Language structure Tools: § fgl 2 p, fglform, fglcomp, fgllink, fglmkrun, fglschema (fgldbsch), fgl. Wrt Environment variables 17

Differences from Four J’s BDL v. What HAS changed Style Sheets FGLPROFILE 18 Differences from Four J’s BDL v. What HAS changed Style Sheets FGLPROFILE 18

What you need to now about XML The 'DOM' (Document Object Model) tree. XML What you need to now about XML The 'DOM' (Document Object Model) tree. XML Tiger 500 Siberian Russia 445 Bengal India 3159 Black Rhino Southern Black Rhino Zimbabwe 1365 Southwestern Black Rhino Namibia 740 endangered species animal name tiger weight animal subspecies 500 name siberia n region russia population 445 19

Initial considerations v. What tools do you need ? v. Will automating a task Initial considerations v. What tools do you need ? v. Will automating a task save time ? v. Where to use Style Sheets ? v. XML based Style Sheets: Styles: 4 st Action defaults: 4 ad Tool. Bar: 4 tb Top. Menu: 4 tm 20

Technical Specifics v How to change an application's form files v OPEN WINDOW v Technical Specifics v How to change an application's form files v OPEN WINDOW v ON ACTION v Localized strings 21

How to change an application's form file • Before • After DATABASE standard SCHEMA How to change an application's form file • Before • After DATABASE standard SCHEMA standard LAYOUT VBOX GRID { : : Ordinary Text and fields : } END -- GRID TABLE { : : Arrays - Single-line : } END -- TABLE SCROLLGRID { : : Arrays - Multi-line : } END -- SCROLLGRID END -- VBOX END -- LAYOUT SCREEN { : : Ordinary Text, fields and arrays : } ATTRIBUTES : INSTRUCTIONS : 22

How to change an application's form file SCREEN section • Before • After DATABASE How to change an application's form file SCREEN section • Before • After DATABASE standard SCHEMA standard SCREEN SIZE 20 BY 80 { ------ Test Example ----- LAYOUT VBOX GRID { Code. . . : [A 0 ] Name. . . : [A 1 Address: [A 2 City-State-Zip: [A 3 Date. . . : [A 6 ] Contact [A 7 } Description ][A 8 Test Example |A 4|A 5 ] ] ] ] Code. . . : [A 0 ] Name. . . : [A 1 Address: [A 2 City-State-Zip: [A 3 Date. . . : [A 6 ] } END -- GRID TABLE { Contact Description [A 7 ][A 8 } END -- TABLE END -- VBOX END -- LAYOUT |A 4|A 5 ] ] ] ] 23

How to change an application's form file Tables section: Unchanged. Attributes section: • Before How to change an application's form file Tables section: Unchanged. Attributes section: • Before A 0 = tsthead. ccode; A 1 = tsthead. cname; A 2 = tsthead. caddress; A 3 = tsthead. ccity; A 4 = tsthead. cstate; A 5 = tsthead. czip; A 6 = tsthead. cdate; A 7 = tstdetl. ctype; A 8 = tstdetl. cdescription; • After ATTRIBUTES A 0 = tsthead. ccode; A 1 = tsthead. cname; A 2 = tsthead. caddress; A 3 = tsthead. ccity; buttonedit A 4 = tsthead. cstate, image="gn_arrdn. png", action=ac_zoom; A 5 = tsthead. czip"; dateedit A 6 = tsthead. cdate; A 7 = tstdetl. ctype; A 8 = tstdetl. cdescription; dateedit field: buttonedit field: Instruction section: Unchanged: Delimiters: Remove 24

How to change an application's form file Problem areas: What if: One space Contact How to change an application's form file Problem areas: What if: One space Contact Description [A 7 ] [A 8 ] This results in: The column heading should not be: 'Contact Description'. The rule is that at least two (2) spaces must separate column titles. 25

How to change an application's form file Fix 1: Two spaces Contact Description [A How to change an application's form file Fix 1: Two spaces Contact Description [A 7 ] [A 8 ] This results in the correct: Fix 2: TABLE (WIDTH=46) { [A 7 ][A 8 ] } : : : A 7 = tstdetl. ctype, TITLE="Contact"; A 8 = tstdetl. cdescription, TITLE="Description"; 26

How to change an application's form file BUTTONEDIT CANVAS CHECKBOX COMBOBOX DATEEDIT GROUP IMAGE How to change an application's form file BUTTONEDIT CANVAS CHECKBOX COMBOBOX DATEEDIT GROUP IMAGE LABEL PROGRESSBAR RADIOGROUP SCROLLGRID TABLE TEXTEDIT Standard push button with a label or a picture. Replaces WIDGET="BMP" Line edit box with a button on the right side. Replaces WIDGET="FIELD_BMP" Area reserved for drawing. Replaces WIDGET="CANVAS" Boolean entry with a box and a text label. Replaces WIDGET="CHECK" Text edit box with a button that opens a list of values. Replaces WIDGET="COMBO" Line edit box with a button that opens a calendar window. Simple line edit box for data input or display. Attributes of a GROUP container specified with a layout tag. Area where a picture file can be displayed. Replaces WIDGET="IMAGE" Area reserved to display a value. Progress bar widget to display an integer value. Field presented with a set of radio buttons. Replaces WIDGET="RADIO" Attributes of a SCROLLGRID container specified with a layout tag. Attributes of a TABLE container specified with a layout tag. Multi-line edit box for data input or display. 27

How to change an application's form file • Before sh =FORMONLY. shipto, widget= How to change an application's form file • Before sh =FORMONLY. shipto, widget="BMP", config="shipto. bmp Control-P"; • After BUTTON sh : ac_shipto, image="shipto. bmp"; 28

OPEN WINDOW • Before open window w_shiptod at y_pos, x_pos with form OPEN WINDOW • Before open window w_shiptod at y_pos, x_pos with form "ship_oe" attribute (blue, border) • After OPEN WINDOW w_shiptod AT y_pos, x_pos WITH FORM "ship_oe" ATTRIBUTES(TEXT="OE Shipto", STYLE="gn_main") 29

OPEN WINDOW Previously the system-wide 'Style' 'Style sheet' was loaded with: CALL ui. Interface. OPEN WINDOW Previously the system-wide 'Style' 'Style sheet' was loaded with: CALL ui. Interface. load. Styles("gn_default") [gn_default. 4 st] 30

ON ACTION replaces ON KEY ON ACTION replaces ON KEY" and "ON COMMAND" • Before on key (control-p) CALL zm. Shipto() • After ON ACTION ac_shipto CALL zm. Shipto() 31

ON ACTION A program-wide 'Tool. Bar' 'Style sheet' was loaded with: CALL fm. Main. ON ACTION A program-wide 'Tool. Bar' 'Style sheet' was loaded with: CALL fm. Main. load. Tool. Bar("gn_shipto") [gn_shipto. 4 tb]

Localized strings. Form File [lb 01]: [nm : LABEL lb 01 : TEXT=% Localized strings. Form File [lb 01]: [nm : LABEL lb 01 : TEXT=%"lb_cust_name"; ] $ fglform -m test. per > test. str Code ATTRIBUTES(TEXT=%"cust_maint", ERROR %"no_record" $ fglcomp -m test. 4 gl >> test. str $ vi test. str "lb_cust_name"="Customer name" "cust_maint"="Customer Maintenance Screen" "no_record"="No record satisfies query" $ fglmkstr test. str test. 42 s 33

More info For more info… toms@fourthgeneration. com www. fourthgeneration. com 34 More info For more info… toms@fourthgeneration. com www. fourthgeneration. com 34