Download - John Rhodes - CA Plex for CA 2E Shops
![Page 1: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/1.jpg)
![Page 2: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/2.jpg)
Plex for 2E SHOPS
![Page 3: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/3.jpg)
• Introduction of Plex to 2E Developers
3
![Page 4: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/4.jpg)
2E/Plex Comparative Anatomy
• CA 2E developers will feel at home with many of CA Plex’s core concepts
• CA Plex expands and enhances CA 2E’s essential concepts
• CA 2E skills translate well into CA Plex skills
4
![Page 5: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/5.jpg)
2E/Plex Similarities
• “Data modeling - both 2E and Plex implement a data-driven approach in exactly the same way.
• Modeling language - Plex allows developers to describe their data models using exactly the same grammar and verbs as 2E (refers to, owned by, known by and has). Plex builds on and extends this simple and effective language.
• Design objects - Plex uses most of the same design objects as 2E - entities, functions, fields, views and so on. Plex has additional object types to support functionality not provided by 2E.
• Action diagrams - Plex uses action diagrams to describe procedural logic in a manner very similar to 2E. “
5
![Page 6: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/6.jpg)
Object Type Cross ReferenceCA 2E CA Plex
Field Attribute Field
File Attribute Entity and Table
Access Path Type View
Function Type Function
Application Subject Area
File Entity
Access Path View
Field Field
Field Condition Value(s) and State
Constant Value and State
Arrays Entity and View
Function Function and Source Code
Device Design (Screens) Panel
Message Function, Message and Second Level Text
Topic
Narrative Narrative
6
![Page 7: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/7.jpg)
Model Based Development
7
![Page 8: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/8.jpg)
What Is A Group Model?
• Group Model – master repository for all information about a Plex application
8
GROUP MODEL
![Page 9: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/9.jpg)
What Is A Local Model?• Local model: working copy of the information in a
host group model
• A group model can have unlimited local models associated with it
• A local model belongs to only one host group model
9
GROUP
MODELLOCAL LOCAL
![Page 10: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/10.jpg)
Exchanging Data Between Group and Local Models
10
GROUP MODEL
LOCAL
MODEL A
LOCAL
MODEL B
Catalog Catalog
Update Update
ExtractExtract
![Page 11: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/11.jpg)
What Is A Library Model?
Library Model: a group model that is being referenced by another group model
In 2e you had to export and Import objects from one model to another
11
![Page 12: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/12.jpg)
Referencing a Library from a Host Group Model
Pattern libraries provided with Plex
12
Foundation UISTYLE UIBASIC
ACTIVE VALIDATE DATE STORAGE WINAPI
FIELDS OBJECTS
![Page 13: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/13.jpg)
Navigating in Plex
13
![Page 14: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/14.jpg)
Recognizing Objects
• Objects are the basic building blocks
• Defined by assigning name and type
• Accessed using the Object Browser
14
![Page 15: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/15.jpg)
Object Type determines Verb use
• Hundreds of Plex verbs
• Specifies relationship between objects of a particular type
• Identified by:• Source object verb target object
• Example:• ENT known by FLD
15
![Page 16: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/16.jpg)
Object Inheritance
• Inheritance:• The mechanism that allows an object to include the properties of another
object or pattern
16
![Page 17: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/17.jpg)
Defining Inheritance• Inheritance works through the “is a” verb
• Source object inherits all the properties of the target object
17
My
Fetch Association
Fetch
Association
Is a
![Page 18: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/18.jpg)
Patterns
• Patterns:• Describe a solution to a common problem
• Abstract
• Reusable
• Pattern Libraries• Set of models that contain patterns
• Can be combined
• CA Supplied or third party
18
![Page 19: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/19.jpg)
Work with the Object Browser
19
![Page 20: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/20.jpg)
Scoping
20
![Page 21: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/21.jpg)
Data Modeling
21
![Page 22: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/22.jpg)
CA PLEX Application Development Approach
22
Data Modeling
Pattern Matching
And Inheritance
Customize
Generate and Build
Data Modeling
![Page 23: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/23.jpg)
Categories of Entity Relationships
• Entity-to-Field• Define the attributes
• “known by”: primary keys
• “has”: non-key attributes
• Entity-to-Entity• Define the relationships between entities
• “owned by”: primary keys of the owning file become primary keys of the owned file
• “refers to”: primary keys of target entity become non-key attributes of source entity
23
![Page 24: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/24.jpg)
Working with the Entity Attributes Editor
24
The has relation defines
the non-key (data)
attributes of an entity.
This column shows the ENT is a ENT
triple by which the relation is inherited
(if any)
An owned by relationship results in the
primary key of the owning entity becoming
primary keys of the source entity
A known by relationship defines the
lower order primary key of an entity
A refers to relationship results
in the primary keys of the
target entity becoming foreign
key attributes of the source
![Page 25: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/25.jpg)
Assigning Values• Use the triple FLD value VAL
• A value is scoped by its field
• One field can have many values
25
Employee
Status
Full Time
Part Time
Retired
F
P
R
Employee Status value Full time
Employee Status value Part time
Employee Status value Retired
Name Literal
![Page 26: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/26.jpg)
Pattern Matching and Inheritance
26
![Page 27: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/27.jpg)
Plex Application Development Approach
27
Data Modeling
Pattern Matching
And Inheritance
Customize
Generate and Build
Pattern Matching
And Inheritance
![Page 28: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/28.jpg)
Executing an Entity
28
Entity
Panel
User Interface
Function
Table
View
View
Database Functions
Database Functions
Calls
![Page 29: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/29.jpg)
STORAGE/RelationalTable Entity
29
DataAccess
RelationalTable
Fetch Update
Fetch
Update
Physical
Table
is a
![Page 30: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/30.jpg)
FOUNDATION/EditDialog Entity
30
EditSuite
Grid
Insert Update Delete
Add Copy Change Delete
![Page 31: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/31.jpg)
Edit Suite
31
![Page 32: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/32.jpg)
Explicit vs. Implicit Inheritance
32
ENT is a ENT
Is a
explicit inheritance
Implicit inheritance
Implicit objects
![Page 33: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/33.jpg)
Generate and Build
33
![Page 34: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/34.jpg)
Plex Application Development Approach
34
Data Modeling
Pattern Matching
And Inheritance
Customize
Generate and Build Generate and Build
![Page 35: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/35.jpg)
Generate and Build
• Generate:• constructs the source code necessary to execute the objects in the model
• Interactive on your computer or remote on another computer
• Build:• Process that constructs executable objects from generated source code
• Compiling source using a compiler
35
![Page 36: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/36.jpg)
Name Allocation Routine
• Controlled by Name Allocation Routine in Generate and Build options
• Assign all names manually:• Turn off routine
• Assign some names manually:• Leave Name Allocation Routine on
• Add triples manually before generating for first time
• Do not assign names manually:• Leave Name Allocation Routine on
• Default prefix is AA
• AAxxxxT – tables
• AAxxxxV – views
• AAxxxxF - functions
36
![Page 37: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/37.jpg)
Working with the Generate and Build Window
• Set the Generate and Build options
• Generate objects
• Build generated objects
• Construct an executable program from a compiled function
• View generated source code
37
![Page 38: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/38.jpg)
the Generate and Build Window• CTRL+G or Generate and Build from the Tools menu
38
Displays path of primary
source file and the time it
was generated (optional)
![Page 39: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/39.jpg)
Errors
• Errors construct a .LST file
• Use View Source option to view file
• Generation Status dialog reports number of warnings and errors
• Warnings and errors appear in the Message Log
39
![Page 40: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/40.jpg)
Setting Generate and Build Options• Options are set at the model level
• Categories:• AS/400 generation
• Double Byte Build
• Generate and Build Systems
• Name Allocation
• System Definitions
• Build Directories
• Editor Preferences
• Generation Options
• Java Generation Options
• Name Allocation Parameter
• Topic Types
40
![Page 41: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/41.jpg)
Designing Panels
41
![Page 42: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/42.jpg)
Panel Designer
• Panel Designer• Design window
• Displays layout of panel
• Panel Palette• Represents the structure
• Contains elements not visible in window
• Property Sheet• Modify properties of any element on panel
• Drag and Drop Editing
42
![Page 43: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/43.jpg)
Design Window
• Displays panel you are designing
• Closely resembles executed panel
43
![Page 44: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/44.jpg)
Field Groups on Design Panels• Each field on a panel has multiple elements attached
• Data control
• Static text controls
• Push buttons
• Selecting a field selects all elements in that field
• Select a single element in a group by holding down Ctrl while it is clicked
44
Field group
DetailP region
![Page 45: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/45.jpg)
Working with Panels
45
![Page 46: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/46.jpg)
Event Driven Design• User starts some action by making a physical event process
• Physical events:• Pressing a function key• Pressing a button (windows)• Choosing a menu command (windows)• Entering a subfile option and pressing a key (DDS)
46
Panel
Design
Action
Diagram
Logical
Events
User
causes
physical
event
Processing
occurs as
result of
event
“Work with Salesperson”
event
Check for logical
event and execute
processing
File SelectSalesperson…Territory…
![Page 47: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/47.jpg)
Behavior of Elements
• GUI panels have built-in behaviors for elements
• To enhance behaviors:• Associate a physical and logical event• Code processing to the logical event
• Examples of physical events:• Query Close• Clock Tick• Notified• Drag and drop events• Mouse Move, Mouse Down, Mouse Up• Activated and Deactivated
47
![Page 48: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/48.jpg)
Key Codes• Key Code: a key (or combination) used to start processing
• To add a Key Code:• Add a Key Code to the Keys folder
• Change name using Properties Sheet• Focus on Key Code
• Click ellipses button to select a valid key combination
• Events can be attached to function keys and keys using Ctrl or Shift
48
![Page 49: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/49.jpg)
Push Buttons
• Push button: a control used to start some action • Click with mouse
• ALT + shortcut key
• If it has focus – ENTER
49
![Page 50: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/50.jpg)
ReferredTo
50
![Page 51: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/51.jpg)
Working with the Selector(F4)
51
Double-click on Jockey Code to
call Selector
![Page 52: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/52.jpg)
Views
52
![Page 53: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/53.jpg)
Views
• Views are scoped to entities
• Views do not need to be generated• Define a group of fields for a particular purpose
• Views do not contain data
• Properties:• Attributes included
• Processing order of rows
• Selection criteria
53
![Page 54: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/54.jpg)
Functions
54
![Page 55: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/55.jpg)
Tools for the Action Diagram
55
Type in the input line
Drag and drop from the Object
Browser to the input line
Drag and drop from the Palette to
the input line or directly into the
action diagram
![Page 56: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/56.jpg)
Message Log
56
Double click to open function and
find the error
Right click for
message
details
![Page 57: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/57.jpg)
Recognizing Subroutines
• Reusable code
• Can be called from anywhere in the Action Diagram it resides
• The preferred method of coding• Easily understood
• Easily maintained
57
![Page 58: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/58.jpg)
Subroutines Folder
58
![Page 59: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/59.jpg)
Multiple Inheritance
• One source function can inherit from many target functions• All must have common ancestor
• All code enhancements inserted in Pre and Post points
59
![Page 60: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/60.jpg)
Example
• UISTYLE/EditDetailGrid• EditDetailGrid = UIBASIC/Update
and UIBASIC/Grid• Read-only grid region (from Grid)
• Editable single instance region (from Update)
• Code is blended in Action Diagram
60
FunctionShell
UIShell
UIBasicShell
Detail
Update
EditDetailGrid
Grid
is a
is a
is a
is a
is a
is a
is a
![Page 61: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/61.jpg)
Parameters • Add parameters to a message;
• Triples:• MSG parameter FLD
• … QLF
• Select and call Editor (F9)
61
Message
parameters
Message text with message
parameters inserted
Map fields to message
parameters
![Page 62: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/62.jpg)
Message Types: Dialog
• Dialog• Uses modal dialog box with OK button
• User must respond
62
OK
Message
Dialog msg: OK button
Dialog Message Message: Calc 1.Dialog msg
![Page 63: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/63.jpg)
Enquiry
• Enquiry• Uses modal dialog box with Yes, No, Cancel buttons
• User must respond
63
Enquiry message Message: Employee.Transfer Msg, Work<Enquiry Answer>
Message
Please confirm the transfer from Department 200
Development to New Department 100
Yes No Cancel
![Page 64: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/64.jpg)
Status
• Status• Shown in status bar
• No response required from user
64
Status Message Message: Calc 1.Status msg
Add Input 1 to Input 2
![Page 65: John Rhodes - CA Plex for CA 2E Shops](https://reader031.vdocument.in/reader031/viewer/2022022414/587561251a28ab00528b73b5/html5/thumbnails/65.jpg)
65