Académique Documents
Professionnel Documents
Culture Documents
SG24-5467-00
SG24-5467-00
Take Note! Before using this information and the product it supports, be sure to read the general information in Appendix E, Special Notices on page 307.
First Edition (October 1999) This edition applies to VisualAge Generator V4: VisualAge Generator Developer for OS/2 and Windows NT Version 4.0, 5697-G98 VisualAge Generator Server for OS/2, AIX, Windows NT, HP-UX and Sun Solaris Version 4.0, 5639-G97 VisualAge Generator Templates for OS/2 and Windows NT, 5639-H09 Comments may be addressed to: IBM Corporation, International Technical Support Organization Dept. QXXE Building 80-E2 650 Harry Road San Jose, California 95120-6099
Contents
Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xi Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii The Team That Wrote This Redbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii Comments Welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix Part 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Chapter 1. VisualAge Generator V4 Overview . . . . . . . . . . . . . . 1.1 VisualAge for Java Interoperability . . . . . . . . . . . . . . . . . . . . . . 1.2 Functional Enhancements to VisualAge Generator . . . . . . . . . 1.2.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.2 Object Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.3 VisualAge Generator Templates Enhancements . . . . . . . 1.2.4 SUN Solaris Runtime Support . . . . . . . . . . . . . . . . . . . . . 1.3 Web-Based and e-business Enhancements . . . . . . . . . . . . . . . 1.3.1 Development Support for WebSphere Application Server . 1.3.2 Enterprise Java Bean Support . . . . . . . . . . . . . . . . . . . . . 1.4 VisualAge Generator Automated IC Packaging . . . . . . . . . . . . 1.4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.2 GUI Packaging Options . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.3 Automated IC Packaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. .. .. .. .. .. .. .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 . .4 . .5 . .5 . .6 . .7 . .7 . .7 . .8 . .9 . .9 . .9 . 10 . 10 . 13 . 13 . 14 . 15 . 16 . 17 . 19 . 19 . 20 . 20 . 21 . 22 . 24 . 24 . 24 . 25
Chapter 2. Java-Based Version of VisualAge Generator . . . . . . . . . . . . 2.1 Workbench Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.1 Workbench Extensions for VisualAge Generator . . . . . . . . . . . . . 2.1.2 Organization of VisualAge Generator Parts in VisualAge for Java 2.1.3 VisualAge Generator Parts in the Workspace . . . . . . . . . . . . . . . . 2.1.4 Class and Method Mapping for VisualAge Generator Parts . . . . . 2.1.5 Part Name Aliasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.6 Source Management and Organization in VisualAge for Java. . . . 2.2 Java (GUI) Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.2 Free-form Surface Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.3 Table and Record Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.4 Function Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.5 Program Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.6 Communication Session Information . . . . . . . . . . . . . . . . . . . . . . 2.2.7 Making Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
iii
2.3 VisualAge Generator Program 2.3.1 Testing . . . . . . . . . . . . . . 2.4 Generation . . . . . . . . . . . . . . . 2.4.1 4GL Part Generation . . . 2.4.2 Java Client Generation . .
. . . . .
. . . . .
. . . . .
.. .. .. .. ..
. . . . .
. . . . .
. . . . .
. . . . .
.. .. .. .. ..
. . . . .
. . . . .
. . . . .
.. .. .. .. ..
. . . . .
. . . . .
. . . . .
. . . . .
.. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. 28 . 28 . 29 . 29 . 30 . 35 . 35 . 35 . 39 . 40 . 41 . 42 . 42 . 43 . 44 . 45 . 47 . 48 . 49 . 51 . 51 . 52 . 53 . 55 . 60 . 60 . 62 . 67 . 75 . 80 . 85
Chapter 3. Introduction to VisualAge Generator V4 Enhancements . 3.1 Function Logic Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.3 Loose Typing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.4 Syntax and Part Type Changes . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Object Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.3 Data Exchange. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.4 Script Wizards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.5 Object Scripting Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.6 Reusable Object Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.7 Event Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 VisualAge Generator Templates Enhancements . . . . . . . . . . . . . . . 3.3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.2 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.3 Generation support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.4 Generation Parameter Management during Development . . . . 3.4 WebSphere Rapid Application Development . . . . . . . . . . . . . . . . . . 3.4.1 Native (Java-Based) Development . . . . . . . . . . . . . . . . . . . . . . 3.4.2 The VisualAge Generator WebSphere RAD Solution . . . . . . . . 3.4.3 Web Transaction Program Development . . . . . . . . . . . . . . . . . 3.4.4 Web Transaction Program System Structure Options . . . . . . . . 3.4.5 Generation and Implementation of a Web Transaction . . . . . . . 3.4.6 Runtime Configuration Samples . . . . . . . . . . . . . . . . . . . . . . . .
Part 2. Primer for Developer on Java Team Development . . . . . . . . . . . . . . . 89 Chapter 4. VisualAge for Java Team Development Environment . 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Development Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Ownership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. .. . . . . . . . . . . . . . 91 . 91 . 91 . 93
Chapter 5. Understanding the Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 5.1 Program and System Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 5.1.1 Program Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
iv
5.1.2 System Elements . . . . . . . . . . 5.2 Version Management . . . . . . . . . . . 5.2.1 Open Edition . . . . . . . . . . . . . 5.2.2 Version. . . . . . . . . . . . . . . . . . 5.2.3 Scratch Edition . . . . . . . . . . . . 5.2.4 History of Program Elements . 5.3 Configuration Management . . . . . . 5.3.1 Releasing Program Elements . 5.3.2 Releasing Methods . . . . . . . . 5.3.3 Releasing Classes . . . . . . . . . 5.3.4 Releasing Packages. . . . . . . . 5.4 Change Management . . . . . . . . . . . 5.4.1 Ownership . . . . . . . . . . . . . . . 5.4.2 Team Roles . . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
.. .. .. .. .. .. .. .. .. .. .. .. .. ..
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
.. .. .. .. .. .. .. .. .. .. .. .. .. ..
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
.. .. .. .. .. .. .. .. .. .. .. .. .. ..
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
.. .. .. .. .. .. .. .. .. .. .. .. .. ..
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
.. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . 98 . 100 . 101 . 101 . 103 . 103 . 104 . 104 . 105 . 105 . 106 . 106 . 106 . 108 . 113 . 113 . 115 . 117 . 119 . 121 . 123 . 125 . 125 . 127 . 127 . 128 . 128 . 129 . 130 . 130 . 131 . 132 . 135 . 135 . 136 . 137 . 138 . 139 . 140 . 140 . 141
Chapter 6. A Developer on Java Team Environment Quick Start . . 6.1 Functional Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 Class Management (Application Becomes Package) . . . . . . . . . . . 6.3 Container Management (Configuration Map Becomes Project) . . . 6.4 System Structure Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.5 Organizational Alternatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.6 Using Project List Parts to Implement a Layered Project Structure .
Chapter 7. Defining a Developer on Java Development Process . . . 7.1 Choosing a VisualAge Generator Solution . . . . . . . . . . . . . . . . . . . . 7.2 Available Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2.1 Traditional Development Environment . . . . . . . . . . . . . . . . . . . 7.2.2 One Package per Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2.3 One Package per Programmer . . . . . . . . . . . . . . . . . . . . . . . . . 7.2.4 The Package-to-Function Relationship Answer . . . . . . . . . . . . 7.3 Defining Project and Package Structures to Organize Code . . . . . . . 7.3.1 Project to Package Ratios . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.2 Package Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.3 Package-to-Function Container Breakdown Example . . . . . . . . 7.4 Representing Stages of Development . . . . . . . . . . . . . . . . . . . . . . . 7.4.1 Project Sets for Each Development Phase . . . . . . . . . . . . . . . . 7.4.2 Moving Code between Development Phase Projects . . . . . . . . 7.4.3 Managing Development Phases Using Project List Parts . . . . . 7.4.4 Moving Code between Development Phase Project List Parts . 7.4.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.5 Package Management for Java Client Generation . . . . . . . . . . . . . . 7.5.1 Source Package as Java Client Generation Target Package . . 7.5.2 Common Package as Java Client Generation Target Package .
Part 3. Development Scenario Using Developer on Java . . . . . . . . . . . . . . 143 Chapter 8. Scenario: Designing the Development Process . 8.1 Introduction and Objectives . . . . . . . . . . . . . . . . . . . . . . . . 8.2 Team Environment Development Process Definition . . . . . 8.2.1 Identify System Functions to Migrate . . . . . . . . . . . . . 8.2.2 Team Environment Container Structure Definition . . . 8.3 Partial TUI System Migration . . . . . . . . . . . . . . . . . . . . . . . 8.3.1 Moving Source Code to the Team Environment . . . . . 8.3.2 Validation and Versioning the Migrated Code . . . . . . . . . . . . . . . .. .. .. .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 . 145 . 146 . 146 . 148 . 150 . 150 . 152 . 153 . 153 . 153 . 153 . 163 . 167 . 167 . 168 . 170 . 174 . 174 . 175 . 175 . 176 . 176 . 177 . 178 . 179 . 180 . 181 . 181 . 183 . 184 . 187 . 187 . 188 . 189
Chapter 9. Migrating an Existing System to Developer on Java . 9.1 Team Environment Development Process Definition . . . . . . . . . 9.2 Partial TUI System Migration . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.2.1 Moving Source Code to the Team Environment . . . . . . . . . 9.2.2 Validation and Versioning the Migrated Code . . . . . . . . . . .
Chapter 10. GUI Development with Developer on Java . . . . . . . . . . 10.1 Development of New VisualAge for Java GUI System . . . . . . . . . 10.1.1 Component Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.1.2 System Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.1.3 Roles and Responsibilities . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2 Global Reusable Components . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2.1 IsaActionEventHandler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2.2 IsaErrorRoutine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2.3 IsaLogic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2.4 IsaComboBox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2.5 IsaGroupBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2.6 IsaTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2.7 IsaTextField . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.3 System Reusable Components . . . . . . . . . . . . . . . . . . . . . . . . . . 10.3.1 CustomerListPanelResource . . . . . . . . . . . . . . . . . . . . . . . . 10.3.2 CustomerListPanel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.3.3 CustomerDetailPanelResource. . . . . . . . . . . . . . . . . . . . . . . 10.3.4 CustomerDetailPanel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.4 Java GUI Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.4.1 VisualAge for Java AppletCustomerListApplet . . . . . . . . . 10.4.2 VisualAge for Java ApplicationCustomerListApplication . . 10.4.3 VisualAge for Java ApplicationCustomerDetailApplication
vi
Part 4. Primer for Developer on Smalltalk Team Environment . . . . . . . . . . 191 Chapter 11. Developer on Smalltalk Development Environment . 11.1 Team Environment Images and Libraries . . . . . . . . . . . . . . . . . 11.2 Software and Management Components . . . . . . . . . . . . . . . . . 11.3 Versioning and Component Container Release Processing . . . 11.4 Component Roles and Responsibilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 . 194 . 195 . 196 . 197 . 199 . 200 . 202 . 203 . 209 . 210 . 212 . 213 . 214 . 217 . 217 . 218 . 220 . 221 . 225 . 226 . 227 . 228 . 231 . 232 . 232 . 232 . 233 . 233 . 234 . 234 . 239 . 243 . 247 . 247 . 249
Chapter 12. Smalltalk Architecture and Team Environment Support 12.1 The Team Environment Library . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.2 The Image in Smalltalk. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.3 Library-Image Interactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 13. Software and Management Components 13.1 Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13.2 Methods in VisualAge Generator . . . . . . . . . . . . . . 13.3 Applications and Subapplications . . . . . . . . . . . . . . 13.4 Configuration Map . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 14. Version, Edition, and 14.1 Management of Editions. . . . . 14.2 Version Management . . . . . . . 14.3 Scratch Edition. . . . . . . . . . . . 14.4 Release Process . . . . . . . . . . . . . . . .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. .. .. .. .. .. .. .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.. .. .. .. .. .. .. .. .. .. .. .. .. ..
Chapter 15. Component Roles and Responsibilities . 15.1 Configuration Map Manager . . . . . . . . . . . . . . . . . . 15.2 Application Manager . . . . . . . . . . . . . . . . . . . . . . . 15.3 Class Owner and Class Developer . . . . . . . . . . . . .
Chapter 16. Developer on Smalltalk Development Process Definition . 16.1 Understanding Developer on Smalltalk Team Environment . . . . . . . . 16.1.1 VisualAge Generator Team Environment Integration . . . . . . . . . 16.1.2 VisualAge Generator Implementation Issues . . . . . . . . . . . . . . . 16.1.3 Development Process Objectives . . . . . . . . . . . . . . . . . . . . . . . . 16.1.4 Initial Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.2 Managing the VisualAge Generator Development Process. . . . . . . . . 16.2.1 Serial Versus Concurrent Development . . . . . . . . . . . . . . . . . . . 16.2.2 Identifying a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.2.3 Testing the Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.3 Implementing Serial Development . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.3.1 Working with Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.3.2 Working with Configuration Maps . . . . . . . . . . . . . . . . . . . . . . . .
vii
16.3.3 Naming Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.4 Organizational Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.4.1 Data Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.4.2 Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.4.3 Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.4.4 Common Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.4.5 Application and Subapplication Organizational Example
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
.. .. .. .. .. .. ..
. . . . . . .
. . . . . . .
Part 5. Appendices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 Appendix A. Workspace Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 A.1 Managing Program Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 A.2 Project Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 A.3 Package Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 A.4 Management query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 A.5 Project Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 A.6 Managing Resource Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 A.6.1 Using Shared Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 A.6.2 Managing Resources by Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 Appendix B. The Team Development Process . . . . . . . . . . . . . . . . . . . . . . . . . 269 B.1 Activity Patterns for Daily Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 B.1.1 The Basic Development Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 B.1.2 Single Package, Single Developer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 B.1.3 Single Package, Multiple Developers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 B.1.4 Multiple Packages, Multiple Developers . . . . . . . . . . . . . . . . . . . . . . . . . . 276 B.1.5 Multiple Parallel Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 B.2 Project Wrapup and Delivery. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 Appendix C. Program Element State Transitions . . . . . . . . . . . . . . . . . . . . . . 283 C.1 Project State Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 C.1.1 Not Existing -> Open Edition (1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 C.1.2 Not Existing -> Repository Only (2). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 C.1.3 Repository Only -> Version/Open Edition (3) . . . . . . . . . . . . . . . . . . . . . . 285 C.1.4 Version -> Open Edition (4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286 C.1.5 Open Edition -> Version (5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 C.1.6 Version -> Scratch Edition (6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 C.1.7 Scratch Edition -> Open Edition (7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 C.1.8 Scratch Edition -> Not Existing (8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 C.1.9 Version/Open Edition -> Repository Only (9) . . . . . . . . . . . . . . . . . . . . . . 289 C.1.10 Repository Only -> Not Existing (10). . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 C.2 Package State Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 C.2.1 Not Existing -> Released Open Edition (1) . . . . . . . . . . . . . . . . . . . . . . . . 291
viii
C.2.2 Not Existing -> Repository Only (2). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292 C.2.3 Released Open Edition -> Released Version (3) . . . . . . . . . . . . . . . . . . . 293 C.2.4 Released Version -> Open Edition (4) . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 C.2.5 Open Edition -> Released Open Edition (5) . . . . . . . . . . . . . . . . . . . . . . . 293 C.2.6 Open Edition -> Version (6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 C.2.7 Version -> Released Version (7). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 C.2.8 Version -> Open Edition (8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 C.2.9 Version/Released Version -> Scratch Edition (9) . . . . . . . . . . . . . . . . . . . 295 C.2.10 Scratch Edition -> Open Edition (10) . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 C.2.11 Scratch Edition -> Not Existing (11) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 C.2.12 (Released) Open Edition/(Released) Version -> Repository Only (12). . 296 C.2.13 Repository Only -> Open Edition/Version (13) . . . . . . . . . . . . . . . . . . . . 297 C.2.14 Repository Only -> Not Existing (14). . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 C.3 Class State Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 C.3.1 Not Existing -> Open Edition (1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 C.3.2 Open Edition -> Version (2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 C.3.3 Version -> Released Version (3). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 C.3.4 Version/Released Version -> Open Edition (4) . . . . . . . . . . . . . . . . . . . . . 300 C.3.5 Version/Open Edition/Released Version -> Repository Only (5) . . . . . . . 300 C.3.6 Repository Only -> Version/Open Edition (6) . . . . . . . . . . . . . . . . . . . . . . 300 C.3.7 Repository Only -> Not Existing (7). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 Appendix D. Sample Code and Other Materials . . . . . . . . . . . . . . . . . . . . . . . 303 D.1 VisualAge for Java and VisualAge Generator V4 Code . . . . . . . . . . . . . . . . . . 303 D.2 VisualAge Generator V3 Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 D.3 Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305 Appendix E. Special Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 Appendix F. Related Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 F.1 International Technical Support Organization Publications . . . . . . . . . . . . . . . . 311 F.2 Redbooks on CD-ROMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 F.3 Other Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 How to Get ITSO Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 IBM Redbook Fax Order Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 List of Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 ITSO Redbook Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
ix
Figures
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. VisualAge Generator V4 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Developer on Java Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Integration of VisualAge Generator in VisualAge for Java . . . . . . . . . . . . . . . . . . . . . 14 Integration of VisualAge Generator in VisualAge for Java . . . . . . . . . . . . . . . . . . . . . 16 Part Filter and Part Browser Support Access to Parts in the Workspace . . . . . . . . . . 17 VisualAge Generator Parts stored as Methods in VisualAge for Java . . . . . . . . . . . . 18 Using 4GL Parts in Java Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 VisualAge Generator Parts on Free Form Surface . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 VisualAge Generator Integration to Java Component . . . . . . . . . . . . . . . . . . . . . . . . 22 Java Applet with Connections to/from 4GL Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Making Connections to VisualAge Generator Logic and Program Parts . . . . . . . . . . 26 Making Connections to VisualAge Generator Data Parts . . . . . . . . . . . . . . . . . . . . . . 27 Testing in Developer on Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 VisualAge Generator Parts Stored as Methods in VisualAge for Java . . . . . . . . . . . . 29 Development and Implementation of a Java Client with 4GL Parts . . . . . . . . . . . . . . 31 How Functions Work. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Arguments and Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Other Uses of Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Function Logic Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Map Edit Routine as a Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 How Object Scripts Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Data Exchange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 VAGen Script Wizard SmartGuide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Object Scripting Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Reusable Object Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Events Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 VisualAge Generator Templates Development Support. . . . . . . . . . . . . . . . . . . . . . . 51 VisualAge Generator Templates Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 What is a Generator/Visitor?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Generated System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Generation Scope and Store Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Entity Parameter Definition Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 VisualAge Generator Templates Entity Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Anatomy of a Web System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Web-Based Transaction Programming Skill Requirements . . . . . . . . . . . . . . . . . . . . 61 Comparing 3270 and Web Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Mapping 3270 Programming Constructs to Web Transaction Solution . . . . . . . . . . . 63 Web Transaction Implementation Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Web Transaction Implementation: Mapping Definition to Runtime . . . . . . . . . . . . . . . 65 Benefits of VisualAge Generator WebSphere RAD Approach . . . . . . . . . . . . . . . . . . 66
xi
41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. 81. 82. 83.
UI Record Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 UI Record Display Options for a Web Transaction Program . . . . . . . . . . . . . . . . . . . 70 Web Transaction: Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 UI Record Mapping to HTML Based on UI Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 HTML Forms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 UI Record Display and Transfer of Control Options . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Transferring Control between Web Transactions using UI Records. . . . . . . . . . . . . . 76 Web Transaction System Structure Options: Using CONVERSE . . . . . . . . . . . . . . . 77 Web Transaction System Structure Options: Using XFER pgm WS, UIRec . . . . . . . 78 Web Transaction System Structure Options: Using XFER , UIRec . . . . . . . . . . . . . 79 Web Transaction System Structure Options: Using Combinations . . . . . . . . . . . . . . 80 Web Transaction: Generation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Web Transaction: Runtime Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Runtime: Sample Configuration (Windows NT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Runtime: Sample Configuration (Windows NT / CICS TS) . . . . . . . . . . . . . . . . . . . . . 86 Runtime: Sample Configuration (OS/390) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 VisualAge for Java Enterprise Team Development Environment . . . . . . . . . . . . . . . . 92 Program and System Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Contained in Relationships between Program Elements . . . . . . . . . . . . . . . . . . . . . . 97 Part of Relationship between Packages and Projects in the Repository . . . . . . . . . . 98 Terms for Editions of Program Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Versioning Program Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Releasing Program Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 VisualAge for Java Workbench. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 Developer on Java VAGen Part Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 VisualAge for Smalltalk and VisualAge for Java Team Environment Containers . . . 115 Comparing Application and Package Structure Options. . . . . . . . . . . . . . . . . . . . . . 116 Content Rules for Applications and Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 Using Configuration Maps to Manage Applications . . . . . . . . . . . . . . . . . . . . . . . . . 118 Using Projects to Manage Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 Developer on Smalltalk Container Structure Example . . . . . . . . . . . . . . . . . . . . . . . 120 Developer on Java Container Structure Example. . . . . . . . . . . . . . . . . . . . . . . . . . . 121 Sample Developer on Java Container Structure derived from Subapplications . . . . 122 Sample Developer on Java Container Structure Derived from Applications . . . . . . 123 Using Project List Part Processing to Emulate a Layered Set of Projects . . . . . . . . 124 Traditional Development. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 Developer on Java Development with One Package for the Project . . . . . . . . . . . . 128 Developer on Java Development with One Package per Programmer . . . . . . . . . . 129 Developer on Java Development with One Package per System Function . . . . . . . 130 System Defined Using Multiple Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Sample Team Environment Container Breakdown. . . . . . . . . . . . . . . . . . . . . . . . . . 133 Implementation of Project Sets to Represent Phases of Development . . . . . . . . . . 135 Promoting a Package from Test to Production . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
xii
84. Promoting a Package from Test to Production . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 85. Using PLPs to Define Sets of Projects Used by Development Phase . . . . . . . . . . . 138 86. Promoting a Project from Test to Production Using PLPs . . . . . . . . . . . . . . . . . . . . 139 87. Java Client Generation Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 88. Java Client Generation Using the Same Package as the Java Component Source 141 89. Java Client Generation Using a Shared Package in the System Project . . . . . . . . . 142 90. Initial Container Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 91. Second Container Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 92. Final Container Breakdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 93. Project Creation SmartGuide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 94. Package Creation SmartGuide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 95. Team Environment Container Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 96. VisualAge Generator Import Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 97. Database Definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 98. Target Package Selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 99. Sample Program Call Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 100. Cleaning Up Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 101. Versioning the Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 102. Class List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 103. Package List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 104. Component Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 105. CustomerListPanel Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 106. CustomerDetailPanel Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 107. CustomerListApplet Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 108. CustomerListApplication Prototype. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 109. CustomerDetailApplication Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 110. Reusable Component Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 111. CustomerListPanelResource Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 112. CustomerListPanel Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 113. CustomerDetailPanelResource Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 114. CustomerDetailPanel implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 115. CustomerListApplet Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 116. CustomerListApplication Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 117. CustomerDetailApplication Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 118. Team Development Library Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 119. VisualAge Generator Developer on Smalltalk Team Development Environment. . . 199 120. Team Environment File Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 121. Library and Image Interactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 122. Image as a Temporary and Saved Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 123. Smalltalk Software and the Team Environment Management Components . . . . . . 209 124. VisualAge Generator Part Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 125. VisualAge Generator Extended Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 126. Applications and Subapplications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
xiii
127. Configuration Maps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 128. Edition Definition Illustrated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 129. Loading Another Edition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 130. Version Definition Illustrated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 131. Scratch Edition Definition Illustrated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 132. Team Environment Change Management Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 133. Summary of Team Environment Component Management Steps . . . . . . . . . . . . . . 223 134. Levels of Component Responsibility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 135. Configuration Map Roles and Configuration Map Manager Responsibilities . . . . . . 227 136. Application Roles and Application Manager Responsibilities . . . . . . . . . . . . . . . . . . 228 137. Class Owner and Class Developer Roles and Responsibility . . . . . . . . . . . . . . . . . 229 138. Serial Versus Concurrent Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 139. VAGen Application/Extended Class Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 140. Reconciliation of Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 141. Extended Class Ownership + Concurrent Development = Confusion . . . . . . . . . . . 239 142. Traditional Source Library for Development Team . . . . . . . . . . . . . . . . . . . . . . . . . . 240 143. VisualAge Generator Development with One Application for the Project . . . . . . . . . 241 144. VisualAge Generator Development with One Application per Programmer . . . . . . . 242 145. Configuration Map Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 146. Application Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 147. Code Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 148. Serial Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 149. Workbench Managing Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 150. Management Query Facility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 151. Using Predefined Query Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 152. Specifying a Shared Resource Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265 153. The Basic Development Pattern for Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 154. Single Developer Working with a Single Package . . . . . . . . . . . . . . . . . . . . . . . . . . 271 155. Working Pattern for Class Owners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 156. Establishing a Package Baseline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 157. Merging Divergent Class Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 158. Establishing a Project Baseline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 159. A Rolling Project Baseline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 160. Split Stream Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 161. Valid State Transitions for Projects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 162. Valid State Transitions for Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 163. Valid State Transitions for Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
xiv
Tables
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. Java Class Types used to Store VisualAge Generator Parts. . . . . . . . . . . . . . . . . . . . 18 Data Item to Java Data Type Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Java Client Generation Naming Pattern. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Sample Team Environment Container Breakdown Package Content . . . . . . . . . . . . 134 Programs to Migrate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 Team Environment Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 IsaActionEventHandler Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 IsaErrorRoutine Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 IsaLogic Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 IsaComboBox Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 IsaComboBox Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 IsaTable Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 IsaTextField Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 CustomerListPanel Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 CustomerDetailPanel Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 VisualAge Generator Configuration Maps and Applications . . . . . . . . . . . . . . . . . . . 304
xv
xvi
Preface
This redbook introduces the new function and development platforms provided in VisualAge Generator V4. Also included are primers on the team development support provided in each platform: Developer on Java and Developer on Smalltalk. With VisualAge Generator V4, two development platforms are provided: Developer on Java (Java interoperability, new with V4); and Developer on Smalltalk (Smalltalk interoperability, first introduced with V3). The new capabilities included in V4 include: function support, object scripting, enhanced VisualAge Generator Templates development support, and support for WebSphere Rapid Application Development (RAD). Functions provide for reusable code; object scripting allows for direct object access during 4GL logic; VisualAge Generator Templates enhancements include support for new target system types and better information model management; and WebSphere RAD simplifies the development and implementation of Web-based transaction systems. Also, to further understand the Developer on Java platform, a migration and development process, focused on the implementation of a Java GUI system, was performed. This resulted in a sample GUI system, which includes a set of reusable Java classes that assist in the process of application development when using Developer on Java.
xvii
Thanks are also due to: Ueli Wahli, for the use of the Java team environment material The San Jose Publishing Team (Joan Bow, Yvonne Lyon, Deanna Polm and Emma Jacobs), for their assistance in finishing this redbook
xviii
Comments Welcome
Your comments are important to us! We want our redbooks to be as helpful as possible. Please send us your comments about this or other redbooks in one of the following ways: Fax the evaluation form found in ITSO Redbook Evaluation on page 325 to the fax number shown on the form. Use the electronic evaluation form found on the Redbooks Web sites: For Internet users http://www.redbooks.ibm.com/ For IBM Intranet users http://w3.itso.ibm.com Send us a note at the following address:
redbook@us.ibm.com
xix
xx
Part 1. Introduction
Part 1 includes the following chapters: Chapter 1, VisualAge Generator V4 Overview Chapter 2, Java-Based Version of VisualAge Generator Chapter 3, Introduction to VisualAge Generator V4 Enhancements
These chapters provide a general introduction to VisualAge Generator V4, with a specific focus on the new integration with the VisualAge for Java platform and new functions provided by both the Developer on Java and Developer on Smalltalk development environments.
Functional Enhancements:
Function Logic Part Object Scripting Web-Program / UI Record New VAGen Templates Generators SUN Solaris Runtime Enterprise Java Bean Support (Java Platform Only)
ENVY:
Image Manager Configuration Maps Applications
Pf m C am B pm Sj g
ENVY:
Workspace Repository Projects Packages
Library (manager.dat)
Repository (ivj.dat)
Red Cam
Red Q rs
Qrs
Sjg
Qrs
Bpm
VisualAge Generator V4 introduces both functional enhancements and new development and runtime platforms. With VisualAge Generator V4 you get: VisualAge for Java InteroperabilityA new development platform FunctionsTrue reusable coding capability Object ScriptingTight integration between 4GL and object logic VisualAge Generator Templates EnhancementsA better RAD engine SUN Solaris Runtime SupportA new runtime platform WebSphere RAD SupportWeb systems made easy Enterprise Java Bean SupportIntegrated support for advanced Java-based distributed object systems
Functional Enhancements:
ENVY:
Workspace Repository Projects Packages
Red Cam
Qrs
Sjg
Qrs
Bpm
Repository (ivj.dat)
Function Logic Part Object Scripting Web-Program / UI Record New VAGen Templates Generators SUN Solaris Runtime Enterprise Java Bean Support (Java Platform Only)
With the Developer on Java you can build pure 4GL-based systems and: Java ApplicationsRobust traditional GUI systems Java AppletsGUI-like function delivered in a Web browser Java ServletsThin client systems using a Web browser and backend server-side logic
The option of a VisualAge Generator development platform (the Developer on Java) enables you to: Integrate e-business and traditional application system development Obtain access to the world of reusable Java components being developed by other vendors and business partners.
Notes:
This type of integration, for the Developer on Smalltalk development platform, was introduced in VisualAge Generator V3.0. The team environment repository (library) implementation used by VisualAge for Java cannot be shared with the Developer on Smalltalk development platform. The Developer on Java development environment is discussed further in Chapter 2, Java-Based Version of VisualAge Generator on page 13.
1.2.1 Functions
Functions are the logic part in VisualAge Generator V4. They support logic definition, the use of 4GL processing options (CONVERSE, INQUIRY, SQLEXEC) and the option of passed parameters. Functions replace statement groups and processes. These replaced parts are converted to functions during migration. The capabilities of a function part equal and exceed those provided by process and statement group logic parts. This enhances reusability of VisualAge Generator code by adding: Support for parameters Support for the development of true reusable 4GL code Local storage option to avoid naming conflicts during function reuse
Existing instances of Smalltalk or Java classes can be accessed, or new instances can be created, as needed. EZESCRPT is only valid in GUI client programs, not in server programs. For example, in a GUI component that has visual connections to execute individual VisualAge Generator functions and invoke a VisualAge Generator server program, the use of the EZESCRPT function word would be valid in the individual 4GL functions, but not within the server program. See 3.2, Object Scripting on page 42 for additional information.
VisualAge Generator Templates has been enhanced with VisualAge Generator V4 to provide: Generation of Java-based systems Improved integration with VisualAge Generator Implementation of a VisualAge Generator Templates on Java version of the information model and generators Redesigned user interface to improve both entity definition and information model source management See 3.3, VisualAge Generator Templates Enhancements on page 51 for additional information.
VisualAge Generator stand-alone (TUI) and server programs can be generated as C++ programs that support: Both the native operating system and CICS-based execution DB2, Oracle, and ODBC database access
Further details are provided in Chapter 3, Introduction to VisualAge Generator V4 Enhancements on page 35.
A new model of programming is provided with VisualAge Generator V4. This new programming model includes: New main program typeMain TransactionUI Records and Segmented New record typeUser Interface (UI Record) The support for this new programming model implemented in VisualAge Generator V4 permits: The development of main programs, using 4GL programming techniques, that can interact with end users in a Web browser. These 4GL-based programs implement user interface, business logic, and database processing. This processing can be implemented in either a series of main programs or a set of main and called batch (server) programs. This flexibility will allow both for the migration (through rework) of existing text based transaction systems and client/server systems previously implemented in a VisualAge Generator 4GL programming environment. Testing of these new programs using the existing VisualAge Generator test facility and a Web browser. A default view for the UI Record is used in the browser. This communicates directly with the main program being tested. The use of generation technology to handle the complexities of runtime communication and processing. UI Record generation creates Java Beans and default Java Server Pages (JSPs) These materials can be used by Web-based user interface developers (who use HTML, XML, and so on) to access the data and render an appropriate screen. The Java Beans have methods that allow attribute access and a single action that puts all the inputs through the edits defined by the programmer.
The program is generated using the current VisualAge Generator pseudo-conversational model for runtime execution. CICS pseudo-conversational problems of state, transaction control, program flow, and so on, are similar to Web problems. The generated program is independent of the user interface; any tool that can access a Java bean can create a user interface view using the data available in the Java Bean. The power of the new 4GL-based programming model and generation technology will reduce the skill requirements, and therefore the price of entry, into the world of Web-based e-business transactional application systems. See 3.4, WebSphere Rapid Application Development on page 60 for additional information.
VisualAge Generator support for Enterprise Java Beans (EJBs) will allow Java clients to call VisualAge Generator server programs through an intermediary session bean. Support for calling server programs through an EJB session bean is directly applicable to Java development, and will only be provided within the Developer on Java development platform.
1.4.1 Introduction
The VisualAge Generator Automated IC Packaging mechanism is based on the image component (IC) technology available within VisualAge Smalltalk, on which the VisualAge Generator GUI development environment is based.
For more detailed information about image components (ICs), please consult Chapter 37, "Packaging with Image Components (ICs)" of the IBM Smalltalk User's Guide, SC34-4536-02.
10
ICs allow adding new GUI functionality to the application in an incremental manner. There are three types of ICs that are output as the result of the VG automated packaging:
Prerequisite Components
A prerequisite component is an IC that contains code that is shared (reused) by more than one view in more than one Smalltalk team environment application. If another IC directly references a class in a prerequisite component, then the prerequisite component is loaded before the component where the reference is made. Typically, a prerequisite component will contain shared GUI forms that are used within many different views within your application.
Loadable Components
A loadable component is one that is dynamically loaded when a symbolic reference to a class name contained within the loadable component is resolved. Within a loadable component, code should only contain direct class references to classes that: Are defined in the same application where they are referenced Are defined in a prerequisite component. Typically, a loadable component will only contain one or more view classes that will imbed shared forms and reference other views using ViewWrapper, Object Factories or Variable parts.
Launch Component
Output of the automated packaging process will include a special IC called the launch IC. The launch IC contains information about the contents of the other ICs produced in packaging, so that it can control the dynamic IC loading process. The launch IC also contains the name of the first view to be opened when your application is started. None of your application code is packaged into the launch component. To successfully make use of VisualAge Generator loadable components, it is important to analyze your existing VisualAge Generator GUI classes and applications and ensure that they conform to the above constraints for prerequisite and loadable components.
11
12
13
Workspace
Workspace
Library Connection:
EMSRV Only
Cam
Red
Repository (ivj.dat)
Qrs
Sjg
Qrs
Bpm
14
Note: Much of the code used in the Developer on Java version of VisualAge Generator is shared with the Developer on Smalltalk version. This means that there will be visual differences in the user interfaces used in native VisualAge for Java and VisualAge Generator windows and dialogs. For example, the VisualAge for Java Workbench uses circular buttons, while rectangular buttons are used by VisualAge Generator part browsers, editors, and dialogs.
This is the file used to store all code available for use in the development environment. One or more development platforms can connect to the same Repository. This is roughly identical to the Library used in the Developer on Smalltalk version of VisualAge Generator.
Workspace
This is the file used to store all code currently being used in a development platform. This is roughly identical to the Image used in the Developer on Smalltalk version of VisualAge Generator.
Package
This is a named collection of classes. The package naming pattern is name.name.name. This construct is similar to an Application in Smalltalk. However, there is no concept of prerequisites or SubPackages. In Java, package relationships must be directly managed by the programmer.
Project
This is a named collection of packages. The project naming pattern is Name. This construct is similar to a Configuration Map in Smalltalk. However, there is no concept of required projects. In Java, project relationships must be directly managed by the programmer.
The class management rules in VisualAge for Java differ from those used in VisualAge Smalltalk (see Figure 4).
15
Projects
System Layer Logical Structure
Proj Sub-Sys A
Packages
...
Pkg Pgm 3
Managed Components
Pkg Pgm 1
Pkg Pgm 2
Pkg Records
Classes
VAGen Part Containers
16
Workspace
Proj Sub-Sys A
Pkg Pgm 1
Pkg Pgm 2
VAGen Programs
Pkg Pgm 3
VAGen Functions
Part Browser is only way to list and edit VAGen parts loaded in Workspace
Figure 5. Part Filter and Part Browser Support Access to Parts in the Workspace
The VisualAge Generator preferences notebook will only be available from the Parts Browser as well. Copy and move will work for VisualAge Generator part methods on the workbench, however, the programmer would be limited to naming the new method according to the Java rules for method naming. With the Parts Browser you can use the less restrictive VisualAge Generator naming rules, and for instance, include a dash (-) in a part name. The Parts Browser logic creates and manages an alias for the part when it is stored as a method (see 2.1.5, Part Name Aliasing on page 19).
17
VGenXXX Class
(VA Generator Parts)
Classes
Methods
Package B Classes
Methods
Package D Classes
Methods
VGenXXX Class
(VA Generator Parts)
VGenXXX Class
(VA Generator Parts)
The mapping of VisualAge Generator part types to Java class names is shown in Table 1.
Table 1. Java Class Types used to Store VisualAge Generator Parts
Java Class
VAGenPrograms VAGenFunctions VAGenMapGroups VAGenMaps VAGenRecords VAGenTables VAGenPSBs VAGenDataItems VAGenOptions VAGenLinkages VAGenResources VAGenBindControls VAGenLinkEdits
18
This escape sequence will consist of a lower case 'x', followed by the 4-byte hexadecimal value of the character. For example, the part name MY-RECORD contains a hyphen (-) that would be invalid in a Java method name. Therefore, the method created for this part will be named MYx002DRECORD. The user will see the actual method names (with escape sequences) in the Java Workbench, but the actual part names will be displayed in the parts browser.
19
If the workspace contains any duplicate part names and either a generation or start testing request is made, an error message will be issued and the generation or testing request will stop. The part browser includes an option to display a list of the duplicate part names in the workspace. This provides an easy means to find and resolve the existence of duplicate part names in the workspace.
2.2.1 Introduction
VisualAge Generator is fully integrated with the VisualAge for Java programming environment (see Figure 7).
Any Java component (Class, Applet, Application, Servlet) can be defined to include the use of VAGen 4GL parts Adding 4GL parts is as simple selecting the part type from the palette and dropping it on the FFS Additional support code (VAGen context, VAGen communication session) is dynamically added to the component VAGen data parts (records and table) have been defined with attributes that allow connections to other Java parts to be made When the Java component is tested, the VAGen Test Facility takes charge when 4GL parts are referenced.
Figure 7. Using 4GL Parts in Java Components
Java Components
Class Applet Application Servlet
VAGen Parts
Records Functions Tables Programs
Test Facility
The Developer on Java platforms supports both pure 4GL programming (TUI or Web Transaction) and Java-based programmingextended (some would say improved) by the capabilities of VisualAge Generator.
20
Special parts
VAGen variable VAGenCommSessionPart
Adding VAGen part to FFS triggers generation of initial VAGen integration logic (support methods)
Figure 8. VisualAge Generator Parts on Free Form Surface
The standard and special VisualAge Generator parts included are comparable with those provided in VisualAge Generator V3.x. The VAGenCommSessionPart is a visual representation of the client/server session, and can be used to promote sharing of the session between multiple client components. When 4GL parts are added to the FFS, VisualAge Generator integration support code is automatically added to the Java component. The act of dropping the first 4GL part on the FFS triggers VisualAge Generator integration processing logic. This adds methods to the Java component that support identification, processing support, and exception management for 4GL parts in the Java component (see Figure 9).
21
3 1
Part on FFS Save Bean
The life cycle steps for a Java component with respect to adding 4GL parts (a record) to the FFS, as shown in Figure 9, are: 1. Base methods that exist in a Java component (class) without any 4GL parts involved 2. Java component, after adding a 4GL part to the FFS 3. Java component, after using the Bean -> Save Bean menu Visual Composition menu option These parts are available in the composition editor category VAGen Parts: VAGen VAGen VAGen VAGen Table Part Record Part Function Part Program Part
22
A list of Table/Record parts contained within the Java workspace will be provided. The programmer can choose one of the names provided, or enter another Table/Record name. Once the part is dropped, the list of properties available for connection will be the same as the attributes available on the Smalltalk editor. For example, if the internal structure of a Record CUSTINFO is: 05 CUSTOMER-INFO 10 NAME 15 LASTNAME 15 FIRSTNAME 10 SOCIALSECURITYNUMBER 77 MISC-INFO The following will be listed for the properties of the Record: data NAME NAME data MISC-INFO MISC-INFO data this
The substructured data items and their data will be accessible through tear-offs. These properties will be READ/WRITE and BOUND (except this , which is read-only). This means that values can be read from or written to these data items. Since the items are BOUND, notification will be sent whenever the value of any item is changed. As an example, imagine a simple Java applet TestApplet in the composition editor. The applet contains a TextField with a connection from the property text to the property LASTNAME of the CUSTINFO record. When the applet is saved on the composition editor, JAVA code will be generated so that when the applet is run, the applet TestApplet will be registered as a "listener" of the item LASTNAME. Whenever the value of this item is modified, TestApplet will be notified of the change. Consequently, all Object properties that are connected to a data item will automatically be updated whenever a data item's value is changed. One exception to this is when the value of a data item is modified within a VAGen Function. Notification will not be sent until the function completes, or an EZESEND is reached. This means that if an item is modified multiple
23
times within a Function, change notification will only occur once for that item, when the Function completes or the EZESEND is executed. The Record/Table parts will know how to create table models from their substructured data items so that the substructures can be represented in Swing tables. Table 2 lists the Java Type that is associated with each VisualAge Generator data item type.
Table 2. Data Item to Java Data Type Mapping
Java Type
24
VisualAge Generator communication session information (VAGen commSession, VAGen commSessionOwner, VAGen inheritsCommSession). These communication session properties will be removed from the view class if all of the VisualAge Generator parts are deleted from the free form surface.
The VisualAge for Java visual programming environment can be used to interact with VisualAge Generator 4GL logic parts. This process is conceptually similar to the support for 4GL parts provided in VisualAge Generator V3 (Developer on Smalltalk).
25
Figure 11 shows the properties that can be referenced when making connections to logic or program parts.
Figure 11. Making Connections to VisualAge Generator Logic and Program Parts
For logic parts, the connections are straightforward. Invoking execution, or reacting to a hasExecuted event, is possible. Methods and properties that provide access to the return value or status of the execute request are also available. For VisualAge Generator program parts, linkage table information is also accessible (see Figure 11), and can be defined dynamically in client logic. The VisualAge for Java visual programming environment can be used to interact with VisualAge Generator 4GL data parts (see Figure 12). For data parts, the connections use the array item definition, and not the array item data alternative. Single data item connections target the item data definition. The connections are implemented in Java methods. These methods connect the VisualAge Generator data structure to the target Java part. The real work
26
is in the classes that represent the 4GL parts; they translate the VisualAge Generator data structure into a form that is compatible with Java parts (the model attribute is an example).
JTextField (Swing)
JList (Swing)
JTable
ScrollPaneTable
(Swing)
Figure 12 shows connections, and the associated Java methods, that implement communication between a VisualAge Generator record and selected Java parts. 1. A direct connection to a list part (AWT) is not possible. A series of add(string) method invocations is required to add instances to the list. 2. A direct connection from a data item to a JTextField part is made using the item data definition. 3. A direct connection from an array data item to a JList part is made using the array item definition. The target attribute is the list model. 4. A direct connection from an array data item to a JTable part is made using the array item definition. The target attribute is the table model. An additional method is used to define the table columns using the record item array structure passed as the model (form and data). For more information see Chapter 10, GUI Development with Developer on Java on page 167.
27
2.3.1 Testing
The VisualAge Generator Test Facility works with the Java testing environment to manage the emulation of 4GL data and logic parts. Once Java Client generation has been performed, the runtime logic (Java source code) for the 4GL parts can be used in the Java test environment.
28
2.4 Generation
The Developer on Java development platform supports generation of Java for VisualAge Generator parts used in Java components as well as the standard generation processing (C++ or COBOL) for programs, maps, and tables (see Figure 14).
Proj Sub-Sys A
Workspace
Generate
Java
Components
Pkg Pgm 1
Pkg Pgm 2
VAGen Programs
Pkg Pgm 3
VAGen Functions
Workspace
Proj Sub-Sys A
Generate
Pkg Pgm 1 Pkg Pgm 2
VAGen Programs VAGen Records VAGen DataItems VAGen Functions
Prepare
Pkg Pgm 3
Compiled Executables
Figure 14. VisualAge Generator Parts Stored as Methods in VisualAge for Java
29
cumulative. That is, multiple /PROJECT options can be specified on the generate command. For example the generate command: hptcmd generate MYPROG /PROJECT="My Project", "Version 1.0" /PROJECT="Your Project", "Version 29.5" ... will cause both projects specified to be loaded.
When these Java components are tested in the Developer on Java development platform, the VisualAge Generator test facility is used to support the 4GL parts. Java client generation allows 4GL parts used in Java components to be implemented in a Java enabled runtime environment (see Figure 15).
30
Define - Test
Java
Components
Pkg Pgm 1
Proj Sub-Sys A
Workspace
2
Generate
Pkg Pgm 2
VAGen Programs VAGen Records VAGen DataItems VAGen Functions
Pkg Pgm 3
3 Export 5
Combined to Implement Executable Client
Classes or JAR
The Java client development, testing, generation, and implementation scenario shown Figure 15 is described below: 1. Define and test a Java Application that uses 4GL parts. 2. Generate Java source to implement the logic required for the 4GL parts used in the Java Application. 3. Export and deploy the Java Application and Java byte codes generated for the 4GL parts to a target client runtime platform. 4. Install and configure Java client runtime support (part of the implementation of Java client generation) on the target client runtime platform. 5. Execute the Java Application in a Java enabled runtime environment.
2.4.2.2 Generation Processing A new generation option will be added to support the generation of the 4GL parts used within a Java Client. The generation option /PACKAGENAME is used to specify the name of the package that will hold the generated runtime code. Since the generated Java runtime code will be placed into the
31
repository, the specified package must exist in the Java workspace, or the generation will fail. A generation dialog will be provided (accessible from the Workbench) to allow the programmer to generate the runtime code for the 4GL parts used within a Java Client. This dialog will allow the user to specify which Generation Options file to use during generation. The generated Java code will be placed in the repository (and the Java workspace). The generated classes will have to be versioned and released when generation is complete. In addition, a method named HptRuntimePackage will be placed into the Java Client during generation. This method will return a java.lang.String that represents the name of the Java package containing the generated runtime code. This will be the equivalent to whatever is specified in the /PACKAGENAME generation option. Because this information is stored into the Java Client, the class will have to be versioned and released when generation is complete.
2.4.2.3 Implementation Java classes and methods are generated for the 4GL parts included in a Java component. The Java code generated is directly stored in the workspace and team environment repository being used by the Developer on Java development platform.
The naming convention for the generated Java classes for a 4GL part named NNNN are illustrated in Table 3.
Table 3. Java Client Generation Naming Pattern
Naming Pattern
Working Storage Record Table File SQL DL1 Functions (As methods in one generated class)
VGGuiNNNN
32
All 4GL functions used in a Java component are implemented as methods in a single generated class. The generated class is named VGGuiCCCC where CCCC is the name for the Java component. Here is an example: A function named FOO used in a Java Application named MyJavaAppl is generated as a method named funcFOO in the generated Java class named VGGuiMyJavaAppl . The generated Java class VGGuiMyJavaAppl : Contains references to all the 4GL parts used in the Java component that were generated using the Java client generation support. Provides an interface between the Java component that uses generated 4GL parts and the implementation of the 4GL parts in Java (as performed by Java client generation). The Java code generated for related 4GL parts is grouped in one Java package. The generation option /PACKAGENAME is used to specify the name of the package that will hold the generated runtime code. This package can be deployed to platforms supported by the VisualAge Generator Java Client Runtime Support. The generated Java classes and methods can be exported as Java source files (.java), Java byte codes (.class files), or a Java archive file (.JAR).
2.4.2.4 Java Client Runtime Support The common services required by a Java component that uses generated 4GL parts are provided by Java Client Runtime Support. This support includes:
Generic record, data item, table, and program processing functions PowerServer API support for client/server communications A JAR file is used to package the Java code that implements the Java Client Runtime Support. This code must be installed on a target runtime platform.
33
34
3.1.1 Usage
Functions can be invoked as a transfer statement type, just as was done with statement groups, or they can be coded inline within another type of statement (such as an assignment, math, conditional, and so on), as shown in Figure 16.
35
PGM1
FUNC1
....
index = 1; arg1 = 8; arg1 = 8 0 index = 1
FUNC2
index = 39 .... parm1 = parm1 = 0; index = 39; ....
....
FUNC2(arg1,..,argN); IF arg1 = 0;
.... ....
FUNC3
.... .... EZERTN retval;
....
Since they replace both former statement groups and processes, when you define a Program, all the program logic is contained in functions. In this example, FUNC1 is a main function of PGM1. Functions have access to all storage areas of the Program that contains them or invokes them: in our example, FUNC2 could reference directly arg1. However, for a function to be reusable in different programs that may not have common storage areas (Records, Items, and so on), it is possible to use Parameters. When a function is invoked with a set of Arguments, like FUNC2 in this example, the arguments arg1..argN are known to the function as parm1..parmN (parm1...parmN must be defined when FUNC2 is defined): when FUNC2 uses parm1..parmN it is really directly using the original storage area of arg1...argN. For a function, you can specify local storage data elements (Records, Items): this allows for the use of the same data definitions in different parts of a program, but with different values that are scoped locally to the function. In our example, index is a data item visible in FUNC1 within PGM1; if I need a variable area identical to index inside FUNC2, I can simply specify, when I define FUNC2, that I want to use index as local storage. This ensures that a local copy of index, containing its own value, will exist during execution of
36
FUNC2. This eliminates the requirement for the creation of two identical data items (or records). Finally, functions can return a value to the invoking statement. This is accomplished by coding an EZERTN statement with a return value associated to it: this value is an item representation of the function (with data item characteristics defined for the return value in function definition) within the invoking statement. Data items, records, and literals are used as function arguments (see Figure 17).
Arguments
Data items
can be subscripted can be map or SQL items not implicit
Parameters
Data items
can be map or SQL items can test/modify state
Records
can be WS or other
Records
only WS cannot test/modify state
Literals
Data items
modifications discarded on return
You can specify as arguments normal data items, map items and SQL data items. If you pass a map item or an SQL item you can specify the corresponding parameter also as a map or SQL item: this allows to test and modify item state (for example, SET map_item MODIFIED) within the function. You can specify as arguments any type of record (working storage, SQL, UI Record, and so on), however the receiving parameter can only be a working storage record. This means that record state cannot be tested or modified (the statement TEST recname NRF is not allowed if recname is the receiving parameter): you can set/test the argument name directly (instead of the parameter), but this defeats the purpose of function for generalization and reuse.
37
If literals are passed as arguments, they must be received as data items. If the item is modified within the invoked function, the test facility will stop with an error! However, if you generate anyway, this condition is not detected by the validation step of pre-processing, and during runtime the modification will just be discarded upon return to the invoking function (literal is essentially protected by creating a local copy of it within the function). Figure 18 reviews some additional capabilities of functions.
Functions can be specified as the true and false routines of a FIND or a TEST statement. In this case no arguments can be specified on navigating (and the statement editor will not even let you enter the parentheses), so the basic use is for control transfer. Functions can be specified as the error routine of an I/O option, and as an edit routine of a map data item. In this case, no arguments can be specified on invocation, so to create reusable error processing functions or generic edit functions, you need to implement a two-tier nesting approach: the I/O error function is specific to the I/O (aware of specific record state and data) and in turn can invoke a generalized error processing logic passing required arguments. For a map item edit function, a tier-1 function will invoke the generic edit function passing the map item to be checked: this is a recommended way to handle map array edits: tier-1 function (specified for the array) invokes tier-2 function that accepts the current array item in a parameter, so that the edit logic can be written once for all elements of the array.
38
3.1.2 Examples
An example of reusable logic, implemented using a function, is shown in Figure 19.
The example in Figure 19 shows how you can create a Universal validation routine, for example you have a common algorithm for all Identifiers. This reusable function (IDVALIDATOR) is invoked from CUSTOMER_INSERT to validate, in this case, the customer ID. The generic reusable function sets the return code for the invoking function, and it does not know or care about the fact that is validating Customer ID or Supplier ID or whatever. Notice the definition of the functions local storage and parameters. The LOCALREC data structure could be also used in other parts of the program, but when used here, the storage area is obtained locally to the IDVALIDATOR function only. An example reusable map edit routine is shown in Figure 20.
39
The example in Figure 20 shows a map array, SALARY[1...4], with an edit routine MEDF1. MEDF1 is a function with a local storage variable, NUMBER. MEDF1 is invoked automatically when any of the elements of the array is modified, it loops through all elements and for each invokes a reusable function, MED2, passing the current element of the array, SALARY[NUMBER]. MED2 actually implements the edit algorithm and receives the current element as parameter SAL, as defined in Figure 20.
40
ANYDBCS ANYHEX The choice of loose typing helps widen the scope and flexibility of a reusable function. There is no need to specify bytes or decimals. The test facility and generated program logic determine what conversion is required based on the data passed to the function. Note: The use of loose typing may have an adverse effect on the size of the generated code (extra testing and conversion logic generated in the 3GL program). If you define the parameter type as one of the available loose values, you do not need to specify the decimal places or bytes values, thus no strong matching is enforced between arguments and parameter characteristics. If conversions need to occur, they are performed by VisualAge Generator (during test or generation).
When migrating from previous versions of VisualAge Generator or from CSP, processes and statement groups are automatically transformed into functions by the VisualAge Generator V4 import facility.
41
During import, statements are also parsed, and PERFORM statements and statement groups invocation statements are transformed into function invocation statements. During import, if statements are found that use VisualAge Generator supplied functions (such as string manipulation or math functions), the former type of invocation, using a CALL statement, is transformed into the appropriate function invocation. Depending on the function, this may become an inline invocation or a standalone invocation, as shown in the two examples. Use of the REPLY option on the CALL statement, is transformed into the appropriate equivalent use of the new function word, EZEREPLY, by adding a statement prior to the function invocation.
Note: Migration processing also converts process and statement group logic to the new function syntax.
3.2.1 Introduction
The Object Scripting facility is an innovative way to enhance the power of the VisualAge Generator environment by allowing direct and synchronous access to Java or Smalltalk methods from within a 4GL function running in the Java or Smalltalk environments. The fact that Object Scripts are executed immediately (synchronously) in the middle of the 4GL statements execution makes it possible, for example, to interact with UI parts based on the content of a 4GL data area or based on 4GL events. An example can help clarify this. Suppose you want to implement a status indicator based on the content of a 4GL data item: using Object Scripting you can fire a method that updates the status indicator on the GUI, and the Java or Smalltalk script can interrogate the VisualAge Generator data item to refresh the status value synchronously.
42
Prior to the availability of Object Scripting, a VisualAge Generator programmer would have had to resort to a complex and unnatural application design to accomplish this simple requirement. Another advantage of Object Scripting is the possibility to make data that can be modified outside of VisualAge Generator logic (such as in an EJB, Java, or Smalltalk environment) immediately available to VisualAge Generator statements. Because of the ability to directly invoke components such as Enterprise Java Beans (EJBs), Object Scripting is also an important step for e-business enablement.
3.2.2 Implementation
The new VisualAge Generator EZESCRPT special function word statement allows for the invocation of a Smalltalk or Java method (depending on the current development platform). EZESCRPT accepts a single parameter which can be either a literal with the name of the method to be invoked, or a data item whose value is the name of the method to execute (see Figure 21).
Note: The script invocable with EZESCRPT does not accept parameters.
Class
VG Function
WHILE DONE NE 1; ..... EZESCRPT ("showValue") IF DONE NE 1; .... END
showValue
Definition
New 4GL statement Code script natively or use Wizard Visibility:
Script can access 4GL parts in Class Script must be defined in Class
Test
Debugger integration Stack monitor nests through scripts
Figure 21. How Object Scripts Work
If you are not familiar with the Java or Smalltalk language, a wizard facilitates building required methods.
43
The method must be defined as part of the current class (the one that contains the VG function issuing the Object Script). In the method you can access any object/part visible within the class, including VisualAge Generator parts. For example, all the VG parts that have been dropped in the FFS are addressable from within the Java or Smalltalk script (method). The method can retrieve or store data in any visible VisualAge Generator data area. The method can invoke the synchronous execution of a visible VisualAge Generator function, thus allowing for nested VG-Java/ST-VG execution and true synchronized interoperability between VisualAge Generator logic and Java or Smalltalk logic. When the script terminates, control will return to the statement following the EZESCRPT statement in the invoking function. At this point, all data modified by the method is available to VisualAge Generator. During testing, when the EZESCRPT statement is found, the Java or Smalltalk debugger takes over to let you follow the execution of the Java or ST logic within the script. However, the VisualAge Generator Test monitor remains available, and in fact, if the Java method should invoke another VisualAge Generator function, this function will be placed on top of the current VisualAge Generator stack and will be visible in the stack monitor.
44
Get the value contained in SALARY data item and put it in Java integer variable salaryValue
Java method ... ... salaryValue = (int) getSTAFFWK().getLongData("SALARY"); ...
Figure 22 also shows an example of how to set the value of a VisualAge Generator CHA data item using another protocol of the record part STAFFWK. The method setStringData is used because we set a CHA data item using a Java string). This approach will allow programmers to interact with all VisualAge Generator part types. Code that uses these methods is automatically generated when connections are made to VisualAge Generator parts in the Visual Composition facility (see 2.2.7, Making Connections on page 25). The script wizard is also a good way to facilitate writing these type of statements, so that the programmer does not need to learn the special protocols.
45
To define a method (or Object Script) using the assistance of a Wizard, you need to go to the Class Definition facility of VisualAge for Java or VisualAge Smalltalk; you cannot invoke a wizard from the VisualAge Generator function definition editor. This is because the composition of a method requires the context of the containing class (and you could define a function part without having a defined class context. Figure 23 shows one of the dialogs shown during the use of the VAGen Script Wizard.
It is important to understand that the intent of the VAGen Script Wizard is to facilitate writing methods that allow easy access to parts and their properties.
46
In general, the wizard is optimized for the simplification of the basic tasks that VisualAge Generator programmers will need; the wizard was not designed to assist in the development of general purpose methods. The coding patterns supported by the VAGen Script Wizard include: Get an objectto get an object in the class and assign it to a variable Set a valueto set a property of an object in the class Invoke an actionto send a message to an object in the class Free form statementallows you to enter any statement
You could use a set pattern, for example, if a data item must be set conditionally based on different contents of other Java parts properties (for example, if the value of a slider is below a threshold, you may want to set the data item value to 0; otherwise set the data item to the actual value).
FUNC1
IF SALARY NOT NUMERIC; EZESCRPT("ErrorInMsgField"); END; STAFF ID SALARY ... MsgField errorInMsgField
GUI1
void errorInMsgField() { java.awt.TextField localField; /* set error text and set field red */ localField = getMsgField(); localField.setText("Salary is not numeric!"); localField.setBackground(java.awt.Color.red);
FUNC2
EZESCRPT("validateID"); IF MESSAGE = " "; CALL CUSTSRV CUSTWS; END;
validateId
GUI2
TextField1
void validateID() { String myid; myid = getTextField1().toString(); if (myid.length() != 4) { getCUSTWS().setStringData("MESSAGE", "Invalid Identifier");} else { getCUSTWS().setStringData("CUSTID", myid.toUpperCase();} }
47
In the first example, we see how a 4GL function (FUNC1), which is being used inside a Java Application (GUI1) to validate the SALARY data item, can invoke an Object Script (errorInMsgField ) to set a message Text field (MsgField) control defined in the Java GUI1 application to the color red. Notice how the 4GL record STAFF is also part of GUI1 (so that FUNC1 can reference the record contents). Also notice how the method errorInMsgField (our script) is one of the methods defined for GUI1: this method obtains the MsgField object into a local variable, which is a java.awt.TextField, using the getMsgField() method. (This method becomes available as part of the protocol of GUI1 after you drop the TextField part on the GUI, name it MsgField , and you save the bean.) At this point the whole protocol of the java.awt.TextField class is available for the local variable: we used the setText(String) message to set the message text in the message field, and the setBackground(java.awt.Color.red) to set the color. This script can be built using the Object Script wizard. The second example shows how an object script (validateID ) can be invoked from a function (FUNC2) to perform a validation of the content of a VisualAge Generator data item (CUSTID) before calling a server program to go add a customer to the database. We take advantage of the Java String class protocol to make sure that the length of the Customer Identifier is 4 digits, and to fold the entered string to uppercase if the length is correct: notice how the script validateID communicates with VisualAge Generator data items MESSAGE and CUSTID to set them to values according to the results of the validation algorithm, prior to returning to the invoking function FUNC2. In fact, the FUNC2 statement following the EZESCRPT invocation directly tests the content of MESSAGE (which was set by the Java method) to determine how to proceed.
48
.
FU NC1
IF SALARY NOT NUM ERIC; M OVE "SalaryText" to FIELD_N AM E; EZES CRPT("ErrorInField"); END; IF FIELDLE N(ID) NE 4; M OVE "IdText" to FIE LD_NAME; EZES CRPT("ErrorInField"); END;
GUI1
errorInField
VGREC | localField | ... FIELD_NAME ... " get subpart name from VG find subpart and set to red" localField: =(( self subpartNamed: 'VGREC') abtAtAttribute:#'FIELD_NAME' data). (self subpartNamed: localField) backgroundC olor: 'red'.
In Figure 25: The 4GL logic: Does the validation of the values (contained in VisualAge Generator data items SALARY and ID) Sets the data item FIELD_NAME to the name of the data item being validated in the GUI part Invokes the script ErrorInField The script (Smalltalk in this example): Finds the subpart corresponding to the name passed to the script in FIELD_NAME by the 4GL logic Uses a method (backgroundColor: aColor ) to set the named GUI entry field to red
49
When you code an Object Script statement that will trigger a 4GL event, the event is fired synchronously instead of being deferred until the end of the execution of the function (see Figure 26).
Using EZESCRPT changes event synchronization Events triggered by EZESCRPT are fired immediately
FUNC1 ..... EZESCRPT ("myScript") .... myScript
GUI1
FUNC2
execute
Events triggered by 4GL (data triggers) are deferred until the end of the logic unit or until an EZESCRPT statement
Figure 26. Events Synchronization
The example in Figure 26 shows an event trigger for ITEM1 that will cause the execution of FUNC3. This event is triggered by both FUNC1 and FUNC2: FUNC1the event is fired immediately after ITEM1 is modified by the Object Script myScript invoked from FUNC1 The end result of the execution of FUNC3 logic (such as the availability of new or modified data) is immediately available to the logic following the EZESCRPT statement found in FUNC1. FUNC2the event is fired after FUNC2 has finished execution if ITEM1 was modified by a 4GL statement inside FUNC2. The end result of the execution of FUNC3 logic is not available until after FUNC2 has completed.
Note: Existing VisualAge Generator applications will continue to behave consistently after migration to V4. The pure 4GL event trigger processing is consistent with previous versions.
Another word of caution on events synchronization: now that we have mentioned how some events are triggered immediately within a script, we
50
need to mention that there are some exceptions: One exception is the clicked event of a button: this is a deferred event, which means that if the script sends a message to click the button, the clicked event will let other pending events to be processed first. Another situation is peculiar to Java: Java handles events in separate threads, which do not process until the current thread completes execution; therefore if within your script you change the value of a TextField, and your visual composition uses the textValueChanged event to execute a 4GL function, the function will not be executed within your script, but at the end of it. We have not identified all possible exceptions, so additional experimentation and study will be required.
3.3.1 Introduction
Support for VisualAge Generator Templates development is provided in both VisualAge Generator V4 development platforms (see Figure 27).
VAGT VA Generator
Based on shared:
Information model User interface Generator design
VAGT VA Generator
VA Smalltalk
IBM Smalltalk
VA Java
Java
51
The new VisualAge Generator Templates support for V4 includes: New generator types Improved development user interface Isolation of generation and functional entity definitions for improved definition source management
3.3.2 Architecture
The VisualAge Generator Templates architecture is shared on both development platforms (see Figure 28).
Other tools
Database
Import
Information Model
VAGen Templates Browser
VAGen Templates Generators
Customization
Other targets
Figure 28. VisualAge Generator Templates Architecture
The shared architectural framework includes the following features: The same information model and user interface is used to support definition and generation. The Information Model and generation technology can be customized. Relational database import support bulk-loads the Information Model with data definitions. The VisualAge Generator Templates browser supports Information Model entity definition and generation. The entity definitions represent the basic system constructs, which can be implemented by generators in any chosen target runtime environment.
52
The design of the generators is shared, with some producing identical code on each platform (TUI, Web Transaction). Other generators are designed for the target runtime platform (Smalltalk-based or Java-based GUI systems.
A Generator/Visitor is a Java class that uses : the generation framework, the API of the Information Model the Target Entity classes Visitors to build target entity instances.
Fetch specs
Relatio nal Tabl e D ataE l ement nterfac I e Un it Busi ness O bjec t
Build
ValueS tyl e
Generation Framework
Target Entities
As shown in Figure 30, the high level architectural view for a system generated by VisualAge Generator Templates is the same for all target runtime environments (generator types).
53
TUI / Main Programs Smalltalk GUIs and Objects Web Transaction Programs UI Records Java GUIs and Objects Server program parts Reusable system functions
Data
During generation, entity definitions are obtained using the Information Model API, and a target system (entities) is created. A generator: Produces client and server components for graphical and textual user interfaces Automates the production of functions for: Data access Concurrent access management Presentation Navigation Other reusable functions
Allows development standards to be integrated into generation process As shown in Figure 31, generation control for a specific generation request is a mix of: The scope of the generation request. The number of generators that are run against a entity instance is determined by the generation scope defined for a generation request. The store processing option chosen. The target package names are defined in the generation parameters.
54
Generation Scope
Generation Scope
Instance only With associates With associates and predefined beans
Interface Unit Business Object Target Interface Unit
Workspace
Store Options
Normal Overwrite Reset Customize
Pkg1
Proj
Pkg2
Pkg3
VAGen Records
VAGen Functions
The generated component types created during generation are also defined as part of a generation request: Client Server Layout This provides flexibility in team responsibility and generation independence.
55
The development cycle is circular, with refinement of technique and generator functions (customization) occurring during a single development cycle and over multiple development projects. Key points in this process are: Generation parameters control the creation of distinct systems, sharing of generated parts is controlled by the values used to define generation processing logic. Reuse of VisualAge Generator Templates Information Model definitions is possible with effective management of the generation parameters. That said, reuse and proper management of generation parameters was a difficult task with VisualAge Generator Templates as implemented in VisualAge Generator V3.x. The following general principles and goals drove the enhancement of VisualAge Generator Templates for VisualAge Generator V4: Keep technical specifications independent from the functional business specifications Reuse model instances for GUI, TUI, and Web UI Use default values for generation parameters Allow for customization at multiple levels With V4, VisualAge Generator Templates supports the following customization levels for entity specifications (see Figure 32): Workspace parameters Entity parameters Redefining parameters at the instance level
56
...
Pkg Pgm 3
W O R K S P A C E
Business Object
Pkg Pgm 1
Pkg Pgm 2
VAGen Programs
Relational Table
Data Element
Value Style
Generation parameter definitions can be stored in: A workspace instance At the entity level, as defaults for each entity type instance At the entity type instance level, to adjust parameters for specific system specifications To support this segmented storage of information model entities and improve overall usability, the functionality of VisualAge Generator Templates definition user interface was dramatically improved. Figure 33 shows the VisualAge Generator Templates browser provided with VisualAge Generator V4.
57
At the workspace level, the first set of decisions are made. Separate project/package sets can be used to store workspace and other entity definitions. At the workspace level: These generation parameters are shared by all Information Model entities: Common graphical user interface parts Common textual user interface parts Client / Server responsibilities concerning checks, commit, and so on Error message management functions Part naming conventions Target package structure
They are stored in the workspace. They can be managed independently of entity definitions.
58
VisualAge Generator Templates allows for the definition of default parameters, at the entity level, that will be used by all entity type instances. At the entity level: These generation parameters are shared by all the instances of a given entity: Interface Unit Business Object Data Element Relational Table
Some examples of Business Object generation parameters shared by all Business Object instances are: Layout characteristics (number of columns and rows) Database access display (bar menu, popup menu, push buttons) Display of extraction criteria Generation control definitions can be overridden at the instance level. Some instance level customization examples are: Graphical presentation of Data Element instances: Combo box Multi-line edit box Radio button Graphical presentation of Business Object instances: Notebook Group box Form with or without border This granular customization approach provides great flexibility.
59
Web browser
Web server
Websphere Application Server
Comm Gateway
Data/Tx server
1.
2. 3.
TX Program
5.
Session
Java Server Java Server Page Java Server Page Page
Database
The servlet will receive and process the HTTP request and, using JSPs, send back an HTTP response. The Web programmer is also likely to save the conversation state for the user on the Web server during an ongoing transaction with that user over potentially many servlets.
60
The following processing steps are performed in the Web-based transaction system shown in Figure 34: 1. The browser invokes a servlet from an HTML FORM. 2. The servlet reads the data from the FORM INPUT fields using its HttpServletRequest object. It may create, or instantiate, new Java objects which hold this user data. It may also initiate some enterprise access, for example, look up information on a database. The results of the enterprise access may cause the instantiation of other objects. 3. The servlet now needs to create a new session object for the user, or else reference an existing one. There is a single method, getSession() of the HttpServletRequest to do this. Once we have reference to a session object, we can store references to objects for that user in it. Typically the objects we referred to in 2. 4. The servlet invokes a JSP, passing the HttpServletRequest object. 5. JSP syntax will allow you to effectively run a getSession() against the request and also to then query the session object to locate user objects, so they may be displayed to the user in the final HTML stream sent to the browser. As outlined in Figure 35, basic (native) development for a Web-based transaction system requires a mix of skills, all of which are hard to master and typically require the coordinated effort of multiple individuals.
Web-based Transaction development has high cost of entry: Java programming skills Servlet programming
Request/response architecture State management JSP Communications with tier-3 servers Web UI design and linkage to remote programs
Simplification of programming model and the associated reduced skill requirements will lower cost of entry for Web-based transaction system development.
Figure 35. Web-Based Transaction Programming Skill Requirements
One of the underlying goals of VisualAge Generator has always been making complex tasks easy. The task of building Web-based transaction systems is made easier with the WebSphere RAD support provided in VisualAge Generator V4.
61
Terminal
CICS/IMS
COBOL pgm Restore state if required Business Logic Validation Access Data Data formatting Call other programs Navigation Save transient state Commit/rollback CGI/Servlet Restore state if required Business Logic Validation Access Data Data formatting Call other programs Navigation Save transient state Commit/rollback
request
execute send
3270 d.s.
Browser
Web Server
request
execute send page
HTML d.s.
When considered from a distance, the processing flow for a 3270 transaction and Web-based transaction system using servlets is very similar: The user view sends a request to the runtime domain. The runtime domain recovers any stored information that may be required to continue the conversation. Edit and business logic is used to react to the request and formulate a response. Information required to continue the conversation is stored. The response is returned to the user view.
62
Based on this comparison, we recognize two things: There is an affinity between Web systems architecture and 3270 pseudo-conversational systems. VisualAge Generator knows how to generate and implement such systems. This has resulted in the introduction of a new model of programming as part of VisualAge Generator V4. This new programming model includes: A new main program typeWeb Transaction A new record typeUser Interface (UI Record) The Web Transaction programming model is related to the model used for TUI programming in VisualAge Generator (see Figure 37). Similar component roles exist, and the method of interacting with the end user is based on the use of the 4GL CONVERSE processing option.
Provide a similar 4GL single threaded programming model to the one used for 3270 pseudo-conversations
Main Transaction Map Map Items
Formatting Validation
CONVERSE mapname Single Segment XFER maintran mapname maintran with First Map
CONVERSE UIrecname Single Segment XFER webtran UIrecname webtran with First UIrec
This implementation of the Web Transaction programming model for Web-based transaction systems is a derivative of the existing VisualAge Generator approach for support of CICS pseudo-conversational programming. Support for Web Transaction development is fully integrated into the VisualAge Generator environment (see Figure 38).
63
Development
Web-Transaction
Testing
Browser
UI Record Default HTML
Test Facility
Web-Transaction CONVERSEd or XFERed UI Record
The support for this new Web Transaction programming model implemented in VisualAge Generator V4 permits: The development of Web Transaction main programs, using 4GL programming techniques, which interact with end users in a Web browser. These 4GL-based programs implement user interface, business logic, and database processing, which can be implemented in either a series of main programs or a set of main and called batch (server) programs. Testing of these new programs, using the existing VisualAge Generator test facility and a Web browser. A default view for the UI Record is used in the browser. This communicates directly with the main program being tested. The use of generation technology to handle the complexities of runtime communication and processing. When generated, the VisualAge Generator Web Transaction program can be implemented in a Web server runtime domain (see Figure 39). The actual runtime processing is similar to that used for a native Java implementation (see Figure 34 on page 60), but this complexity is hidden from the development programmer. The development programmer works with the logical specification.
64
Simplify definition and testing of solution Generate Java and provide runtime support on tier-2 Generate 3GL code for tier-3 Automatically connect to tier-3 as needed
UI Record Web Tx Program
Comms Gateway
TX Program
Session
Java Server Page
Database
Runtime involves several tiers: 1. A Web browser 2. A Web server with servlet support, perhaps using the IBM WebSphere Application Server 3. A VisualAge Generator Server runtime environment (such as CICS or TX Series) The Web server and VisualAge Generator Server could potentially be on the same machine.
65
When you code a Web Transaction, VisualAge Generator generation produces: A COBOL or C++ load module to run in the VisualAge Generator server environment A Java bean, which represents the data in the UI Record A Java bean to run any edits (other than VAGen server side edit routines) for the UI record, to fill out any titles and labels, handle help, and do any other UI Record processing A Java Resource Bundle, which represents the data in the message table A Java Server Page, which will handle formatting and sending the display of the UI to the Web browser Edit table(s), consisting of a binary file and a Java wrapper VisualAge Generator provides the following: Gateway Servlet A session ID manager A catcher program (for certain environments, some environments make use of existing facilities) By implementing support for an effective, easy-to-use way of building a Web-based transaction system, VisualAge Generator reduces the cost of entry for most programming shops (see Figure 40).
Separation of concerns between Transaction Programmer and Web User Interface Developer
Transaction programmer defines UI Record with content and actions Generated components are referenced by Web developer
Figure 40. Benefits of VisualAge Generator WebSphere RAD Approach
66
The VisualAge Generator Web system development approach: Makes everyone a Web system developer (COBOL skills translate well to 4GL). The learning curve, based on the native approach (Java, servlet, JSP, private communications protocols) does not exist here. 4GL source code can be rapidly defined, tested, and implemented using the VisualAge Generator development approach. The Test Facility is integrated directly with the Web browser. The architecture used to implement a VisualAge Generator Web Transaction system allows for extension of the user interface view by experts in the Web development front end tool set.
67
A UI Record definition looks just about like any other record when viewed in the record editor. The UI Record includes a set of data items (shared or nonshared), with support for levels (03, 05, and so on), general characteristics (type, length), and other properties specific to the record type. The UI Record specific properties for both the record, and the data items in the record, make the UI Record special. the UI Type and UI Properties columns in the record definition show options that support the use of a UI Record as a browser interface definition. These properties determine the role of each UI Record data item, how it will be managed in a browser view, and what interaction is possible in both the browser and the Web Transaction program. The test facility triggers default HTML generation when a UI Record is CONVERSEd.
Note: This default HTML generation used during testing emulates the functionality that will be provided when the UI Record is generated into Java Beans and JSPs for use at runtime.
The UI Record UI Type and associated properties determine the function of each data item.
68
Record attributes that are new for a UI Record are: Help Text Default help text for the entire UI Record TitleDefault title for the UI Record Submit Value Item Name of data item in UI Record that will contain the value of the actual submit button on the form presented to the end user Data item attributes that are new for data items defined as part of a UI Record include: User Interface TypeThe user interface type defines how the data item is used in the user interface. The User Interface Type value, along with other data item attributes (such as occurs, substructuring, and so on), determine the content of: The default HTML that will be generated for the UI Record during testing (displayed in the Web browser). The JSPs that will be created for the UI Record during generation. The following User Interface Type values are supported:
Input Output Input/Output None
Specifies that input can be entered by end user and that edits will be run on the input data. Specifies that output edits will be performed on data received from the server. Specifies that INPUT and OUTPUT attributes are defined. Specifies that this field is not to show on the user interface and that no edits are to be defined for it. Items with this setting are typically used as control data for user-defined edits, or as items such as the one defined as the Submit Value Item . Defines an item to contain a value (or set of values if for an occurring data item) that can be received into the Submit Value Item when a user submits a form back to the server.
Submit
SubmitBypass Same as Submit; however, when these buttons are pressed, all input edits are bypassed. ProgramLink
Defines a data item that implements a push button in the visual display. This button, when pressed by the user, will implement a link to a defined program.
69
Hidden
Specifies that the data item will not be displayed in the browser, but can contain data to be returned to the program. Specifies that the data item will be implemented as an HTML form. All data items in this data item structure will be part of the same HTML form.
Form
OCCURSITEMNumber of occurrences item. For an array item, another item in the record can be referenced as the Number of occurrences Item. This item must be a numeric item with no decimals. The values set into this item determine the number of occurrences in the array item that actually get displayed in a list. INDEXITEMSelected Index Item. For an array item, another item in the record can be referenced as the Selected Index Item. This item can be occurred. If occurred, the array will be a multiple select list. If not occurred (occurs=1), the list will be single select. The values set into this item are the indices of the elements that were selected by the user. HELPTEXTItem Help Text Help text defined for the item. This attribute is saved with global data items to facilitate sharing of help text between all records that use the item. LABEL Item Label Default Label for the item. If the item is occurred and is of type Submit , SubmitBypass , or Link; labels can be defined for each occurrence. Once the UI Records have been defined, Web Transaction programs can be built that use the UI Records to interact with a Web browser. As shown in Figure 42, there are two Web Transaction program design options available in VisualAge Generator: CONVERSE program design First UI Record program design
Conversed UI Record Display Options
Figure 42. UI Record Display Options for a Web Transaction Program
70
Testing of these new programs is performed using the existing VisualAge Generator test facility and a Web browser (see Figure 43).
ITF dynamically buids default HTML when CONVERSE or XFER statement found Browser launched if necessary ITF waits for user input UI Record data from FORM sent back to ITF ITF runs all edits, re-send page with error if necessary If edits pass, ITF resumes Web Transaction execution At end of Web Transaction being tested, ITF displays defualt entry point page with list of available Web Transactions
A default view for the UI Record is used in the browser. This communicates directly with the main program being tested. Rules are used to determine the appropriate HTML element to use for each data item in the UI Record (see Figure 44).
">
UI Type = Submit
71
The following rules determine if the data item should be included at all: Data items with a User Interface Type of NONE do not show on the generated page. Data items with a User Interface Type of SubmitBypass or Submit work the same.
Note: In the text below, the data item attribute User Interface Type (in a UI Record) will be referred to as UIType. Single occurrence data itemno substructure:
UIType = Input or Input/Output Data item length <= 80 Data item length > 80 UIType = Output UIType = Submit Data item LABEL followed by Text input field. Data item LABEL followed by Text Area (multi-line text) input field.
Data item LABEL followed by plain text of data item. A single submit button with the label of the item as the button text is used. All Submit buttons display at the end of the form. A single hypertext link with the label of the item as the link text is used. If there is no label, then the value of the item is used. The value of the HREF attribute of the <A> HTML element will contain the program name and parameter name/value pairs as defined by Program Link properties. Provides true/false support. Valid numeric item values are 1 (true) and 0 (false). Valid character item values are Y (true) and N (false). The data item LABEL and then a checkbox.
UIType =ProgramLink
Boolean
UIType = Submit
Values will be displayed as a set of Submit Buttons. If a list of Labels is defined for this data item, the label values will be the text shown on the button. Values will be displayed as a set of HTML hypertext links. If a list of Labels is defined for this item, the label values will be the text shown in the link. If there is no label, then the value of the item is used. The value of the HREF attribute of the <A> HTML element will contain the program name and
UIType = ProgramLink
72
parameter name/value pairs as defined by the Program Link properties. Since this is an occurred item, the index used to retrieve values from the value items will be the same as the given link item if those items are occurred or are defined in a substructure that is occurred. UIType = Output Values will be displayed as a select list. If the Selected Index Item associated with the array is a single occurrence item, then the list is single select. If the Selected Index Item is a multiple occurrence item, the list is a multiple select list. If there is NO Selected Index Item defined, the data will be displayed as a block of text; each line being the data at each index of the array. UIType = Input or Input/Output Values will be displayed as list of text entry fields. If there is a Selected Index Item defined, then there will be a Select column of either Radio or Checkbox fields. If the Selected Index Item associated with the array is a single occurrence item, then the Select column will contain Radio buttons only one can be selected;. if the Selected Index Item is a multiple occurrence item, the column will contain Checkbox fields in which multiple items can be selected.
Multiple occurrence item with substructures:
Always displayed as an HTML Table where each leaf data item in the substructure is a column. Data items in the substructure defined as UIType = None will not show as a column. Data items in the substructure defined as UIType = Input or Input/Output will show as a column of text entry fields. If there is a Selected Index Item and the item is UIType INPUT or INPUTOUTPUT then there will be a Select column of either Radio Buttons
73
(single select) or Checkboxes (multiple select), depending on whether the Selected Index Item has occurs > 1 or not. This allows selection of a row from an HTML Table which has no inherent selection function. Some level of field layout can be controlled in the default HTML, as follows: Items of UIType = Input or Input/Output are rendered in the order they appear in the record. Top level items (items that are not substructured) cause paragraph breaks when they are rendered in HTML. To cause fields to be flowed from left to right, a superstructure filler item (named '*') can be added to the set of items that you want to flow horizontally. This implies that if you have a single item at the top level that substructures all the record data, the fields will all flow horizontally. The HTML created for the UI Record implements the processing required based on the UI Record rules for HTML associations (see Figure 45): Forms are used, which direct all responses back to the hptGateway process, the common gateway servlet provided by VisualAge Generator. Input fields are defined with size information to limit length of input string. Literals are defined. Submit UI Types are implemented using push buttons.
</HEAD> <BODY> <H1>Staff Info</H1> <table border=4 width=100% cellspacing=0 cellpadding=20> <tr><td><table border=0 align=left valign=middle> <FORM METHOD="POST" ACTION="/hptGateway"> <P> <b>Id</b> <INPUT TYPE=TEXT NAME="ID" SIZE=4 VALUE=" "> <b>Name</b> <INPUT TYPE=TEXT NAME="NAME" SIZE=9 VALUE=""> <b>Department</b> <INPUT TYPE=TEXT NAME="DEPT" SIZE=4 VALUE=" "> <b>Job</b> <INPUT TYPE=TEXT NAME="JOB" SIZE=5 VALUE=""> <b>Years</b> <INPUT TYPE=TEXT NAME="YEARS" SIZE=4 VALUE=" "> <b>Salary</b> <INPUT TYPE=TEXT NAME="SALARY" SIZE=8 VALUE=" "> <b>Commission</b> <INPUT TYPE=TEXT NAME="COMM" SIZE=8 VALUE=" "> <INPUT TYPE=SUBMIT NAME="BUTTONS" VALUE="Find"> <INPUT TYPE=SUBMIT NAME="BUTTONS" VALUE="Exit"> <INPUT TYPE=HIDDEN NAME="hptPageId" VALUE="322964"> <INPUT TYPE=HIDDEN NAME="hptAppId" VALUE="WEBTRAN"> <INPUT TYPE=HIDDEN NAME="hptHandlerId" VALUE="24461"> </FORM> </td></table></tr></table> </BODY></HTML>
74
Conversed UI Record Display Options Transfer of Control Options: DXFR pgm W Srec
Direct
W Srec
pgm
W Srec, First UIrec
pgm
First UIrec2
UIrec1
pgm
Specify pgm, and any data item s from UIrec1 to UIrec2 (not needed if same UI Record is used in both or if like names and target is output )
The three transfer of control options shown in Figure 46 are: Direct transferNext program starts immediately, no user (browser) interaction Delayed transferNext program starts after return from browser Form/Link transferNext program starts only after user (browser) interaction with displayed UI Record. Form transferinstigated by the program when the XFER , UIRec transfer option is used Link transferdefined when a UI Record data item is defined with the Program Link UI Type. Each of these program design options have different design implications that should be understood before embarking upon creating a Web Transaction application system (see Figure 47).
75
CONVERSE UIrec
HTML sent out on CONVERSE All storage saved and restored automatically Logic can be coded before and after CONVERSE VAGen manages control transfer
W eb Browser
First UI
UI Record
Session
Generator Web Transaction
W eb Browser
XFER PROG W S, UI
UI Record
W orking Storage
XFER <blank> , UI
Current program ends, HTML for sent out on XFER Program Link or Form on UIrec determine what pgm follows Program that follows receives UIrec only as First UI Record User managed dialog sequence using Program Link or Form
When designing Web Transaction programs, it is important to understand the issues surrounding the saving of program state. Program state is saved in a variety of ways, depending on the design of your VisualAge Generator program. Through the use of the CONVERSE and First UI Record design options, there are three levels of state saving available. The three state saving options are outlined below:
State Saving Options All (Controlled) State Controlled State Stateless Command Syntax XFER PROG WS XFER PROG WS, UI XFER <blank> , UI Program Design CONVERSE First UI Record First UI Record
The saving of state on the Web server and VisualAge Generator server will have scalability and performance impacts for the entire Web Transaction application system.
76
A Web Transaction program-based system can be constructed using the CONVERSE statements (see Figure 48). This approach results in the implementation of an all (controlled) state model of programming.
Using CONVERSE
WebTrans1
DXFR WebTrans3
WebTrans1
WebTrans2
Easier to program, but ALL data saved and restored Possible performance and resource usage implications
Figure 48. Web Transaction System Structure Options: Using CONVERSE
The program design using CONVERSE is similar to traditional Main transaction programs in VisualAge Generator using maps. This design saves all of the program state at each CONVERSE. The UI Record data is saved in the session bean on the Web server. All of the data for the working storage and local records are stored on the VisualAge Generator server. Once the end user clicks a submit button on the Web page, all of the state data is restored and the program continues. The conversed UI Record programming approach has several options: One Web Transaction program can contain multiple CONVERSE statements. This might be useful for a data collection and feedback transaction where the data analysis between browser interactions is significant. Multiple Web Transaction programs can be directly linked using DXFR processing. This segments the long running transaction/interaction into smaller parts. This might allow for reuse of the separate parts.
77
One area of concern is when a program link from a conversed UI Record is used to start a new Web Transaction program. The data saved to support the converse is not automatically released. If processing does not return to the expected Web Transaction program flow, a system time-out would have to occur before the saved state is released. The program design using First UI Record with program name allows the developer some control of the state saved for the program (see Figure 49).
WebTrans4
Developer decides what state to preserve (Controlled state) WS and UI saved and restored Less exposure on Program Link or Form Submit Best compromise between simplicity of implementation and resources/scalability implications
Figure 49. Web Transaction System Structure Options: Using XFER pgm WS, UIRec
Upon sending HTML to the Web browser, only the UI Record and working storage data are saved, and the transaction ends. Once the end user submits a request back to the Web server, a new transaction is initiated and the passed UI Record and working storage data is restored. Because the UI Record has been sent as part of the termination of WebTrans1, the use of a program link to start a new Web Transaction does not leave significant amounts of data saved and awaiting a time-out for cleanup processing. The program design using First UI Record with blank (Stateless) saves no state for the program. Upon sending HTML to the Web browser, the transaction ends. Once the end user submits a request back to the Web server, a new transaction is initiated (see Figure 50).
78
WebTrans4
Nothing is preserved (Stateless) Programmer has to manually save pertinent information using hidden fields in UI Record or database on runtime platform FORM support (user input processing) via Form UI Type Harder to implement but provides best performance/scalability
Figure 50. Web Transaction System Structure Options: Using XFER , UIRec
A stateless Web Transaction program is created by transferring control to a UI record with a blank program name. In reality, this is not transferring control to another program. It is performing a send page to the Web browser. The form in the Web browser page will cause the target transaction to start when the program link is selected. There are two ways to save state programmatically using this program design: 1. Save state data in hidden fields on the UI Record in the client browser. 2. Save state data in a database on the VisualAge Generator server. Developing programs that are stateless places more of a burden on the application programmer to develop programs that satisfy the business requirements. While this may be a more difficult task, it will result in an application design that both performs well and is scalable. The varied approaches to Web Transaction program design and UI Record display (CONVERSE or First UI Record) can be combined (see Figure 51).
79
Using combinations
XFER pgm2 pgm1 XFER pgm1 pgm2 Pgm Link Form submit CONVERSE pgm3 XFER pgm1 XFER ' ' , UI
Depending on expected think time and ease of state preservation on different dialogs of same system, a hybrid system may be adopted A combined structure approach could limit complexity with the selection of reduced overhead options only when required
Figure 51. Web Transaction System Structure Options: Using Combinations
The ability to combine the different approaches simply means that the complete business transaction can be analyzed, and the most effective choice in Web Transaction program structures chosen, as part of the implementation of a Web Transaction program-based system.
80
Web-Transaction
3GL Program
Java Bean (UI Record Interface) Java Resurce Bundle Message Table Edit Table Java Wrapper Edit Table File
Default JSP
UI Record generation creates Java Beans and default Java Server Pages (JSPs). These materials can be used by Web-based user interface developers (who use HTML, XML, and so on) to access the data and render an appropriate screen. The Java Beans have methods that allow attribute access and a single action that puts all the inputs through the edits defined by the programmer. The Web Transaction program is generated using the current VisualAge Generator pseudo-conversational model for runtime execution. CICS pseudo-conversational problems of state, transaction control, program flow, and so on, are similar to Web problems. The generated program is independent of the user interface; any tool that can access a Java bean can create a user interface view using the data available in the Java Beans generated for the UI Record. The generated components are used in an appropriately configured WebSphere Application Server environment to implement a Web Transaction program runtime system (see Figure 53).
81
Web browser
Web server
VAGen session ID manager
VAGen server
4 7
10
Session
Java Server Page
edit table
message table (resource bundle)
VAGen web transaction (will apply any VAGen server-side edit routines)
workdb
The processing steps depicted in the runtime environment shown in Figure 53 are described below: 1. At runtime, a user triggers the Gateway Servlet through his browser. If it is the first time through: The user has the option of typing in a URL for the Gateway Servlet. This causes it to serve an HTML page/JSP, called the entry point page, which lists all the available Web Transactions. The session ID manager is invoked to assign a unique ID for the user and a session object is created for the user. This ID for the user is unique over multiple Web servers and VisualAge Generator server platforms. The ID is stored in the session object and may be obtained through EZEUSR. If the Gateway Servlet is configured to request users to logon, then just before the entry point is served, the user will be asked to authenticate themselves. The security information is then stored in IBM WebSphere Application Server in a session object for later use.
82
If this is not the first time through: The Gateway Servlet would be invoked from one of the following: A SUBMIT button or ANCHOR tag on the entry point page A SUBMIT button on an HTML FORM which was output from a previous CONVERSE or XFER with UI Record of a Web Transaction. If the entry point page is being used, so a new program is being invoked, the session ID manager is contacted to assign a unique ID for that conversation with the browser user. This ID is stored in the session object and can be obtained through EZELTERM. 2. If this is the first time through, we go straight to step 9, and the entry point page, and perhaps additionally the logon page, is served. Otherwise, if the Gateway Servlet was triggered from a SUBMIT button, on a JSP sent as the result of a previous CONVERSE or XFER with UI Record, it stores this user data in a data bean. The bean is associated with a session object for that user, so it can be referenced on later interactions with the user. 3. If the Gateway Servlet was triggered from a SUBMIT button, on a JSP sent as the result of a previous CONVERSE or XFER with UI Record, the interface bean is now used to apply to INPUT or INPUT/OUTPUT fields any: Standard supplied edits, such as numeric, input required and so on. Edit tables Web side edit routines. The message table is used to look up any message keys associated with a particular supplied edit for a given data item. If an error is found, we go straight to step 9. 4. We are now ready to invoke the VisualAge Generator Web Transaction. The Gateway Servlet synchronously invokes the catcher program on the target runtime environment. In a similar way to VisualAge Generator client/server systems, a linkage table is used to determine: What underlying protocol should be used to connect to the catcher program, for example, CICS ECI Data conversion Remote system identifier Transaction id, if using CICS or IMS and there is no current CONVERSE or XFER with UI record outstanding
83
CICS is a commonly used VisualAge Generator server platform. To connect to a CICS server in order to run a Web Transaction, you would use the CICS client. The Gateway Servlet connects to CICS client using the CICS Transaction Gateway. CICS client will connect to a CICS server and invoke the catcher program, otherwise known as the mirror program, DFHMIRS, by the external call interface (ECI) or the EXCI for MVS. 5. The catcher program invokes the requested Web Transaction. If the page on the browser had originally been sent as a result of the CONVERSE of a Web Transaction, or XFER with UI Record and some other VisualAge Generator record, this data is retrieved from the WORKDB. If the Web Transaction was invoked from an HTML FORM, and there were any VisualAge Generator server side edit routines associated with INTPUT or INPUT/OUTPUT fields in the UI Record, they are run at this time. If the VisualAge Generator runtime environment is CICS, the Web Transaction is invoked through a CICS LINK from DFHMIRS. 6. If server side edits failed, or the VisualAge Generator Web Transaction issues a CONVERSE or XFERs with a UI Record: The Web Transaction saves program storage, for CONVERSE, or saves the VisualAge Generator record (if any) specified on the XFER with UI Record statement, in the WORKDB. Control returns to the catcher program, passing back the UI Record data. In a CICS environment WORKDB will be a Temporary Storage Queue, in IMS, some form of database. The queue name is uniquely keyed on EZELTERM. 7. The logical unit of work ends, all task resources are released, and control returns to the Gateway Servlet. 8. The bean name to access and the data of the UI Record to be sent to the browser is returned to the Gateway Servlet. The Gateway Servlet stores the UI Record data in the users data bean using methods in the interface bean. The data bean and interface bean are put into the session object for later use. 9. The Gateway Servlet then uses the interface bean to determine the Java Server Page name and serves it. The process of serving this JSP will access attributes in the data bean using the interface bean. Reference to the interface bean is passed through in the HttpServletRequest object.
84
10.The JSP sends an HTML page to the browser that is filled out with data that was in the UI Record passed from the VisualAge Generator server when it executed its CONVERSE or XFER with UI Record. UI Record data items of UI type NONE will not be present in the HTML. This runtime process continues until the Web Transaction ends. At this point the Gateway Servlet knows it has ended and it serves a default entry point page.
Web Server
Apache IBM Websphere Application Server DB2 UDB CICS Transaction Gateway JDK IBM CICS Server
TCP/IP
Transaction Server
DB Server
DB2 UDB
The configuration shown in Figure 54 uses three platforms: Web serverServes Web pages, runs JSPs and servlets, and provides the entry point to the rest of the system. Starts with a Web server (Apache) and the IBM WebSphere Application Server servlet/JSP runtime platform. VisualAge Generator Common Services is added to implement the Gateway Servlet, and provides support for making calls to target server platforms (where the Web
85
Transaction program will be running). CICS connectivity software is added to this platform to provide access to the target Transaction Server. Transaction serverCICS-based technology for running transactions on the Windows NT platform. After installation, the TX Series software is configured to support communications from CICS clients and runtime execution of generated VisualAge Generator programs. This includes support for DB2 access. Database serverDB2 engine for relational database support. A two-tier approach using Windows NT to front-end an OS/390 transaction server is shown in Figure 55.
Web Server
IBM HTTP Server IBM Websphere Application Server DB2 UDB CICS Transaction Gateway JDK
LU 6.2
The configuration shown in Figure 55 uses two platforms: Web serverServes Web pages, runs JSPs and servlets, provides the entry point to the rest of the system. Starts with a Web server (Apache) and the IBM WebSphere Application Server servlet/JSP runtime platform. VisualAge Generator Common Services is added to implement the Gateway Servlet, and provides support for making calls to target server platforms (where the Web Transaction program will be running). CICS connectivity software is added to this platform to provide access to the target Transaction Server.
86
Transaction and Database serverCICS-based technology for running transactions on the OS/390 platform and DB2 engine for relational database support. The workstation Web server is configured to access the host transaction and database server platforms. The host environment is configured to support communications from CICS clients and runtime execution of generated VisualAge Generator programs. A single tier approach using the OS/390 as a Web and Transaction Server is shown in Figure 56.
OS/390
Figure 56. Runtime: Sample Configuration (OS/390)
The configuration shown in Figure 56 uses one platform, the OS/390. On this platform: Web serverServes Web pages, runs JSPs and servlets, provides the entry point to the rest of the system. Transaction and Database serverCICS-based technology for running transactions on the OS/390 platform and DB2 engine for relational database support. This configuration is based on a Web server (IBM HTTP Server) and the IBM WebSphere Application Server servlet/JSP runtime platform. VisualAge Generator Server for MVS provides support for the Gateway Servlet and runtime execution of generated VisualAge Generator programs. The CICS Transaction Gateway connects the WebSphere Application Server and the CICS Transaction server for OS/390.
87
88
The following chapters, provided in Part 2, Primer for Developer on Java Team Development, were first published in VisualAge for Java Enterprise Version 2 Team Support, SG24-5245: Chapter 4, VisualAge for Java Team Development Environment Chapter 5, Understanding the Basics These chapters are included here to help you fully understand the VisualAge for Java team development environment. The following chapters were written to help you understand the implications of using Developer on Java in a VisualAge for Java team development environment: Chapter 6, A Developer on Java Team Environment Quick Start Chapter 7, Defining a Developer on Java Development Process
Note: Several additional chapters from VisualAge for Java Enterprise Version 2 Team Support, SG24-5245, are also included in this redbook as these appendices:
Appendix A, Workspace Management on page 259 Appendix B, The Team Development Process on page 269 Appendix C, Program Element State Transitions on page 283
89
90
Chapter 4.
4.1 Introduction
The software development process is becoming more and more complex. End users are demanding that more function be delivered in less time. Many companies are extending their core business applications to enable new users to work in new ways through their intranet and the Internet, and new applications are required to run on many different platforms. All this often results in the need for large development teams to design, build, and maintain applications. Additionally, the teams are often forced to maintain or expand existing code in a very short time. Java programmers need development tools that enable them to work together in a highly dynamic environment. They require facilities that easily allow them to manage multiple versions of their work and switch quickly between the different versions. VisualAge for Java Enterprise provides an extremely flexible, productive, and secure built-in team environment for managing the software life cycle process.
91
The client connection to the server is established over a local area network (LAN), and communication between client workspaces and the repository server is through TCP/IP. Figure 57 shows the VisualAge for Java Enterprise team development environment.
Developer Workstations
A N
Shared Repository
The repository is a large binary file that stores the source and bytecodes of all developer workspaces connected to it. It can be thought of as an object-oriented database that houses all development objects. The workspace file is unique to each client that is connected to the repository. It contains the bytecodes for the development environment and all program elements that the developer has loaded and is working with. A developer makes changes to code inside the workspace. These changes are always saved immediately into the repository. Starting VisualAge for Java causes the local workspace file to be loaded into memory and connected to the repository. A VisualAge for Java team client cannot run without a live connection to a repository.
92
Developers can add program elements, for example, classes or packages, from the repository into their workspace. Only loaded program elements are subject to change by a developer. Generally, many more program elements are stored in the repository than are loaded in a developers workspace. Developers can also delete program elements from their workspace. Deleted program elements still exist in the repository and can be added back into the workspace. The workspace file also defines the context of execution when applets and applications are tested during development. All classes and packages that are required to successfully run a program must be loaded into the workspace. Adding program elements from the repository is a way of easily sharing code among developers working with the same repository. In contrast to other file-based source code management systems, code changes are immediately available to other developers in the group. This does not mean that each developer is directly informed about any changes made by other users. A changed piece of code must be loaded into the workspace in order for it to be accessible. Therefore, each developer has full control over which program elements reside in the workspace.
4.3 Ownership
A powerful system of ownership supports the dynamic, concurrent VisualAge for Java team environment. Each program element must have an owner. Thus developers have the freedom and flexibility to make changes and try new things, and at the same time the integrity of each program element is ensured. The ownership model assigns distinct responsibilities to different team members, imposes discipline on the team during the development cycle, and facilitates tracking of changes at maintenance time.
93
94
Program Elements
projects packages classes interfaces methods fields
Figure 58. Program and System Elements
System Elements
types
95
5.1.1.2 Packages A VisualAge for Java package has exactly the same meaning in VisualAge as it has in the standard Java language. 5.1.1.3 Classes Classes and interfaces are the building blocks in VisualAge for Java just as they are in the Java language. The VisualAge for Java development environment sometimes refers to classes and interfaces with the generic term type. Although we might occasionally adopt the same convention in this book, we generally prefer to use the term class . Whenever we refer to a class, we implicitly refer to an interface as well. For example, if we talk about versioning a class, it is understood that the same operation can be applied to an interface. If this rule does not apply, we explicitly say so in the text. 5.1.1.4 Methods A method in VisualAge for Java is exactly the same as a method in the standard Java language.
For a complete description of program elements, see Programming with VisualAge for Java, SG24-5264.
5.1.1.5 Relationships between Program Elements When dealing with program elements in VisualAge, it is often helpful to consider the relationship between the various elements:
Inside the workspace there is a contained in relationship between program elements. Any given element is always contained in another program element at a higher level. A method is contained in a class, a class is contained in a package, and a package is contained in a project (see Figure 59).
96
Method
contained in
Class
contained in
Package
contained in
Project
When packages and projects reside in the repository, a part of relationship can exist between them. The part of relationship is less restrictive than a contained in relationship. For example, a package can be part of several projects. However, it is not possible to have more than one project with the same package being loaded in the workspace at a time (see Figure 60).
97
A package can reside in a repository without being part of a project. For example, this is the case if you import a package that is not assigned to a project. When you load a package into the workspace, it must be assigned to a project.
Project X
Project Y
A B
C E
Package C is part of - Project X - Project Y - Project Z Package E is part of - Project Y - Project Z Package D is part of - Project Z Package F is not part of any project
Project Z
Figure 60. Part of Relationship between Packages and Projects in the Repository
Each repository is managed by a special user object called the Administrator. This user preexists in every VisualAge for Java repository and cannot be deleted.
5.1.2.2 Users VisualAge for Java Enterprise maintains a list of authorized users for each repository. Only the administrator is allowed to create, change, and delete users from the repository.
98
A user is described by three attributes: Unique name The unique name is the users identifier. It must have a unique value. We suggest using the e-mail address to make sure it is a unique value in your team or company. Companywide unique names avoid problems when moving packages between different organizations, because user objects are also imported when you import a package from another repository. The unique name is case sensitive. Full name The full name is used by the system to refer to a particular user. Any list of users as well as the Properties window of a program element show the full name of a user. To avoid confusion, we recommend using unique values for the full names. Network login name The network login name is the user ID of the user and is used to identify the user to the repository. If you choose to enable password verification at logon, the network login name is the user ID against which the password is verified. For more information about passwords, refer to the product documentation. A network login name must be provided when you create a user. However, if you choose not to use password verification at logon, the network login name is not used.
5.1.2.3 Package Groups Each edition of a package has a package group associated with it. A package group contains a list of users who are allowed to create classes in this package. The user who created the package is by default the package group owner. The owner is the only one who is allowed to add or delete other users to or from the package group (see Change Management on page 106). The owner can also pass the ownership to another user.
A package that is undergoing split stream development can have different package groups assigned to each development stream. Each development stream is represented by a different edition of the package.
Note: The package owner is indicated in the middle lower pane of the Managing page of the workbench with a leading >. Be aware that this is the same symbol used for indicating unreleased editions!
99
Edition
Open Edition
Version
Scratch Edition
released Version
unreleased Version
100
You can have more than one open edition of a program element in the repository, but only one can be loaded in the workspace at any given time. Thus developers have the flexibility to work down several paths on the same program element. You can create an open edition either manually or automatically. Remember that a version is an immutable program element. You can explicitly create an open edition from a version. An open edition is automatically created by VisualAge for Java Enterprise if you make changes to an existing open edition of a method. When you save the changes, a new open edition of the method is automatically created. Creating an open edition from an existing version actually makes an editable copy of the program element. The version, which is not editable, remains in the repository.
5.2.2 Version
A version is an edition that you cannot change. It is indicated by a version name. VisualAge for Java provides automatic naming of versions, starting with 1.0 as the first version name of a new element and then adding one to the last number (1.1, 1.2). You do not have to accept this default name. Instead you can use your own, more specific name, that also can include letters. We suggest using specific prefixes in the version name so it is easy to determine which version was created by which developer and at what time.
101
Tip
Version name Version names should be used carefully. We recommend using <initial>-<date>-<version number> for a version name; for example, JS-6Mar-2.1.
A version is always created from an open edition. To version a project or package, all program elements at a lower level have to be versions. In the case of versioning packages, versioning of the contained classes may result in interaction with the different class owners, because only the class owner is allowed to release a class or interface. As a project owner you are allowed to version the containing packages individually or by versioning the project itself. Note that older versions still exist in the repository (see Figure 62).
Project
Open Edition
Version
Scratch Edition
Package
Open Edition
Version
Scratch Edition
Class/Interface
Open Edition
Version
Method
Open Edition
You can have more than one version of a program element in the repository, but only one is loaded in the workspace at a time. When you deploy an application, we strongly recommend that all program elements be versions.
102
103
104
Project
Open Edition
Version
Scratch Edition
Package
Open Edition
Version
Scratch Edition
Class/Interface
Open Edition
Version
Method
Open Edition
Important Info
Who can release a class? Only the class owner can release a class version into the containing package, whereas only the class developer can version the class.
105
Important Info
Who can release a package? The package owner and the owner of the containing project are allowed to release an open edition or a version of a package into a project.
5.4.1 Ownership
Traditional change management tools are often based on a concept of reserving elements. A user reserves (or checks out) a program element to prevent other users from modifying it concurrently. In most of these systems any user is allowed to reserve elements. Element ownership as implemented in VisualAge for Java Enterprise is the basis for an alternative strategy that enables developers in a team to work
106
dynamically and concurrently but always have the appropriate control over the development process. For example, multiple developers may change a class more or less simultaneously and even create versions of it. However, there is only one individual, the class owner, who is responsible for the main stream of the development for that class. The class owner is the only one who can release the class version into the containing package. Therefore, although more than one developer is allowed to change a class, only the class owner determines which of the existing versions is visible to the other team members when they load the containing package. Owners are typically members who coordinate the work of many developers. Depending on the size and the complexity of the product, your team might have one project owner, and a package owner for each package. Each program element managed by VisualAge for Java Enterprise has an owner. The owner is responsible for integrity and maintenance during the whole life cycle of the program element. Certain operations are performed only by an owner.
5.4.1.1 Assigning Ownership Ownership can be assigned to a user explicitly or implicitly. A user gets implicit ownership of a program element when it is created. A user can get explicit ownership of projects, packages, and classes by having the ownership transferred from the current owner. The current owner relinquishes ownership on that program element. Therefore, although ownership is not immutable during the development process, only one person at a time is responsible for the class functionality.
This different behavior is due to the fact that VisualAge for Java Enterprise treats classes as elements that have executable behavior. Therefore editions are single steps to achieve the desired functionality of a class, and only one user, the class owner, is responsible. In contrast, packages and projects are constructs used for organizational and administrative purposes. Different users can be responsible for different editions.
107
Still another role is implemented in VisualAge for Java Enterprisethe role of administrator. We do not discuss this special role any further because the administrators tasks are not tightly related to the developers tasks within a typical development cycle. The administrator manages the repository as a whole, independently from certain development projects.
5.4.2.1 Class Developer A class developer is a user who has created an edition of a class or interface. Any user registered by the administrator to work with the repository can make changes to any class or interface. A class developer does not have to be the class owner. A class developer does not have to be in the package group to which the class belongs. Creating an open edition of a class automatically records the current user as the class developer. This behavior provides the flexibility that is necessary in a highly concurrent development environment.
How do I become a class developer? By creating an open edition of an existing class By creating a new class in a package in which you are a package group member. In this case you also become the owner of the class. What can I do as a class developer? Add the open edition to your workbench Version the open edition Change the class definition Change, save, delete, or reload a method
5.4.2.2 Class Owner A class owner is the team member responsible for the integrity of a class or interface in a package edition. Class ownership promotes the creation and maintenance of quality code for the following reasons:
Classes are not equivalent to modules in the traditional structured programming sense. Classes are building blocks for present and future
108
systems. To improve code quality and reuse, class ownership helps to ensure the reliability and generality of a class throughout the life cycle. The semantic dependencies of an object-oriented model (such as inheritance) increase the risk that a poorly considered change could have a unfortunate ripple effect. Only a class owner can change a class or interface and be reasonably expected to understand the ramifications of that change. The semantics of check-in/check-out are unclear when inheritance is used. If an abstract superclass is checked out, for example, should all of its concrete subclasses be reserved as well? Long-term class ownership introduces cultural changes in the software team. When developers know they will be maintaining a class for a significant period of time, they will be less likely to program short-term fixes. Class ownership provides the controls necessary for serious software development while offering the flexibility to let developers experiment quickly. The key is that only the class owner can release a class into its containing package. Other developers can create an open edition of a class, change the open edition, and even version the open edition. The class owner, however, determines the main stream of development of the class, through releasing the class. How do I become a class owner? By creating a new class or interface in a package edition in which you are a package group member (you also become the developer of the class). By explicit change of ownership: any member of the package group (including you) can set you as the owner of a class in the package.
Important Info
Who can change class ownership? The fact that any member of a package group can reassign ownership of a class is the sole exception to the concept that only the owner of an existing program element can change the ownership.
What can I do as a class owner? Release a version of the class Delete a class
109
The scope of class ownership is restricted to a single package edition. Therefore, if a package has multiple streams of development, the class might have a different owner in each stream.
5.4.2.3 Package Owner A package owner is responsible for the overall status of a package. The package owner also manages the package group and therefore coordinates the class developers working on that package.
How do I become a package owner? By creating a new package in a project you own By getting the ownership of an existing package transferred by the current owner of the package. You must be a member of the package group. What can I do as a package owner? Add new users to the package group of the package Delete users from the package group, as long as they do not own any class Transfer ownership to another member of the package group Create an open edition of the package Create a version of the package Release an open edition or a version of the package
5.4.2.4 Project Owner The project owner is responsible for the organization of the project. The project owner is the only one who can create packages in a project and maintain the integrity of the whole project.
How do I become a project owner? By creating a new project By getting the ownership of an existing project transferred by the current owner of the project What can I do as a project owner? Create an open edition of the project Create a version of the project Create packages in the project
110
Delete packages from the project, which means change the configuration of the project Transfer ownership of the project to any other user defined in the repository These team roles are dynamic in VisualAge for Java Enterprise. Your role may change many times during development without you being aware of it. For example, if you are a package owner and you create a class in that package, you act as a package owner. When editing and versioning the class, you act as a class developer. When releasing the versioned class to the package, you are doing that as the class owner. You do not notice all of these role changes except when you are about to perform a task that requires privileges from another team role that is not assigned to you. From the descriptions of the roles, we can deduce that there are two roles that any developer can automatically assume without regard for any controls on the repository. They are class developer and project owner. Therefore, you are always allowed to start your own development project and you are always allowed to work with all released program elements in the repository. However, you are not allowed to make any changes to a package and its containing classes if you are not a member of the package group.
Attention!
Can any user delete any project? We know that deleting from a workspace is the equivalent of an unload operation and does not delete from the repository. At this point you may be thinking that deleting projects and deleting packages are similar operations. They are not. Deleting a project from your workspace does not change any configuration. However, unloading a package from your workspace changes the configuration of the project of which that package is a part. Therefore any developer can delete any project from his or her workspace, but only the owner of a package or the owner of the containing project can delete a package.
111
112
Once these differences are understood, an organizational approach and project/package architecture that can support the VisualAge Generator development process can be defined (see Chapter 7, Defining a Developer on Java Development Process on page 125).
113
The function provided by the VisualAge for Java Workbench is similar to that provided by the VisualAge for Smalltalk Organizer, except that invocation of VisualAge Generator part editors and processing options are not supported against the methods used to store the VisualAge Generator parts. All VisualAge Generator tasks must be performed from the VAGen Parts Browser (see Figure 65).
The main difference between the VisualAge for Java and VisualAge for Smalltalk is how the classes are managed in the development environment: VisualAge for Java has fewer container types than VisualAge for Smalltalk. Unlike the configuration map to image relationship used by VisualAge for Smalltalk, all containers are physically loaded in the VisualAge for Java workspace. (A configuration map is a list of pointers, but the list itself is not loaded). Duplicates are not permitted in the list of packages that exist for a set of loaded projects. Duplicates are permitted in the list of classes that exist for a set of loaded packages.
114
The container types for both the Developer on Smalltalk and Developer on Java platforms are shown in Figure 66.
VGenXXX Class
VAGen Parts
Subapplication B Classes
Methods
Figure 66. VisualAge for Smalltalk and VisualAge for Java Team Environment Containers
115
App SubSysA
Subapplication GUIS Subapplication Records
Pkg SubSysA
Pkg Records
Pkg GUIs
While the number of containers required is the same, it will seem like more packages are required to provide the same organizational granularity found in a Developer on Smalltalk based system. The use of Subapplications allows for a folder in a folder. There are also differences in the way classes are managed and the uniqueness rules followed for method names in the Developer on Smalltalk and Developer on Java platforms (see Figure 68).
VAGen Functions
FUNCA()
Smalltalk Image processesing ensures that method names are unique across extended Classes.
Duplicate Classes across different Packages are suported in Java. Method names do not need to be unique, but duplicate parts in Workspace are not supported by Developer on Java.
116
While the Developer on Java platform cannot prevent the existence of duplicate names for VisualAge Generator parts in a workspace, when this situation is identified (such as at the start of testing or generation), warning messages are issued. The class owner and class developer roles exist for in both VisualAge for Smalltalk and VisualAge for Java. Groups are defined for packages as they were for applications. The major difference is that customization of the authority level required to create new editions of classes stored in a package is not supported. In VisualAge for Smalltalk, the right to create a new edition of a class in an application could be restricted to: World (default) Group member Class owner In VisualAge for Java, this level of authority customization is not supported. Any user in the VisualAge for Java environment has the right to create a new edition (and version that edition) of a class in a package.
Note: The following rules are consistent:
Only the class owner can release a version into the package. Only the package owner can version or make a new edition of a package. This static authority rule can limit the VisualAge for Javas ability to enforce a single threaded development process for the contents of a package. In a VisualAge for Smalltalk environment you could modify the privileges on an application so that only the class owner could make a new edition. This change would force a single threaded development process. Similar results in a Developer on Java environment will require better control of the process of releasing class versions into the package.
2 Load
1 Load
3 Load
Config Map A
Config Map B
Config Map C
Application Q
Application R
Application S
Application T
Application U
Image
All Config Maps can be loaded. Only the Applications they reference are added to the image. The image contains the union of the referenced Applications.
Figure 69. Using Configuration Maps to Manage Applications
Like configuration maps, different projects can point to the same package, but projects that point at the same package (even if different editions) cannot be added (loaded) in your workspace at the same time (see Figure 70).
2 Load Fails
1 Load
3 Load Fails
Project A
Project B
Project C
Package U
Workspace
Only Projects with a unique set of Packages can be loaded at the same time. Either Projects A and C, or only Project B, can be loaded at one time. The workspace can contain only one instance of a Package.
Figure 70. Using Projects to Manage Packages
118
With configuration maps, you could have redundant pointers to an application or another configuration map that contained common code. This might have been done to make the process of loading a working set of code into the image easier to perform. This technique is not possible with projects. You will have to discreetly load each project to establish the working set of code required. Developer on Java enhancements will allow for alternate techniques which can be used to establish relationships between different projects (see 6.5, Organizational Alternatives on page 121). The project owner and package owner roles exist in VisualAge for Java. These equate to the configuration map Manager and application Manager roles in VisualAge for Smalltalk. The major difference is that customization of the authority level required to release or deleteeditions or versionsof packages in a project is not supported: In VisualAge for Smalltalk, the right to release or delete editions or versions of applications in a configuration map could be granted to the application Manager. In VisualAge for Java this is the default, either the project owner or package owner can release packages into or delete packages from a project.
Note: Only the project owner can version or make a new edition of a project, or add a package to a project, which is consistent with the VisualAge for Smalltalk behavior for configuration maps.
This inability to delegate project content responsibility to package owners, and the rule that only versions can be released, may require a change in the development process used when working with Developer on Java (see 7.3, Defining Project and Package Structures to Organize Code on page 130).
119
Application
Application
Application
Application
Subapplication Subapplication
Figure 71 shows that a layered network structure is possible in the VisualAge for Smalltalk environment: Configuration maps can reference other configuration maps. Different configuration maps can reference the same application. Applications can have subapplications. An example of a project and package structure that is possible when using the Developer on Java platform is shown in Figure 72.
120
...
Pkg Pgm 3 Pkg Pgm A
...
Pkg Pgm C
Pkg Pgm 1
Pkg Pgm 2
Pkg Pgm B
Pkg Records
Figure 72 shows that a only a flat structure is possible in the VisualAge for Java environment: Projects contain packages. The set of packages contained in a set of projects loaded in the workspace must be unique. Packages must be in a project to be loaded. Different projects can reference the same package, but they cannot be in the workspace together.
121
Figure 73 shows a sample team environment container structure for a system implemented using either the Developer on Smalltalk or Developer on Java development platform. The approach shown in Figure 73 uses configuration maps, applications, and subapplications in the Developer on Smalltalk platform.
Figure 73. Sample Developer on Java Container Structure derived from Subapplications
In the example shown in Figure 73, top-level applications were replaced by projects, and Subapplications by packages. The VisualAge for Java container structure shown would allow for an easy migration of VisualAge Generator 3.x parts to the Developer on Java repository.
Note: VisualAge for Smalltalk classes (such as GUIs) cannot be migrated to VisualAge for Java.
Figure 74 shows a sample team environment container structure for a system where only configuration maps and applications are used in the Developer on Smalltalk platform.
122
SYSMySystemCustomerCMap
SYSCustomerClientApp SYSCustomerDetailClientApp SYSCustomerListClientApp
SYSMySystemCMap
SYSCustomerServerApp SYSCustomerDetailServerApp SYSCustomerListServerApp ...
Figure 74. Sample Developer on Java Container Structure Derived from Applications
In the example shown in Figure 74, the first level of configuration maps were replaced by projects, and applications by packages. The VisualAge for Java container structure shown would also allow for an easy migration of VisualAge Generator 3.x parts to the Developer on Java repository. If both layers of configuration maps and Subapplications are used, you will need to consider either the use of additional projects or a naming pattern for packages that provides for a form of logical organization.
123
A solution to this problem is provided by extensions to Developer on Java generation option processing. To support project relationship definition (layering), the following approach will be used: The VisualAge for Java concept of a default package for a project. A specifically named options part, a project list part (PLP), recognized by Developer on Java, that can be found in the default package. To enable LAN-based generation, and assist in loading related projects in a workspace, Developer on Java processing will search for a PLP in the first project identified on the project load request. If found, the target projects will be loaded (with recursive PLP search and load logic applied at each level). Key points regarding these new generation options: A specifically named PLP must exist in the default package. If different versions of a project are identified, the last one processed will be loaded. PLP processing logic does not force the most recent version. This flexiblity allows for the creation of layered structures of related projects (see Figure 75).
System Project
VAGEN_SYSTEM_PROJECT.PLP
Default Pkg
Pkg Pgm 1
Pkg Pgm 2
Pkg Pgm 3
Pkg Pgm A
Pkg Pgm B
Pkg Pgm C
Pkg Records
Pkg Shared
Figure 75. Using Project List Part Processing to Emulate a Layered Set of Projects
The function provided by these generation processing extensions can also be used to help define and control a Developer on Java-based development process (see 7.4.3, Managing Development Phases Using Project List Parts on page 137).
124
125
Given the way VisualAge Generator has been implemented in the VisualAge for Java environment, we offer the following thoughts: There is no locking of parts in the team environment; that is, there is no formal support for serial development. By design, the team environment supports concurrent development. Without serial development, enforced by user password validation, different developers can make updates to parts of the same type that are stored in the same package. This would create multiple open editions or versions of the VisualAge Generator part class in the package. Merging is the only way to resolve these multiple class versions. Knowing this, many aspects of VisualAge Generator development tend to suggest that a serial development approach is often the preferred approach.
Initial Recommendations:
Our study of how to use the team environment for VisualAge Generator development in VisualAge for Java is not complete, but here are some recommendations that should help you to avoid the need for merging, and promote an effective development environment: Accept that the approach you will use for VisualAge Generator will differ from the one that might be used in a standard VisualAge for Java development environment. The granularity of your package container structure must be such that specific development tasks on a set of related VisualAge Generator parts fall within the scope of a single programmer (or will do so, say, 95% of the time). Support for efficient version and release management should be incorporated into the organizational approach used to support VisualAge Generator development. That is, programmers should be able to issue simple requests, such as creating new project/package editions and versioning changes when they are done with a task. Confirm that the organizational approach selected will support your development process and techniques before you migrate a system or start a new project in the Developer on Java environment. Do not begin to define the project and package container structure until the team roles have been agreed on.
126
Lu cy
Joe
Bob
Ja ne
Bil l
127
In our example, the probability for collisions would be one chance in: 20 programs 800 processes 60 records These represent acceptable to negligible chances.
Lu cy
J oe Bob
Jan e
B ill
Figure 77. Developer on Java Development with One Package for the Project
In this case, there would be a collision for every VisualAge Generator part, because all the parts of the same type are stored in the same class.
128
If only one programmer at a time was actively modifying the classes in a package, then there would be no collisions: he or she cannot collide with himself or herself (see Figure 78).
Joe
Bob
Jane
Bill
Lucy
Joe Bob
Ja ne
B il
R ic k l
cy Lu
Figure 78. Developer on Java Development with One Package per Programmer
In this scenario, each programmer has his own package which contains all of the parts he or she is responsible for. This works fine if the team setup or responsibilities do not change. However, if they do (Rick replaces Lucy), extensive changes to the team environment container structure would be required.
129
Lu cy
Joe Bob
Jan e
Bill
Figure 79. Developer on Java Development with One Package per System Function
This will allow the team environment structure to remain stable while programmer responsibilities change over time.
130
...
Pkg Pgm 3 Pkg Pgm A
...
Pkg Pgm C
Pkg Pgm 1
Pkg Pgm 2
Pkg Pgm B
Pkg Records
A similar system implemented in the Developer on Smalltalk environment might have had the same application in multiple configuration maps and more applications per configuration map (as compared with packages per project).
If there are too many parts in the function, or if the maintenance of the parts could become the responsibility of more than one person, you may wish to
131
further refine the part organization by creating additional packages using a defined naming scheme.
7.3.2.2 Shared Code (Intra-System) Some parts are only shared only by components belonging to the same system function/object. For example, you may have a TUI program and a VisualAge for Java application both using the same customer detail record. If the TUI and the application are stored in different packages, where should you put the shared record?
A good solution to this problem would be to put the record in a package that contains the shared parts for the customer system function/object. Other parts, like generation options, linkage tables, and resource associations are also used throughout the system. They should also be stored in their distinct package.
7.3.2.3 Shared Code (Inter-System) Parts that are shared across multiple systems are generally the responsibility of a specific group of people; system-specific developers are not allowed to change these parts. Because of this, these components should be stored in distinct packages owned by the leader of the group responsible for their maintenance.
Data definition parts are an example of parts that are shared across a system. In most projects, a member of the team is responsible for maintaining the database and its corresponding VisualAge Generator definitions: the database administrator (DBA). As with any other shared parts, they should be stored in a separate package.
132
...
Figure 81. Sample Team Environment Container Breakdown
Notice how common components are stored in distinct packages. Common components used throughout the system are stored in packages grouped under the Banking System Common Definitions project. Each of the systems major functions (business objects or layers) has its own project which contains its source code. Again, common components are
133
stored in separate packages. Table 4 lists the contents of each of these packages.
Table 4. Sample Team Environment Container Breakdown Package Content
Package Name
co.banking.common.databasedefinitions co.banking.common.options co.banking.common.programs co.banking.customer.guis.common co.banking.customer.guis.detail co.banking.customer.guis.list co.banking.customer.servers.common co.banking.customer.servers.detail co.banking.customer.servers.list co.banking.customer.tuis co.banking.customer.tuis.detail
Content
Contains the SQL row table definitions and their corresponding data items Contains the generation options, linkage tables and resource associations Contains the code shared between all the systems programs (TUIs and servers) Contains the shared code of the customer Java applications Contains the code for the customer detail Java application Contains the code for the customer list Java application Contains the shared code of the customer data servers Contains the code for the customer detail data server Contains the code for the customer list server Contains the shared code of the customer TUI programs Contains the code for the customer detail TUI program
This is a valid solution if assignment of ownership is based on system functions (one group responsible for all the components of a single function). On the other hand, if responsibility is based on component type instead of functions (one group responsible for all data servers), then the following package naming scheme could be used: co.sys.program.function, where: co is the company name, sys is the system name, program is the name of the system component (GUI, TUI).
134
This approach would also allow a programmer to define a project that loaded just the code they were interested in working with, to make loading the full set of code that they require an easier task to perform.
135
The target project, for the package that needs to be promoted, must be an open edition. The release action must be performed by the target project owner. The overall process is a pull of code to the next level. Figure 84 shows the act of promoting a package from development to test.
136
137
...
Proj Common Parts
Default package
...
...
Proj Common Parts
Default package
...
...
Proj Common Parts
...
Default package
Figure 85. Using PLPs to Define Sets of Projects Used by Development Phase
In Figure 85, the only redundant projects are the phase projects, the first level in the project hierarchy supported by a PLP. A project hierarchy with additional levels can also be defined using PLPs in more than one project layer. This technique, while a bit more complex, may be required to provide the organization and control support required for your system.
138
...
Proj Common Parts
Default package
...
...
Proj Common Parts
...
Default package
The package used to store the PLP for the target phase project, and the project itself should be open editions to prepare for commitment of this change (promotion of code between development phases). 7.5, Package Management for Java Client Generation on page 140 reviews other development process considerations when using a PLP-based phase project management approach.
7.4.5 Summary
There are several choices for development phase management: Redundant project sets for each phase of development (see Figure 82). Redundant PLPs (with an owning project) for each phase of development (see Figure 85). Combinations of the above techniques. The technique you choose should reflect how you want to manage and control the development process. Note that you will need to use PLPs to support the use of LANGEN-based generation and preparation processing, so you may find it easier to manage the development phases using either a mix of the available techniques or only through the use of multiple PLP-based structures (phase projects).
139
Define - Test
Java
Components
Pkg Pgm 1
Proj Sub-Sys A
Workspace
Generate
Generated Java for VAGen Parts used in Java Components
Pkg Pgm 2
VAGen Programs
Pkg Pgm 3
VAGen Functions
140
/PackageName="Pkg B"
Project Sub Sys B Project Common
Pkg A
Pkg B
Pkg C
Pkg Records
Pkg Shared
Java GUI VAGen Records VAGen Functions VAGen Programs VGGUIClass VGWkgClass
Figure 88. Java Client Generation Using the Same Package as the Java Component Source
141
System Project
VAGEN_SYSTEM_PROJECT.PLP
Default Pkg
VGGUIClass VGWkgClass
Proj Common Parts Pkg Pgm C Pkg Records Pkg Cntl Files
Pkg Pgm 1
Pkg Pgm 2
Pkg Pgm 3
Pkg Pgm A
Pkg Pgm B
Pkg Shared
Java GUI
Figure 89. Java Client Generation Using a Shared Package in the System Project
By keeping the target package for Java client generation in the system project, the following process is suggested to ensure that source-to-runtime system relationships exist: 1. Version all projects referenced by the system PLP part. 2. Update the system PLP to reflect new target project version identifiers. 3. Perform Java client generation on all Java components in the system using a /PackageName generation option that targets the common Java GUI generation package in the system project. 4. Version the system project. This process should only be followed as part of the process used to build test and production level systems. This would allow the task to be performed by one person as part of a standard phased development process.
142
Part 3 includes the following chapters: Chapter 8, Scenario: Designing the Development Process Chapter 9, Migrating an Existing System to Developer on Java Chapter 10, GUI Development with Developer on Java
These chapters discuss how the Developer on Java development platform can be used to implement Java-based GUI business application systems. Focus areas include the use of a team environment development process, development of reusable parts, and GUI programming examples.
143
144
145
146
Table 5 identifies the programs that exist in the two banking system functions that will be migrated.
Table 5. Programs to Migrate
Name
IBKBEWM IBKUWM IBCEWM IBKTUWM IBKBKO1 IBKBKOF IBKBKOL IBKBKON IBKCRO1 IBKCROF IBKCROL IBKCRON
Function, Type
Bank, TUI Bank, TUI Customer, TUI Customer, TUI Bank, called Batch Bank, called Batch Bank, called Batch Bank, called Batch Customer, called Batch Customer, called Batch Customer, called Batch Customer, called Batch
Description
Bank list Bank detail Customer list Customer detail Bank detail select/update server Bank detail validation server Bank list update server Bank list select server Customer detail select/update server Customer detail validation server Customer list update server Customer list select server
All of these programs, and their associates, have to be brought into the Developer on Java environment. To accomplish this, Jack plans to export them into a set of External Source Format (ESF) files and then use the Developer on Java platform to import these files.
Notes:
1. This process could also be performed using either of these Developer on Java migration support tools: V3 to V4 Migration (accepts VisualAge Generator V3 .dat files as input) MSL Migration (accepts ESF, which is placed in MSLs, as input) 2. We did not use the migration tools, as this process was initially performed using the Beta 2 drop of VisualAge Generator V4, and the migration tools were not yet fully functional. 3. When you migrate, you should consider the use of the available migration tools. For additional information, see the VisualAge Generator Migration Guide Version 4.0, SH23-0267.
147
8.2.2.2 Second Container Breakdown The first component breakdown is not satisfactory, because the team that will be responsible for developing the new VisualAge for Java applications will not be the same as the one that maintains the existing TUI system. Also, the person responsible for maintaining the SQL definitions will be the ISAs DBA, Otto.
To avoid this problem, Jack decided to: Separate the system functions and common components by type: VisualAge for Java applications (GUIs), TUIs, and data servers. Create a new package for the database definitions. Put common components and functions in separate projects. Applying these changes results in the breakdown shown in Figure 91.
148
8.2.2.3 Final Container Breakdown If Jack were to import the systems source code in this structure, he would probably get a few hundred VisualAge Generator parts per package. This would complicate the systems maintenance and would augment the chances of two developers modifying components in the same package. Jack decided to solve this problem by creating packages for each system sub-function: detail and list.
149
...
150
Generator. For this phase of the project, Jack decided that he would do the migration manually to familiarize himself with organizing parts in the team environment. Here are the steps that he identified: Create the team environment users and container structure Import ESF content move Database Definitions Move programs
User Name
Administrator Jack Migrator
OS user id
jack jack jack
Description
User responsible for maintaining the repository. Initially mapped to Jack, this responsibility may be assigned to someone else later on. ITSO Software Associates senior analyst. User responsible for all migrations. Initially mapped to Jack, this user will help identify which VisualAge Generator classes were created during migration. Mapping may change once initial migration is completed. ITSO Software Associates database administrator. Default project/package owner. Will be assigned to projects, packages and classes to which no owner has been assigned yet. Since the user is mapped to __emserv__, no password check will be done when developers change their id to this user.
Otto TeamOwner
otto __emserv__
Besides creating the planned container structure, Jack will also create a temporary migration package that will hold all of the systems components before they are moved to the appropriate packages.
8.3.1.2 Import ESF Content This step is rather straightforward: just import the content of each ESF file into the temporary migration package.
151
The following ESF files were imported: Cust31.ESF Bank31.ESF CmnCode31.ESF CmnData31.ESF
For information on the ESF files, see Appendix D, Sample Code and Other Materials on page 303.
8.3.1.3 Move Database Definitions In this step, Jack will move all of the SQL row records and their associates in the common definitions package. 8.3.1.4 Move Programs After moving the database definitions, Jack will move each program in the system along with the associated parts, to the appropriate package. For each program, he will create a list of the associated parts and apply the following logic:
If the component is currently in the programs package, leave it there. If the component is currently in the temporary migration package, move it to the programs package. If the component is in another programs package and the other program is part of the same system function, move it to the system functions common package. If the component is in another programs package and the other program is not part of the same system function, move it to the common programs. Using this logic, Jack should be able to easily identify and move system and function shared components.
152
Jack is now ready to start creating the team environment container structure. He adds the following three system projects: ISA ITSO Banking System Bank ISA ITSO Banking System Common Components ISA ITSO Banking System Customer
153
He then selects the "ISA ITSO Banking System Bank" project and creates each of its packages. For each package, he adds the user Owner as a group member. Group members are entered in the second screen of the Package Creation SmartGuide (see Figure 94). The following packages are created: isa.ibs.bank.guis.common isa.ibs.bank.guis.detail isa.ibs.bank.guis.list isa.ibs.bank.servers.common isa.ibs.bank.servers.detail isa.ibs.bank.servers.list isa.ibs.bank.tuis.common isa.ibs.bank.tuis.detail isa.ibs.bank.tuis.list
154
Jack then selects the "ISA ITSO Banking System Common Components" project and creates each of its packages. This time, he adds Owner and Otto as group members of the database definitions package and adds Owner as a group member of the common programs package. Here is the list of packages to add: isa.ibs.common.databasedefinitions isa.ibs.common.programs Jack then selects the "ISA ITSO Banking Customer" project and creates each of its packages. Like the first project, he adds Owner as a group member of all of the packages. Here is the list of packages to add: isa.ibs.customer.guis.common isa.ibs.customer.guis.detail isa.ibs.customer.guis.list isa.ibs.customer.servers.common isa.ibs.customer.servers.detail isa.ibs.customer.servers.list isa.ibs.customer.tuis.common isa.ibs.customer.tuis.detail isa.ibs.customer.tuis.list
155
All the packages for the system functions and common components have been created. We now have to add the temporary migration package. Just select the "ISA ITSO Banking System Common Components" project and add a package named "isa.ibs.migration" with no group members (the user Migrator will be added by default). Figure 95 shows the resulting team environment container structure.
156
9.2.1.2 Import ESF Content Once we have defined our team environment container structure, we are ready to import our code into it. The first thing to do is to make sure that the "VAGen Web Transaction Samples" project is not loaded in your workspace. If it is, delete it to avoid duplicates during the import process. Once the project is deleted, open the VAGen Parts Browser by clicking on the "Open VAGen Parts Browser" option under the Workspace menu.
This window should list all the VisualAge Generator parts that are stored in your workspace. To import code, select the "Import..." option of the "Parts" menu. This should display a file selection window that prompts you for an ESF file. Select the "bank.esf" file and click on "Open". VisualAge Generator will read all the members in the file and display them in the VAGen Import dialog (see Figure 96).
157
There should be no parts with errors. Select "isa.ibs.migration" as the target package and click on the "Force target package" to force VisualAge Generator to import the members in the migration package. Click on the ">>" button to add all the available parts to the selected parts pane and click on "Import". After importing all the parts, you may see a window popup. This window displays all the warnings and errors that were encountered during the import process. If you see this window, make sure that all the displayed messages are warnings, and close it down. If you do not see this window, then there were no problems during the import. Click on the "Close" button to close the VAGen import window. In your Parts Browser, press F5 to refresh the parts list. You should now have more than 350 parts in the "itso.ibs.migration" package. We are now ready to move all the VisualAge Generator parts to their appropriate packages.
9.2.1.3 Move Database Definitions The first components that we are going to move are the database definitions. To accomplish this, change the selection criteria of your parts browser by clicking on the "Set Filter..." option of the "View" menu. Deselect all the packages by clicking on the left "None" button and deselect all the VisualAge Generator part types by clicking on the right "None" button. After doing this, select the "isa.ibs.migration" package, expand the "Records" VisualAge Generator part type, select the "SQL Row" type and click on "OK".
158
Your VAGen Parts Browser should now display four SQL row records (see Figure 97).
Select the first record and click on the "Associates" option of the "Parts" menu. This will open up another VAGen Parts Browser that will show the record and all the global data items that it uses. Select all the parts (hold down the "Ctrl" key and press "/") and click on the "Move" option of the "Parts" menu. A window will pop up and display all the packages in your workspace that are editioned (see Figure 98).
159
Double-click on the "isa.ibs.common.databasedefinitions" package to select the target package. The parts should now have been moved to the package, and your VAGen Parts Browser should have been refreshed accordingly. Close this Parts Browser down and move the three other records using the same steps: List associates Select all Move record and associates Before moving the data items, make sure that they are not already in the database definitions package. If some of the items that you selected are already in this package, they will not show up in the target package list when you try to move them.
9.2.1.4 Move Programs After moving the database definitions, we are now ready to move each of the systems programs and its associates in the appropriate package. For each program, we will list all of its associates and apply the following logic for the move operation:
If the component is currently in the programs package, leave it there. If the component is currently in the temporary migration package, move it to the programs package. If the component is in another programs package and the other program is part of the same system function, move it to the system functions common package. If the component is in another programs package and the other program is not part of the same system function, move it to the common programs. To accomplish this, open a VAGen Parts Browser and change the display filters to select the "isa.ibs.migration" package and "Program" VisualAge Generator part type. This should list all the programs, TUIs, and called batches, that are in the package (there should be 13 of them).
160
When moving programs, it is better to move the ones that are leaves of the call tree first. For example, let us say that we have the following call tree, as shown in Figure 99.
The first programs that should be moved are D and B, because they do not call any other programs. After that, C should be moved, and then A. The reason for this is that program parameters, which are shared by the program and all the programs that call it, should be stored with the program itself. Knowing this, we are going to move the called batch programs first, since they do not call other programs (in this scenario, at least). The first program that we are going to move is the SSYSERT, which is a common TUI program that displays error messages to users. List the associates of the program ("Associates" option of the "Parts" menu). Move the parts that are currently in the migration package (all of them) into the "isa.ibs.common.programs" package. Close down the Parts Browser and press "F5" to refresh the programs list. SSYSERT should now be gone from the list, since it is not in the migration package anymore. The next program that we are going to move is IBKBKOF, which is the bank detail validation server. Select it from the VAGen Parts Browser and list its associates. Change the sort order of the list to display the VisualAge Generator parts by package name (click on the "Package" column of the list). Select all the parts that are in the migration package and move them to the "isa.ibs.bank.servers.detail" package. All the parts should now be in this package or in one of the common packages. Close down the Parts Browser. The next program that we are going to move is IBKBKOL, which is the bank list server. Select it from the VAGen Parts Browser and list its associates.
161
Change the sort order of the list to display the VisualAge Generator parts by package name (click on the "Package" column of the list). You may notice that there are several parts in the list that are in the "isa.ibs.bank.servers.detail" package. This means that these parts are shared by at least two programs (IBKBKOF and IBKBKOL). Since these programs are part of the same function, select the shared parts and move them into the "isa.ibs.bank.servers.common" package. After doing this, select all the parts that are in the migration package and move them to the "isa.ibs.bank.servers.list" package. Close down the Parts Browser. The next program that we are going to move is IBKCROF, which is the customer detail validation server. Select it from the VAGen Parts Browser and list its associates. Change the sort order of the list to display the VisualAge Generator parts by package name (click on the "Package" column of the list). You may notice that there are several parts in the list that are in the "isa.ibs.bank.servers.common" package. This means that these parts are shared between programs of the bank and customer functions (like IBKCROF). Since they are shared across multiple functions, move these parts to the "isa.ibs.common.programs" package. After doing this, select all the parts that are in the migration package and move them to the "isa.ibs.customer.servers.detail" package. Close down the Parts Browser. Continue moving all the other servers using the same logic and then move the TUI programs. When moving the parts, you may notice that a particular package contains too many members, or that a particular package is missing. This will often happen, as you cannot predict everything when you design your container structure. In this case, you may create additional packages while you are importing.
9.2.1.5 Package Cleanup After moving all the programs, you should verify that there are no more parts in the migration package. To do this, open a VAGen Parts Browser and change the filters to display all the VisualAge Generator part types in the "isa.ibs.migration"package. If there are still parts left, you have to move them to the appropriate package (list the associates of the part to know where it is used). If there are no more parts left, delete the temporary migration package by selecting it and clicking on the "Delete" option of the "Selected" menu.
Once this is completed, you should clean up the packages. By cleaning up, we mean that you should delete the VisualAge Generator part classes that do not contain any members. In Figure 100, the "isa.ibs.bank.servers.common" package contains three VisualAge Generator part classes: VAGenFunctions, VAGenRecords and VAGenTables.
162
The package contains one function and six records, and each of these parts is represented by a method in its corresponding VisualAge Generator part class. You may notice that VAGenTables does not contain any methods. This means that the package does not contain any tables. This situation happens when you move all the parts of a specific type from one package to another. When you move parts, VisualAge Generator creates the appropriate part class in the target package (if it is not already there) and then moves the methods (parts) from the source package to the target package. Even if there are no more parts of a specific type in the package, VisualAge Generator will not remove the part class. This has to be done manually by selecting the class and clicking on the "Delete" option of the "Selected" menu. To clean up your packages, expand them one at a time and check if there is a "plus" sign next to the VisualAge Generator part classes. If there is no "plus" sign, this means that the class has no methods (parts) and you can delete it.
163
9.2.2.1 Validating the Code Open a VAGen Parts Browser and change the filters, so that the browser displays the programs in all the packages of your workspace. Select them all by pressing "Ctrl" and "/" and click on the "Validate..." option of the "Parts" menu. Select the target system (MVSCICS) in the drop-down list and click on the "Validate" button.
After a couple of seconds, you should get the "Validation complete" message at the bottom of the window. If you do not get this message, a window will pop up that will display the validation errors and warnings. If you get messages saying that a particular part has not been defined, this means that you forgot to import the part, or that you accidently deleted it. If this happens, you can always reimport the part from the ESF using the import command.
9.2.2.2 Versioning and Releasing the Code Once validation is completed, you now have to version the projects, packages and classes. The quickest way to do this is to collapse the three system packages in the workbench and click on the "Version..." option of the "Manage" submenu of the "Selected" menu. The following window in Figure 101 should appear:
Select the "One Name" radio-button option, type the "- Migration 1.0" version name, and click on "OK". This should version and release all the systems projects, packages and VisualAge Generator part classes.
9.2.2.3 Changing the Class Owners Before handing over the migrated code to the development team, you have to change all the class, package, and project owners to the default Owner user.
164
To accomplish this, go to the Classes tab of the Workbench and select the "Goto Class..." option of the "Classes" menu. Type in "VAG" for the class name as shown in Figure 102; this should list all the classes whose name starts with VAG:
Double-click on the first class in the list (VAGenDataItems). This will locate the first definition of the class in your workspace. Select it and scroll down to the last VisualAge Generator class definition in the list. Hold down the "Shift" and click on the class; this should select all the VisualAge Generator classes in your workspace. To change their owners, click on the "Change Owner..." option of the "Manage" submenu of the "Classes" menu. This will list all the group members that are common to the packages in which the selected classes are defined. Double-click on the Owner user to change the class owners to the default owner.
9.2.2.4 Changing the Package Owners The next step is to change the package owners. Go to the "Packages" tab of the workbench and click on the "Go To Package..." option of the "Packages" menu. The following window in Figure 103 should pop up:
165
Enter "isa" in the package name and double-click on the first package in the list. This will highlight the first package of the banking system in the list. Select it, scroll down to the last package of the system, hold down the "Shift" key and click on it (this should select all the systems packages). To change the owner, click on the "Change Owner..." option of the "Manage" submenu of the "Packages" menu. This will list all the group members that are common to the selected packages. Double-click on the Owner user to change the package owners to the default owner.
9.2.2.5 Changing the Project Owners The final step of the migration is to change the project owners. To do this, go to the "Projects" tab of the workbench and collapse the three system projects. Select the first one, hold down the "Shift" key, and click on the last one (the three projects should be selected). Click on the "Change Owner..." option of the "Manage" submenu of the "Selected" menu. This will list all the users that are defined in the repository. Double-click on the Owner user to change the project owners to the default owner.
The partial migration phase is now complete. The code can now be handed over to the development team so that they can enhance it.
166
Each of these steps is detailed in the following sections. Once all of this is completed, development can begin. The end result of the development
167
process is detailed in Chapter 10, GUI Development with Developer on Java on page 167.
168
JavaApplicationA (GUI)
(Shared components) Components
JFrame JPushButtons JPopupMenu JavaApplicationB ...
AppletA
Components
Applet Content Pane JPushButtons
PanelA Components
JPanel JTable ...
PanelResourceA Components
VGPROGA ErrorRoutine ... ...
As shown in Figure 110, both the JavaApplicationA and AppletA classes use PanelA. JavaApplicationA contains a more complex user interface (using secondary windows and popup menus) than AppletA. However, both GUIs display the information in the same format and retrieve it from a called batch program. This shared logic is encapsulated in the PanelA class. To summarize, the following component types will be defined in the system: Reusable components. These components can be used in one or more systems; for example, error routines and list handling parts. Reusable system components. These components can be reused in the system in which they are defined; for example, customer list panel and customer detail panel. VisualAge for Java applets. These will contain one or more panels that display the information for the Web-enabled system. VisualAge for Java applications. These will generally contain one panel, and will use several windows to display information.
169
In the scope of this project, ISA wants to limit the amount of manual Java programming to be done, since their developers have a limited knowledge of the language. Reusable components will help them achieve this goal. The following components will be created: IsaActionEventHandler this component allows the developer to visually implement methods and events in a bean. IsaErrorRoutinethis component checks the common error working storage record and triggers the appropriate event (errorOccured or noErrorFound ). IsaLogic this useful bean performs various logic operations. It can check if a value is true or false and perform a "not" operation on a boolean, for example. IsaComboBox this is an extension to the JComboBox part. Features will be added to facilitate the population of the combo boxs items using an array (such as the content of a record). IsaGroupBox this is an extension to the JPanel part. It will behave like a normal panel except that it will have a title and a border. IsaTable this is an extension to the JTable part. Like the combo box part, features will be added to populate the list. Also, other features will be added to update the list and facilitate the use of a popup menu. IsaTextFieldthis is an extension to the JTextField part. This version of the text field can change the case of its content and limit the number of characters that it contains. It also lets you control when the text event is fired.
170
10.1.2.2 System Reusable Components As was explained earlier, ISA will develop two systems, a Java applet and a Java application system. The two systems will display the same information and use the same retrieval and update logic. For this reason, layers of GUI components will be created that encapsulate this logic. These GUI components will be shared by both systems.
The first component that is reused by both systems is CustomerListPanel. This panel displays the customer list retrieved from the database by a VisualAge Generator program. This panel does not function by itself and must be embedded in another GUI. Figure 112 shows the CustomerListPanel prototype.
The second component that is reused by both GUI systems is CustomerDetailPanel . This reusable panel displays and updates a customer record. Again, all the retrieval and update logic are encapsulated in the panel. Figure 114 shows the CustomerDetailPanel prototype.
171
10.1.2.3 VisualAge for Java Applets There is only one applet in the system: CustomerListApplet. The applet will contain both the customer list and detail; and will let the user add, modify, or delete customers. Again, this applet does not perform any database IOs; these are done by the two reusable components.
10.1.2.4 VisualAge for Java Applications Unlike the applet system, the application system uses two GUIs. The first one, CustomerListApplication, displays the customer list in a frame. It has a set of buttons and a popup menu to add, modify, or delete customers. When one of these buttons is pressed, a secondary window opens and displays the customer detail information.
172
The second GUI in the Java application system is CustomerDetailApplication . This GUI enables the update of customer data. The GUI is displayed when the user clicks on one of the Add, Modify, or Delete buttons in the CustomerListApplication . Figure 117 displays the prototype for the CustomerDetailApplication application.
173
174
10.2.1 IsaActionEventHandler
This bean allows the developer to implement methods and events in a bean visually (see Table 7).
Table 7. IsaActionEventHandler Interface
Name
executeAction() event
Description Triggers the event event Triggered when the executeAction() method is invoked
For example, two instances of the IsaActionEventHandler bean could used in a resource bean to fetch a customer detail instance. The first bean would be named GetDetail and the second one GetSuccessful. After both beans have been put on the free-form surface, connections can be made between them. The first connections source would be the event event of the GetDetail bean, and its target would be the bean that retrieves the information (a VisualAge Generator function, for example). The second connection would connect the hasExecuted event of the function to the executeAction() method of the GetSuccessful bean. Once the connections are done, promote the executeAction() method of the GetDetail bean as getDetail and the event event of the second bean as getSuccessful. By using this bean, you can implement the logic of any part using visual programming.
10.2.2 IsaErrorRoutine
This is a simple bean that checks the common error record to see if any errors are logged in the error code array field. It then triggers the errorOccurred or noErrorFound event accordingly (see Table 8).
Table 8. IsaErrorRoutine Interface
Name
processMessageRecordData
Type Property
Description Record data property. This property is used as a method. When it is changed, the bean will run the error checking logic. Triggered if one or more of the error code fields contain non-blank or non-zero values.
errorOccurred
Event
175
Name
noErrorFound
Type Event
Description Triggered if all the error code fields are blank or zeros.
10.2.3 IsaLogic
This bean performs several logic operations using visual programming. It can check if a string contains a true value ('TRUE', 'YES', and so on) and it can perform a not logical operation on a boolean. Other useful methods could be added to the bean (see Table 9). For example, methods could be added to check for equality between two objects or to check if an object is nil.
Table 9. IsaLogic Interface
Name
checkIfTrue(String)
Type Method
Description Checks if the supplied string contains a true value. If it is equal to 'T', 'TRUE', 'Y' or 'YES', then the isTrue event is triggered. If not, the isFalse event is triggered. Boolean property. When changed, a not operation is performed on aBooleanNot. Boolean property. When changed, a not operation is performed on aBoolean . Triggered by the checkIfTrue(String) method Triggered by the checkIfTrue(String) method
aBoolean
Property
10.2.4 IsaComboBox
This bean extends the JComboBox. A method was added to populate the contents using an array (see Table 10). For example, you could use the contents of a VisualAge Generator table to populate the combo box.
Table 10. IsaComboBox Interface
Name
addAllFromArray(Object[])
Type Method
Description Adds the contents of the object array to the combo box.
176
10.2.5 IsaGroupBox
This bean extends the JPanel and has a title and a border surrounding it (see Table 11). These attributes can be customized using the bean properties.
Table 11. IsaComboBox Interface
Name
groupBoxLineColor groupBoxLineWidth groupBoxTitle groupBoxTitleColor groupBoxTitleFont groupBoxTitleJustification (<Choice>)
Description
Color Property. Specifies the color used to draw the group box border. Int Property. Width of the border in pixels. String Property. Title to display. Color Property. Color used to write the title.
Font Property. Font that will be used to write the title. Drop-down list with the following values: DEFAULT_JUSTIFICATION LEFT CENTER RIGHT This sets the position of the title. Drop-down list with the following values: DEFAULT_POSITION ABOVE_TOP TOP BELOW_TOP ABOVE_BOTTOM BOTTOM BELOW_BOTTOM This property specifies where the group boxs title will be written.
groupBoxTitlePosition (<Choice>)
Property
177
10.2.6 IsaTable
This bean extends the JTable part and facilitates list retrieval, updates, item selection, and popup menu handling (see Table 12).
Table 12. IsaTable Interface
Name
addAllFromArrayDataItem (HptArrayField, int)
Type Method
Description Adds the elements stored in the array field to the list. The second parameter is the number of elements in the array. Each field to be displayed in the list (set with the identifier column property) must be a substructured field of the array field. If the field is not found, the items will not be added. Adds the contents of the field to the table at index int. Each field to be displayed must be a substructured field of the supplied field. Adds the contents of the field to the table. Each field to be displayed must be a substructured field of the supplied field. Takes the selected item and puts it in the field. Again, each field that will be displayed must be a substructured field of the supplied field. Removes the item at index int. Replaces the item in the list at index int with the contents of the field. Each field to be displayed must be a substructured field of the supplied field. Boolean property. True if at least one item selected in the list.
JPopupMenu property. A reference to the popup menu that will be displayed when the user right-clicks in the list.
addFromDataItem (int, HptField) addFromDataItem(HptField) putSelectedValueInDataItem (HptField) removeAt(int) setFromDataItem (int, HptField) isItemSelected popupMenu selectionMode(<Choice>)
Method
Method Method
Method Method
Event Event
Signaled when the user double-clicks on an item in the list. Signals that the selected row in the list has changed.
To use the table, add a JScrollPane to your GUI, put an IsaTable in the pane, and add TableColumn parts to the table. After that, put the data item name that has to be displayed, between double-quotes, in the identifier property of each column. An example of the use of this IsaTable class can be found in 10.3.2, CustomerListPanel on page 181.
178
There is an alternative to the technique that was implemented in the Customer Java GUI system. We could have used the following direct connection from the VisualAge Generator record array to the JTable model attribute: IBKCRRO_WPAGE.INSTANCE-FIELDS <--> ScrollPaneTable.model The main reason that we chose to use a private method, instead of an attribute-to-attribute connection, is that you cannot have a list with an unlimited number of items if you directly connect it to the record. Using the method, we left open the option of looping on the server retrieve logic and invoking the private method multiple times to fill up the list after each block is retrieved. We did not implement support for retrieving multiple packets.
10.2.7 IsaTextField
This bean extends the JTextField. Several features were added to format the contents of the field (set to uppercase, limit length) and control when the text property event fires (see Table 13).
Table 13. IsaTextField Interface
Name
caseConversion (<Choice>)
Type Property
Description Drop-down list containing the following values: NONE (default) TO UPPERCASE TO UPPERCASE - LOCALE TO LOWERCASE TO LOWERCASE - LOCALE Selecting one of these will format the text field to upper or lower case. Drop-down list containing the following values: LOSING FOCUS (default) AFTER EACH KEYSTROKE This attribute specifies if the text property event is triggered every time a key is typed or when the field loses focus (user tabs out).
fireTextChangedOnEvent (<Choice>)
Property
179
Name
formatStringOnEvent (<Choice>)
Type Property
Description Drop-down list containing the following values: LOSING FOCUS (default) AFTER EACH KEYSTROKE This attribute specifies when the fields content will be formatted (truncated and/or case change). Specifies the maximum number of characters that can be typed in the field. Setting it to any value greater than zero (which is the default) will truncate the fields content if it is too large. Truncation will occur when the field is formatted.
maximumStringLength
int
DetailPanel Components
JPanel JField ...
DetailPanelResource
Components
IBKCRON ErrorRoutine ...
Components
IBKCRO1 ErrorRoutine ...
180
10.3.1 CustomerListPanelResource
The first system reusable GUI component is the resource bean that supports list processing. The CustomerListPanelResource component supports access to the VisualAge Generator server program that can obtain a list of customer data, and supports various processing operations on the contents of the list. Figure 111 shows the Developer on Java implementation for this resource bean component.
The CustomerListPanelResource class encapsulates all the retrieval logic and error handling and calls the VisualAge Generator called batch program.
10.3.2 CustomerListPanel
The first visual system reusable GUI component is the customer list panel or view part. This panel provides a list view of the contents of the customer database table and enables various update operations (add, modify and delete) on the contents of the list. Figure 112 shows the Developer on Java implementation for this panel component.
181
This primary part in the GUI is a panel that contains a list and a label. This component also contains the CustomerListPanelResource class which is responsible for retrieving the list. This class encapsulates all the retrieval logic and error handling and calls the appropriate VisualAge Generator called batch program. Table 14 describes the different methods, properties, and events for the CustomerListPanel class.
Table 14. CustomerListPanel Interface
Name
getList()
Type Method
Description Invokes the getList() method of the panels resource part which fetches the list from the database. Adds a customer record to the list using the customerDetail record. This does not update the database.
addCustomer()
Method
182
Name
modifyCustomer()
Type Method
Description Modifies the selected customer in the list using the customerDetail record. This does not update the database. Removes the selected customer from the list. This does not update the database. Gets the id of the selected customer and stores it in the selectedCustomerId property. Reference to the record used in the customer detail panel. This record is used to update the contents of the list. Reference to the list used to display the customers. String that contains the selected customers id. This is populated by the getSelectedCustomerIdValue() method. Triggered after adding, modifying or deleting a user from the list.
deleteCustomer()
Method
getSelectedCustomerIdValue()
Method
customerDetail(Record)
Property
customerList(IsaTable) selectedCustomerId(String)
Property Property
listUpdateSuccessful
Event
10.3.3 CustomerDetailPanelResource
The next reusable GUI component is the resource bean that supports detail processing. The CustomerDetailPanelResource component supports access to the VisualAge Generator server program that can work with instances of customer data and supports various update operations (add, modify and delete) on the customer instances. Figure 113 shows the Developer on Java implementation for this resource bean component.
183
The CustomerListPanelResource class encapsulates all the retrieval logic and error handling and calls the VisualAge Generator called batch program.
10.3.4 CustomerDetailPanel
The second visual system reusable GUI component is the customer detail panel. This panel retrieves, displays and updates a customer record.
184
Figure 114 shows the Developer on Java implementation for this reusable detail view component.
This primary part in the GUI is a panel that contains three entry fields and a combo box. The combo box lists all the valid title values and is populated using a VisualAge Generator table. The CustomerDetailPanelResource class is embedded in this panel and is used to retrieve and update the customer database table.
185
Table 14 describes the different methods, properties, and events in the CustomerDetailPanel class.
Table 15. CustomerDetailPanel Interface
Name
disableCustomerDetail()
Type Method
Description This method disables all the fields in the customer detail so that they cannot be updated. Empties all the fields of the customer detail and enables all the fields. Initializes the panel before an add operation. Initializes the panel before a modify operation. The customer id is disabled so that it cannot be modified and the customer detail is retrieved. Initializes the panel before a delete operation. All the customer detail is disabled so that it cannot be modified and the customer detail is retrieved. Adds, modifies or deletes the customer table database using the information entered in the panel. Reference to the record that contains the customer detail. This event is triggered after the customer was successfully added to the database. This event is triggered after the customer was successfully deleted from the database. This event is triggered when an error is encountered while retrieving the customer detail (modify or delete). This event is triggered after successfully retrieving the customer detail (modify or delete). This event is triggered after the customer was successfully updated in the database. This event is triggered when an error is encountered while adding, modifying or deleting a customer.
initializeDelete()
Method
updateCustomer()
Method
getSuccessful
Event
modifySuccessful updateError
Event Event
186
The only logic in this applet is navigation and control logic, such as enabling and disabling the push buttons. All other processing is implemented in the two panels (CustomerListPanel and CustomerDetailPanel ). Figure 115 shows the Developer on Java implementation for the CustomerListApplet applet component.
To add a new customer, the user clicks on the add button, enters the information and clicks on the update buttonthe customer is added to the list and database.
187
To modify an existing customer, the user highlights it in the list, double-clicks on it or clicks on the modify button, modifies the information and clicks on the update buttonthe customer detail is updated in the list and in the database. To delete a customer, the user highlights it in the list, clicks on the delete button (the customer detail shows up) and clicks on the update buttonthe customer is deleted from the database and the list.
188
The CustomerListPanel encapsulated in the CustomerListApplication implements the required database access processing.
189
190
Part 4.
Note: The following chapters, provided in Part 4, Primer for Developer on Smalltalk Team Environment, were first published in VisualAge Generator V3.1 System Development Guide, SG24-4230:
Chapter 11, Developer on Smalltalk Development Environment Chapter 12, Smalltalk Architecture and Team Environment Support Chapter 13, Software and Management Components Chapter 14, Version, Edition, and Release Management Chapter 15, Component Roles and Responsibilities Chapter 16, Developer on Smalltalk Development Process Definition They are included here to help you fully understand the VisualAge for Smalltalk team development environment.
191
192
John's Workstation
John's Image
Application
Zhu's Workstation
Zhu's Image
Application
Marcio's Workstation
Marcio's Image
Application
Configuration Map
Application Application
Configuration Map
Image contents loaded from library Changes saved in library Changes controlled by library process
Library (manager.dat)
Configuration Map
Application Application Application Application
Pfm
Cam Red
Application
Bpm Sjg
Configuration Map
Application Application Application
Qrs
This chapter addresses the support provided by the team environment for a group of programmers who are working on the same project.
193
This topic is discussed in detail in Chapter 12, Smalltalk Architecture and Team Environment Support on page 199.
194
This topic is discussed in detail in Chapter 13, Software and Management Components on page 209.
195
This topic is discussed in detail in Chapter 14, Version, Edition, and Release Management on page 217.
196
This topic is discussed in detail in Chapter 15, Component Roles and Responsibilities on page 225.
197
198
Workstation
VisualAge Smalltalk VisualAge Generator VisualAge Generator Developer Workstations
Workstation
VisualAge Smalltalk VisualAge Generator
Image
Image
Library (manager.dat)
Cam Red Qrs Sjg Bpm
199
As you can see from Figure 119, there are two basic VisualAge Smalltalk Enterprise-based platforms in the development environment:
VisualAge Generator Developer workstation Implemented as a VisualAge for Smalltalk - Client with the VisualAge Generator Developer feature loaded into the the team environment library and the local client image. See the VisualAge Generator product documentation for guidance on VisualAge Generator Developer workstation installation. VisualAge for Smalltalk - Manager Library Shared library on a server workstation. Shared access to the library is implemented using the EMSRV library access program provided with VisualAge for Smalltalk.
To understand how the Developer on Smalltalk development environment works, you must understand the key elements of a development environment based on VisualAge for Smalltalk and VisualAge Generator: the image used to support programming activity on the development workstation and the team environment library, as shared on the library server.
The library can be directly accessed, using native file I/O, by one programmer (active development image). To support concurrent access by multiple programmers (active development images), a library server must be established that implements the EMSRV program. The EMSRV program supports shared access by multiple developers. See production documentation for additional details on the library server and EMSRV. Starting with VisualAge for Smalltalk 4.5, the maximum size of a library is no longer restricted to 1 GB. The new maximum library size is the smaller of: 16 GB, or The largest file supported on the native file system used on the workstation platform where the library is stored.
200
Because the library grows as you version each software component, you need to manage both the growth and the size of the library. With VisualAge for Smalltalk Enterprise, the library can only be accessed using the specialized server program (EMSRV) provided with VisualAge for Smalltalk - Manager Library. The use of the EMSRV library server program supports enhanced library control and authorization processing. There are several key planning and configuration steps that must be performed to set up an EMSRV-based shared library. See the VisualAge for Smalltalk product documentation for the team environment library and EMSRV implementation details and guidance. One library can support multiple development platforms. For example, a library on AIX, implemented using EMSRV, can support connections from images being used on OS/2 and Windows NT. Other configurations for multiplatform support are also supported. Typically, libraries are created and maintained by the Library Supervisor, an team environment library user with administrator authority. This is true for the first library created as part of VisualAge for Smalltalk installation and configuration. You can have more than one library, which might be a requirement if you need to keep projects separated for control or security reasons, but consider this option carefully; if you have more than one library you need to define additional procedures in order to reuse parts across the multiple libraries. Programmers can also create libraries by exporting software components from an existing library. During export processing, the team environment asks for a file name for the destination of the export. If the library exists, the exported components are added; if it does not exist, a new library with the identified file name is created. The ability to export (and import) software components from one team environment library to another is the easiest way to share code between locations and teams.
Note: When using an EMSRV-based library configuration, the export/import file name is based on the drives available on the library server workstation. This server-based drive access is also true when you importing a VisualAge for Smalltalk feature using and EMSRV-based library configuration.
Libraries created during export processing are not full-function libraries; that is, they cannot support active development, the loading of other VisualAge for Smalltalk or VisualAge Generator features, or other common development tasks. These type of libraries might be better termed .dat or interchange files.
201
The term .dat comes from the file extension commonly used for these types of files.
Note: The library is a replacement for the MSL (Member Specification Library) used in prior versions of VisualAge Generator.
202
part editors, test facility, and generation tools that are used to support VisualAge Generator development. Other features, such as the Trailblazer browsers and Web parts, can be added to your workstation by loading the appropriate features. When implementing a full development environment for VisualAge Generator, you may want to identify which features, from VisualAge Generator, VisualAge Smalltalk Enterprise, and other vendors, should be available on all development workstations. Once this base image has been created and saved, it can be shared by copying the image to other development workstations and connecting it with the common library. It is not unusual for a team leader or library administrator to build common base images for a development team that have all the required product function and the current version of the application system that is being developed. By creating this image once and sharing it with the team, you can save load time for each programmer and provide a common base for future development activity. This task may be assisted by using configuration maps to define the structure and content of the application system as stored in the team environment (see 13.4, Configuration Map on page 214). The definition and creation of common images for a development team is best done by a team leader or library administrator.
Notes:
While sharing images is common with VisualAge for Smalltalk, there are some restrictions and possible limitations: Sharing images between operating systems is not possible. The shared image does not always function properly for all workstations, possibly due to operating system setting and configuration differences. Before sharing images, the process should be fully tested. You must test this process in your environment and proceed with caution.
203
Application
Class
Image
abt.icx
Method
Figure 120 shows the basic interactions between the image and the library. Also shown are the Smalltalk software and the team environment management components or objects (configuration map, application, class, and method). These components are discussed in Chapter 13, Software and Management Components on page 209. For now, the image and library relationship can be summarized as follows: Everything that is defined and saved in the team development environment is stored in the shared development library. These stored changes are available to all team members that are using an image connected to the same shared development library. When the changes become availablethat is, immediately or after being versioned, released, or bothdepends on the component type (see Chapter 14, Version, Edition, and Release Management on page 217). You can copy software components from the library and place them in your image using load operations (see Figure 121). Since the library stores the compiled representations as well as source code, loading does not require recompilation. The team environment loading process, like all library interactions, is transactional. This means that either the complete load succeeds or the entire load cancels. You can remove portions of what is stored in your image using the unload operation. An unload discards the selected component objects, as they are already in the library and do not need to be returned or saved.
204
Development Workstation
Image
Unload
Load
Record Changes
(Save)
Library (manager.dat)
The process of loading provides developers with the ability to share and reuse the code easily. It is a simple task to load software components developed by other team members, or even an older version of a component you developed yourself. The library keeps all versions and current editions of all software components for all team members. Any of these components can be found in the library and loaded into your image. You can load individual methods, classes, or applications, which gives you a fine-grain control over what you want to have in your image. You can also, using the unload operation, remove components you no longer need.
Note: The team environment components (methods, classes, and so on) are discussed in Chapter 13, Software and Management Components on page 209. The versioning process is discussed in Chapter 14, Version, Edition, and Release Management on page 217.
Another important concept is the difference between a saved image and a temporary image. You use two images on the VisualAge Generator Developer workstation. The saved image is stored on the hard disk (file abt.icx) and the temporary image resides in memory (see Figure 122).
205
Temporary image
(in memory)
Software components
5 8 13 14 4
8 1 9 2 3 10 12 4 7 14 13 6
Record Changes
(Save)
LOAD
SAVE
abt.icx
5 11
manager.dat
Image File
Figure 122. Image as a Temporary and Saved Cache
Library File
This saved image holds the VisualAge Generator Developer product and any components that you have loaded and saved. The temporary image represents your work in progress. When you make changes to components, they are automatically stored in the temporary image and the library, but not in the saved image. If we want to save the temporary image, we must select the Save Image option from the File menu of the System Transcript (this saves the image to abt.icx). You can save the image to another file by using the Save Image As... option from the File menu of the System Transcript and VisualAge Organizer windows. This means that you can have multiple development images stored on your hard disk, and you can control which one is used when you start the VisualAge Generator Developer. The one used is the one named abt.icx, but you can rename and move files around if you need to use multiple images. Until you save your temporary image, new work that you have done exists only in memory (and, of course, in the Library). The system does not automatically update the abt.icx file on disk. It is up to you to save the image at the appropriate time, or use the alternative (but time-consuming) method of loading the most recent library editions of all the components you need to have in your image to define and test your code.
206
When the system saves an image, the new image is written to the disk and the old image is then erased. Thus, you must have sufficient free space on your hard disk to be able to make successful saves. When you are exiting the VisualAge Generator Developer, the system displays a window asking you whether you want to save the image into abt.icx. Unless you think your image is broken, this is a good opportunity to save your days work so that it will be brought right back to you without having to manually load components from the library.
Note: If your saved image is broken, you need to use the Options->Make Image Consistent function provided in the VisualAge Organizer menu to repair your image.
207
208
VG Class extensions
(VA Generator Parts)
Subapplication1 Classes
Methods
VG Class extensions
(VA Generator Parts)
Subapplication2 Classes
Methods
Subapplication3
Classes
Methods
Figure 123. Smalltalk Software and the Team Environment Management Components
In Figure 123, the application, class, and method components and their container relationships are shown. That is, in the team environment: Methods belong to a particular class definition or class extension. Classes are defined or extended in an application or subapplication. Subapplications are created in an application or another subapplication. Applications can be added to a configuration map. Configuration maps can identify other configuration maps as required.
We explain each of these components, especially the class and the class extension and application relationships, since these component relationships
209
are fundamental to understanding how VisualAge Generator is integrated into the VisualAge for Smalltalk development environment. The team environment also defines roles with associated authorities and responsibilities for each software component. These topics are discussed in Chapter 15, Component Roles and Responsibilities on page 225.
13.1 Class
A class is a set of objects that share common attributes, behaviors, and implementation. A class definition can also be viewed as a template from which you can create new classes (subclassing a class to create a new class definition) or a base that you can enhance within another application (class extension). The first two class categories represent concepts that will help us understand how VisualAge Generator is implemented in VisualAge for Smalltalk. A defined class is a new class that a containing application adds to the system. An extended class is used to add function to the defined class in another application. An extended class consists of one or more methods that define the added functions. These methods are contained in an application other than the application that contains the defined class. When we work with VisualAge Generator parts in the team environment, we work with extended classes and methods. These extended classes are based on defined classes provided as part of VisualAge Generator. The combination of defined and extended classes provides support for VisualAge Generator parts such as records, processes, and so on. VisualAge Generator adds a set of classes to VisualAge for Smalltalk that represent 4GL part types. These classes are identified by VAGen as the first five letters of their class names, for example
VAGenRecords for a Record part type. Figure 124 shows a complete list of the VisualAge Generator part classes defined in the team environment.
GUI member types are represented as defined classes and are subclassed from the AbtAppBldrView class. They are often referred to as views or GUI clients. GUI clients are not involved in the extended class implementation used for VisualAge Generator parts.
210
4GL Member Types GUI Application Process Statement Group Record Map Map Group Data Item PSB Others
VAGen Part Classes Smalltalk class View VAGenPrograms VAGenProcesses VAGenStatementGroups VAGenRecords VAGenMaps VAGenMapGroups VAGenDataItems VAGenPSBs VAGenOptions VAGenLinkages (Stored as files in previous VAGenResources VAGenBindControls versions.) VAGenLinkEdits
Figure 124. VisualAge Generator Part Classes
The five additional VAGen part classes shown in Figure 124 that do not map to VisualAge Generator 4GL member types are used for control information that was stored outside the MSL as files in previous releases of VisualAge Generator. These additional classes support the definition of linkage tables, resource associations, generation options, and the bind and link-edit information. These are used as required during VisualAge Generator testing and generation. The set of VAGen part classes might best be viewed as templates for creating VisualAge Generator parts in the VisualAge for Smalltalk team environment. To use the VAGen part classes to create VisualAge Generator parts, you need to create a VAGen part class extension (for each specific class such as VAGenPrograms) in the application where you create and store VisualAge Generator parts. As you create VisualAge Generator parts, methods are added to the extended class in the current application (see Figure 125).
211
Defined class
Applications
SjgVAGenApp1
VAGenProcesses
INIT
Class extensions
SjgVAGenApp2
VAGenProcesses
GET-LIST CLOSE-SQL
GET-NEXT READ-N-SAVE
Methods
Figure 125. VisualAge Generator Extended Classes
Note: In many instances, when you, as the application manager, create the first VisualAge Generator part in an application, the VisualAge Generator code automatically creates the application prerequisite (for the HptVAGenPartsApp application that contains the defined VAGen part classes) and, for each different VAGen part type, the class extension (for the specific part type). This does not occur if you are not the application manager, because only the application manager can modify the application prerequisites. The role of the application manager is discussed in Chapter 15, Component Roles and Responsibilities on page 225.
212
but this is not the recommended method of editing VisualAge Generator parts. When editing the VisualAge Generator part methods, you use a specialized VisualAge Generator part editor (record editor, process editor, linkage table editor, and so on). The VisualAge Generator part classes appear in the second pane, called Parts , of the VisualAge Organizer window. VisualAge Generator parts, represented as methods on the VAGen extended classes, appear in the third pane, called VisualAge Generator Parts , of the VisualAge Organizer window. This third pane was added to the VisualAge Organizer as part of the installation and loading of the VisualAge Generator feature.
A subapplication is an application that belongs to or is contained by, a higher level application (or subapplication). An application is a group of classes and methods that are closely related in function (see Figure 126).
An Application groups classes that are functionally related, so that they can be reused as a unit A Subapplication is an application that is part of another application
Application
Sub application Sub application
Classes
Extended Classes
213
The role of applications and subapplications for programmers involved in development is explained in Chapter 15, Component Roles and Responsibilities on page 225.
Named group of applications Can reference other configuration maps Represents a product or one of its major parts During development used for making code baselines
Config Map
Config Map
Application
Config Map
Application
Application
Application
Subapplication Subapplication
Figure 127. Configuration Maps
Configuration maps are a way to gather, organize, version, and control sets of applications, or other configuration maps. These capabilities can be used to manage code baselines, group-related applications, or create full product versions. Configuration maps can also be used to assist in the loading of a common base of code into an image for further development. Instead of loading
214
numerous independent applications manually, you can load a configuration map that will include the correct set of application versions that represent a common base for a team of programmers. The role of configuration maps is discussed further in Chapter 15, Component Roles and Responsibilities on page 225.
215
216
Editions and versions allow programmers to check their work as they develop, and if required, back up and try again with a new future path for development decisions. This represents a major advantage over the way programmers used MSLs in previous releases of VisualAge Generator.
Open Edition
SjgVAGenApp1 (07/19/97 15:30:13PM)
Software component that you can change All changes are recorded in a library Represented by the date and time of its creation
217
You can create one or more editions of the same software component, with each edition implemented differently. Each edition has a time stamp from which you can identify it. You can create an edition in two ways: Automatically, by saving the work you have done on a component On demand, by requesting that the system create an edition This applies to classes in an open application edition and methods in a class. Programmers working with VisualAge Generator parts will notice that whenever they make a change to the part they are developing, a new edition is automatically created. The programmers can take advantage of the possibility to go back to any of the previous editions. This was not so easy using MSLs. Loading a previous VisualAge Generator part (method) edition is very simple: Use mouse button 2 to click on the selected component. Select the Load - Another edition menu option. Choose the edition you want to load from the window of available editions (see Figure 129). The edition that is currently loaded in the image is represented by an asterisk.
218
A version is made from an edition (Figure 130). After all changes to a component have been made and tested, or at some logical point as defined by the programmer or the programming team, the component can be versioned. When all classes in an application have been versioned, then the application can also be versioned. The version and edition functions provide the fundamental support for change management in the team environment. Using these capabilities frees programmers to work on alternative solutions to a problem. When an answer is selected, it can be versioned and locked at that state.
Version
SjgVAGenAppl1 R1.0
Software component that you cannot change Must create a new edition if you want to make changes Represented by its version identifier
Figure 130. Version Definition Illustrated
You create a version from an edition. To create a version of a component, you often must first create (and load) versions of the components contained in the component to be versioned. For example, to create a version of an application, you must first create versions of all classes and subapplications contained in the application. You cannot create versions of methods (VisualAge Generator parts are implemented as extended class methods). Methods are always editions. A class version contains the specific editions of the contained methods (VisualAge Generator parts) that are loaded when the class version is created. To modify a version, you must first create an edition, make the required changes to it, and then create a version of this updated edition. The old version will be still available in the library; the new version would be used for future work.
219
<<Scratch Edition>>
<<SjgVAGenApp1 (07/19/97 15:30:13PM)>>
Created if we want to make changes to a versioned component Exists only in a developer's image Represented by << >> signs around its edition identifier
I want to make some experiments with the code that is already in production...
You create a scratch edition when you want to modify classes contained in an application version, but you do not want to wait for the manager of the application to create a new edition.
Note: Only the manager of the application version can create a new edition of the application. This is discussed in Chapter 15, Component Roles and Responsibilities on page 225.
When you try to modify a class in an application version, the system asks you if you want to create a scratch edition of the application. After you create the scratch edition of the application, you can modify the contained classes and methods. For example, you might create a scratch edition to start some work early, or to support some experimental programming or learning exercise.
Note: To be able to create a scratch edition, you must have the appropriate privileges on the application. While only the application manager can create
220
a new edition of the application, privileges for creating a new edition within the application can be set to either world (any user), group (members of the application group), or owner (owner of the class). You can never (directly) release to others the classes that were modified in the scratch edition of the application. A scratch edition is solely a private edition. You can restore the application to a previous edition or version using the Load Another Edition option on the Applications menu of the VisualAge Organizer window. Once an open edition of the application is available, you can load the editions of the classes and methods you created using a scratch edition, and then version and release them to the application. This will salvage the work you performed using the scratch edition.
221
6. Create an edition of the component so that other members of the team can modify the component 2. Release the edition of the component (if required)
The release process is different for each component. For methods, it is not so much a release action as having the required edition of the method loaded. Only a version of a class can be released into an application or subapplication. An open edition or a version of a subapplication can be released into an application. When you release an open edition and then later version that edition, that set of code is still released. It is the same subapplication container, only the state has changed (from edition to version). An open edition or a version of an application can be released into a configuration map. The term as used in the configuration map dialogs is Add . When you release an open edition and then later version that edition, that set of code is still released. It is the same application container, only the state has changed (from edition to version).
222
Figure 133 shows how one component, such as a configuration map or an application, might evolve through the stages of change management.
Editions
Contents can be changed identified by time stamp
Versions
Contents cannot be changed Identified by version string
Release
Component
Edition Edition
Version Red1.0 Version Red1.1 Release
Edition
Version Red1.2
Edition
Version Red2.0
223
224
Application
Application Manager
Class Owner
Class
Method
Class Developers
The team environment library manages the issue of who can make changes by using component ownership techniques to identify who is and is not authorized. By component ownership, we mean that each software component is assigned to an individual who is responsible for its quality and
225
integrity. There are certain operations on the software component that can only be performed by the owner. Component ownership contributes to an overall environment that is very good for concurrent application development while maintaining adequate control over the development process. Configuration maps and applications always have a team environment library user assigned as the manager. These managers are responsible for the integrity of the components released into the configuration map or application container. This is still true even if they are not the ones who release the components. Each class in an application or subapplication, including the extended VisualAge Generator part classes, has an owner. These owners are also responsible for the integrity and quality of the code that is contained in the methods associated with that class.
226
Configuration Maps
Can reference other (required) configuration maps or applications Creator is configuration map manager Configuration map manager can:
Add applications Release applications to the map Add required maps Create versions and new editions Change the configuration map manger
Config Map
Application
Config Map
Config Map
Application
Application
Application
Subapplication Subapplication
Figure 135. Configuration Map Roles and Configuration Map Manager Responsibilities
You can use the team environment library configuration map privileges function to modify the rules for releasing application editions or versions to the configuration map. For example, this would allow you to allow application managers to release new editions of the application to the configuration map. See the VisualAge for Smalltalk documentation for details on setting configuration map privileges.
227
As shown in Figure 136, the application manager can: Add or delete users from the application group. Assign class ownership. Change the application manager. Change the prerequisites of the application. Create an edition of the application. Create a version of the application. Modify the privileges for the application.
Application
Can have subapplications Creator is application manager Application manager can
Define group (users) Change application manager to another group member Create versions and new editions Release subapplications to managed application
Classes
Application
Sub application
Sub application
An application group represents a group of team environment users assigned to work on an application edition. The application manager is automatically a member of the application group. Other users can become members of the group if the application manager adds them. To own a class in an application you must be a member of the application group. You can use the team environment library application privileges function to restrict access to the contents of the application. For example, this would allow you to decide that only group members have access to the code for the classes contained in the application edition. See the VisualAge for Smalltalk documentation for details on setting application privileges.
228
The class owner is a team member who is responsible for the quality and integrity of a class in an application edition. Only the class owner can do the following: Release the class version. Delete the class from an application. The class developer is a team member who develops and changes classes. The class developer need not be the class owner. Unless restricted by the privileges defined for the application, every user defined to the team environment can become a class developer; however, the class owner is responsible for the integrity of the class definition. Class developers can do the following: Load the edition into his or her image. Change methods or VisualAge Generator parts of the class (load, release, save, delete). Create a version of the class edition. Figure 137 shows the role and responsibilities of class owners and developers.
Classes/Extended Classes
Creator is the owner by default
Class owner can release class into application or delete class
Classes
Extended Classes
Figure 137. Class Owner and Class Developer Roles and Responsibility
The application manager can change the privileges for the application and change the authority to create new editions within the application from the default (world), to either group or owner. This would limit who can become a class developer. See Chapter 16, Developer on Smalltalk Development Process Definition on page 231, for more details on using privileges to manage the development process.
229
230
231
232
Without serial development, multiple updates to the same part, and therefore multiple version histories, can result when multiple programmers are working in the same application. Merging is the only way to resolve the changes that have been made to the same part across multiple versions. The high number of parts related to any one VisualAge Generator GUI client or program increases the difficulty of merging versions.
233
Confirm that your organizational approach will support your development process and techniques before you migrate a system to VisualAge Generator Do not begin to create the team environment application structure until the team roles and scope have been agreed on.
Note: After reading the rest of this chapter, you may wish to review the Developer on Java topic 7.4, Representing Stages of Development on page 135. Even though the discussion involves Java, the technique of using project sets could be applied to configuration maps.
Serial Development
Controlled access Single-threaded updates 1 Organized Clear delegated scope of authority
2 3
Concurrent Development
Multithreaded updates Flexible Organic Team Envi r onm ent Merging D ef aul t
Figure 138. Serial Versus Concurrent Development
234
16.2.1.1 Serial Development Traditional 3GL or 4GL projects more closely fit the serial model. A programmer is usually assigned complete programs to write and test. These will make use of shared code for common functions. It is unusual for the programmer to look at the internals of this shared code, let alone change it. Any required changes to code that has been made available to the project are made under strictly controlled conditions. 16.2.1.2 Concurrent Development In a pure object-oriented (OO) development project, work tends to be more concurrent than for a traditional third-or fourth-generation language (3GL or 4GL) programming team. This reflects two of the characteristics of an OO development:
Evolution Discovery These characteristics are a consequence of: Class hierarchy Inheritance At the start of a project, the classes and hierarchy defined for the system to be built represent the best guess of the lead designer. During the project, these change as understanding grows and the level of detail becomes finer. Change requires that the team be comfortable with using (inheriting) code already written, in order to extend its function. Sometimes, this can result in the same code (method) being changed by more than one programmer. As a result, changes need careful management, and class owners may have to reconcile different editions. The team environment repository was designed to support this kind of project style. Existing users of VisualAge Generator may have had some of the above experiences in GUI development. They will have seen how reusable parts have been discovered (or modified, perhaps radically) during the project. In performing these tasks, they may have found that the MSL structure was limiting because of the lack of support for versioning. In summary, concurrent development is about: Multithreaded updates Classes are logical containers that can be tested independently Flexibility
235
Intimate knowledge of environment Organic Flat development team structure Class ownership Based on logical owner of a piece of code One Class Owner with multiple Class Developers Multiple editions of the same class Class Developers write methods; Class Owners release classes. Merging Language parsers provide good support for merge process
16.2.1.3 Working with VisualAge Generator Members The 4GL member types have been implemented in VisualAge for Smalltalk as extensions to base classes that define the common behavior for each member type. These are known as VAGen Part classes. In a given VisualAge for Smalltalk Application, all required VisualAge Generator members are defined as extensions of their base class, such as: VAGenRecords, VAGenProcesses, VAGenPrograms, and so on.
SjgVAGenApp1
VAGenProcesses
INIT GET-NEXT READ-N-SAVE
SjgVAGenApp2
VAGenProcesses
GET-LIST CLOSE-SQL
236
This gives us classes (VAGen extended classes) that cannot be tested independently. It is the set of VAGen parts associated with a GUI client or program, implemented as methods on multiple VAGen extended classes, that require testing as a unit. In summary, the way VisualAge Generator was implemented in the VisualAge for Smalltalk team environment provides the following challenges: VAGen extended classes: Are used as part-type templates. Cannot be tested in isolation. VAGen programming teams: Are less familiar with new the team environment. Use a hierarchical team structure. Merging with ESF is done at a part level only: Development activity is based on a set of parts. Ownership of a extended class is meaningless. Prerequisites change as member types are added: Only the application manager can change prerequisites. Figure 140 depicts a scenario where multiple programmers are working on different editions of VAGen extended classes in the same application.
237
Programmer1 Image
Programmer2 Image
As shown in Figure 118, where more than one programmer works on VAGen parts in the same application, then it is possible to have: Different editions of the same VAGen part (for different changes) Or, more likely, different editions of a VAGen extended class part, as a result of changes to unrelated VAGen parts that are extensions of the same VAGen class part. Both of these situations require manual intervention to reconcile. So we appear to have a potentially confusing situation (see Figure 141).
238
Processes?
Records?
Maps?
Programs?
239
16.2.2.1 Traditional Source Management Scenario In a traditional source library environment, the likelihood of a collision on these parts is related to the ratio of programmers to source library members (see Figure 142), so the probability would be one chance in:
Lu cy
Joe
Bob
Jan e
Bi l l
16.2.2.2 One Application for Each Project In the team environment, the likelihood of a collision is related to the ratio of programmers to VAGen part classes.
If there were only one application for a project, then there would be only a single VAGen part class extension for all programs, records, and so on. In this case, there would be a collision for every VAGen part, because each type of part is dependent on one VAGen part class (see Figure 143).
240
Lu cy
Jo e Bob
Jan e
Bil l
Figure 143. VisualAge Generator Development with One Application for the Project
16.2.2.3 One Application for Each Programmer It becomes clear that the way to reduce collisions is to increase the number of VAGen Part classes. This can be done only by increasing the number of applications (including subapplications). So, how many is enough?
The answer does not lie in some rule-of-thumb ratio, but in a consideration of the scope of development work. What scope would reduce chances of a collision to acceptable to negligible? If each Application were developed by a single programmer (see Figure 144), then he or she could not collide with himself or herself.
241
Lu
cy
Joe Bob
Jan
Bil
Figure 144. VisualAge Generator Development with One Application per Programmer
If projects could be planned perfectly, then the above solution would be fine. However, plans are made to be changed. As soon as an item of work had to be reassigned, extensive changes would have to be made in the team environment.
16.2.2.4 The Application-to-Programmer-Relationship Answer Given the issues and behaviors for the scenarios just reviewed, the answer seems to be in minimizing the chance of a collision. Therefore, a sensible approach would appear to be to make each program belong to a single application; where a program is defined as an independently testable unit of work. This way, when a program is reassigned, the only change in the team environment is to the users defined in the group for the application.
The main points of managed access with the team environment can be summarized as follows: The programmer is to own his or her logical piece of work: Relationship is one programmer to one application. Avoids merging process for most activities.
242
Public (world) gets read access to everything. Restrict write access (creation of new editions) to application group members or Class Owner. Programmer uses set operations at application level. Uses Version/Release owned menu option. Easy to do, keeps logical relationship in version. Application owner could be programmer. Prerequisites are built automatically. Needs ownership change at project end.
Configuration Map Manager manages containers but not content. Manager is the only person who can version Privileges determine who can release into the Configuration Map
Configuration Map
Application
Class
Class
Application
Class
Class
C lass
Class
Application
Class
Class
1.Edition
Class
2.Version
Figure 145. Configuration Map Management
243
Consider the process of creating and working with the applications in the configuration map: Configuration map manager manages containers but not content. Manager is the only person who can version. Privileges determine who can release into the configuration map. These activities apply to the configuration map manager, who may or may not be one of the individual team leaders.
16.2.3.2 Application Management Applications can be versioned, must have assigned managers, and can have groups defined. Application management is reviewed in Figure 146.
Creation of class and method editions controlled by the application privileges Ownership is determined by who created the object What about maintenance? What if the code is to be maintained by a different developer?
Figure 146. Application Management
In the team environment development and maintenance life-cycle, The ability to create class and method editions are controlled by the application privileges. Ownership is determined by who created the object. Applications would normally be created by a team leader, not the programmer, but when a programmer is assigned to build this code, the programmers user ID can be added to the group responsible for this application. This implies that there will be only two users in a group; the team leader (owner) and the assigned programmer.
244
If the code is to be maintained by a different programmer, then a second programmer is added to the group. Ownership is assigned to the new programmer, and the original programmer is dropped from the group.
16.2.3.3 Code Management Now consider how this approach affects the programmer of the actual code. Code management (management of the classes where the code is stored) is reviewed in Figure 118.
Classes
Extended Classes
For 4GL code, the programmer is modifying the VAGen part classes within an application. These allow the programmer to create, modify, and test the 4GL parts. For GUI development, the class is the visible or nonvisible VisualAge Smalltalk Enterprise part. Any 4GL parts dropped on the free-form surface will create VAGen part classes in the application to which the GUI belongs (unless another application is selected during part creation). The key question is: Should the GUI parts be in the same application as the server code? The answer depends on whether a single programmer will create both the GUI and the server code, and test them as a single entity. If yes, then the two parts form a complete unit of work, so we could put them in a single application. If GUI and server coding is split between different programmers, then the GUI and server coding tasks represent different units of work and should be placed in different applications.
245
Note: If client and server code is split between applications, then care must be taken with the ownership of the VAGen records passed as parameters. The project team (or leader) must decide if these are to be owned by the GUI application, the server application, or a dedicated parameters application (perhaps modifiable by the team leader only, to ensure control over changes).
An alternative organizational technique might use subapplications within an application for the client, server, and parameter parts.
16.2.3.4 Programmers Requirements What do programmers want from a library management process? They want the process to work for them, protect them from other programmers, and make life generally easy. The following list covers some typical requirements:
To have full write access to their own code To have read access to common code, but no write access, so the base is not modified or altered unless intended To have system component visibility, but the programmer need only learn what is required to for the task. Ease of backtracking, because previous editions and versions are available Skeletons and templates that provide the ability to copy and rename anybodys work Open access to source, which provides a supportive test and debug environment Ease of loading, because there are no parameters and no complex application relationships Minimal housekeeping (and someone else should do it)
16.2.3.5 Project Leaders Requirements What do project leaders want from a library management process? In essence, they want to be able to check on progress and quality, and get assistance with assessing the impact of proposed changes. A typical list of requirements would be:
Ease of management enabled by processing code in logical sets Assignment of tasks and scope of work (who does what with what?) Methods to easily check completion and determine project status Integration, ensuring that the system works with other systems Ability to manage the build process, plan the code packaging, and plan distribution
246
Application Management
3.Release 3.Release 2.Load editions
Class
Class
Configuration Map
Application
Class
Class
Application
Clas s
Cl ass
Cla ss
Class
Application
Class
Cl ass
Application
Class
Class
Class
1.Edition
1.Edition 1.Edition
Methods (VA Gen Parts)
2.Version
2.Version
2.Version
16.3.1.1 Management of Application Editions The project leader who owns the applications (application manager) creates a new edition of each application (logical set of source) to be assigned to a programmer. If the project leader has the privilege (as defined for the configuration map) to release the new edition of the application into the
247
configuration map, then this is done. Otherwise, the owner of the configuration map must release the new edition of the application. The applications to be worked with are now available to the team. Team members should use the configuration map to load the set of applications required to support development activity.
16.3.1.2 Defining the Group for the Application The group for any one application or subapplication should consist of just two people:
Project Leader Programmer This will support the use of application privileges that restrict the creation of new editions to members of the group.
16.3.1.3 Management of Privileges The application manager should ensure that the privileges for the application are set such that only members of the group have the right to create new editions. The right to create editions is related to the classes in the application. If subapplications are used, the same privileges should be defined. 16.3.1.4 Managing Changes in Ownership Before an application is assigned to a programmer for development, the project leader is the application manager. When the new edition is created, ownership of the classes contained in the application should be given to the programmer.
The application manager (project leader) can either reassign class ownership to the programmer added to the group or change the application privileges so that members of the application group can change class ownership. This would allow the programmer to take ownership of the classes to be modified. By default, the programmer is the owner of any new classes created. The project leader is still the application manager. Class ownership allows the programmer to control both versioning and release processing for the classes. The cycle is based on these activities: Create new classes or modify existing classes. Use the version/release owned processing option to version the classes and release them into the application.
248
When unit testing has been completed, the programmer versions the application, and then returns ownership to the project leader. For GUI clients, Smalltalk runtime code for VisualAge Generator parts used in the GUI clients should be generated before versioning the classes. Generation of non-GUI parts (such as VisualAge Generator programs) can be done using versioned classes, applications, or configuration maps.
This would essentially delegate the process of keeping an edition of a configuration map up to date to the respective application managers.
16.3.2.2 Creation and Loading Strategies There are two ways to work with configuration maps:
Programmers reload the configuration map periodically. The system loads all released applications, subapplications, and classes into the image. This means that programmers must reload their own open editions (editions not yet released). Each programmer can also selectively load versioned applications or classes created by other team members. A new configuration map is built based on a fixed cycle (for example, once each week). With this policy, every programmer must version and release his/her classes, applications, and subapplications each week. The application manager then makes a version and a new edition of each application. The configuration map manager (or the application manager, depending on the
249
privileges) can then release the new editions of the applications into the configuration map. The new configuration map can either be loaded directly or be used to create a saved image, which is then copied by the team to begin the development process for the next cycle. The time required for the load process depends on the amount of code to be loaded. You could synchronize the load with a weekly team meeting if required.
Note: The VisualAge Organizer preferences are stored in the image, so individual programmer preferences are lost. Alternatively, the team can unload the current configuration map and then load the new one, although this may become too time-consuming in a large project.
The second option offers a much more controlled environment, which is significant when batch generation is in use.
16.3.2.3 Using Alternative (Private) Configuration Maps During the development cycle you will often create a new application or application edition. You might not be ready to share the code contained in the application edition with the rest of the development team, so you decide not add or release this application edition to the appropriate system or subsystem configuration map. You can still use the existing configuration map structure to support both the process of loading code into your image and batch generation by using a private alternative configuration map.
Consider this situation: A configuration map named SubsysACfmap exists. This configuration map contains all the applications that are needed for Subsystem A. Modifications have been made to an application named App1App that is included in configuration map SubsysACfmap, but the active application edition of App1App has not been added or released to SubsysACfmap. To support batch or LAN-based generation the contents of the current edition/version of SubsysACfmap must be loaded along with the active application edition of App1App. Alternative generation options may also be required.
250
How can a private alternative configuration map be used to help? Define a private configuration map, for example, a configuration map named JeriCfmap. Include in this configuration map an application that contains some private generation options (such as ftp user id, password, /PROJECTID, and so on) Define the configuration map SubsysACfmap as a required map to JeriCfmap. With this technique, you can include the current application edition of App1App as in the configuration map JeriCfmap instead of creating an edition of SubsysACfmap that includes the current application edition of App1App. This supports the use of batch or LAN-based generation without requiring that the SubsysACfmap configuration map be modified. The generation request can specify the JeriCfmap configuration map because the required map SubsysACfmap will be loaded first, and the current application edition of App1App will overlay what ever version/edition of App1App was included in the SubsysACfmap configuration map. This means that the generation request will use the baseline code contained in the SubsysACfmap configuration map, plus the code contained in the current, but private, application edition of App1App. With this technique, you can avoid opening editions of SubsysACfmap and releasing App1App until you are ready to share your work with other members of the development team that might be loading the SubsysACfmap configuration map. You can independently manage the configuration map JeriCfmap to add or delete applications as required. You may also have to adjust which edition or version of the required map SubsysACfmap is referenced so that you pick up new baselines as they became available. This technique also allows the build administrator to be in charge of SubsysACfmap (the master configuration map) and only include new code at predetermined times (such as for a build cycle).
Note: The Developer on Java technique of using project sets, as discussed in 7.4, Representing Stages of Development on page 135, could be applied to configuration map management.
251
16.3.2.4 Batch Generation Considerations Batch generation requests specify a configuration map name. To ensure that the configuration map contains the code that should be generated, the classes containing the source code should be versioned and released into an application edition that has been released into the configuration map.
The version name can be incremented automatically with default naming: 1.1 becomes 1.2, or if 1.2 exists, 1.1.0 A.b becomes A.c
252
Note: Although a subapplication can belong to more than one application in the library, it can belong to only one application in an image. Therefore, if data items are defined outside of any single development project, only those belonging to tables used by the project need to be defined as subapplications of a projects data definition application. This will avoid inflating the size of the image with unwanted contents. 16.4.1.1 Populating Data Items One technique for populating the library with new data items is this:
Set the current user to the DBA user ID. Load or create the SQL Data application. Select this application, and if used, the appropriate subapplication. Create an SQL record for each table, and use the retrieve facility to get all columns from the DB2 catalog. Version and release each SQL data application.
16.4.2 Records
Different approaches for record definition management may be required.
16.4.2.1 SQL Records (Serial, Indexed, DL/I) A very disciplined organization could manage the use (and reuse) of globally defined VisualAge Generator SQL records for relational table definitions to be used by all development projects. This holds true for the other record types and data storage techniques. If this is the case or intention, then these can be managed like data items. The team environment makes such management easier to achieve.
The situation where SQL and other file type records are common to one development project only is more likely. When code generators are used, project SQL and file records are generated. To handle this, one approach is: Create an application for SQL records. The manager of the application should be a team member with a project DBA role. Create one subapplication for each table or view. This subapplication would have only one VAGen Part class called VAGenRecords. Records generated by a code generator may have to be imported separately by the person having the appropriate authority.
253
Any subsequent imports of generated code should filter out all SQL records. Any SQL record changes required from the generated code, should be manually controlled. In summary, all database related information should be: Made available to programmers in read-only form. Grouped to be of manageable size.
16.4.2.2 Working Storage Records Working storage records are used for:
Holding database data for program manipulation. Holding control, status, and temporary data. Working storage records cannot be fully defined at the beginning of a project. They change during the project as the understanding of the requirements increases. Place each working storage record in the application in which it is used.
16.4.2.3 Records Used as Parameters on CALL Statements By definition, these records will be used in at least two programs: the calling and the called one. These programs may be developed (and hence owned) by different programmers. So who should own the definition of these records?
One solution would be to always have one or more SharedRecordApps in the library, with only one owner defined in the group.
16.4.3 Programs
Programs must be organized to support effective development, with access to shared definitions and support for reuse.
Note: Programs include the components such as processes, maps, and VisualAge Generator tables unique to that program. These are the associates of the program.
The initial project plan could allocate one program to one programmer, and hence one application. The project leader may want to put programs that are closely related into the same application. This will work in our approach, as long as all programs are being developed by the same programmer. Do not overload the scope of the application, because it should correspond to a single task in the project plan.
254
Programs can be related in several ways: An umbrella server program and atomic server program for the primary table. List and detail server programs for a table. Umbrella and atomic server programs for all referenced tables.
Note: The terms umbrella and atomic refer to layers in a multitier client/server design. Umbrella servers call other servers. Atomic servers typically include database access and are reusable.
255
We illustrate this with an imaginary GUI client/server system that uses the following layered architecture: View Subview Business Object Resource Object
These are supplemented by functions for: Navigation Services Error handling Message handling Authorization This could provide the following initial breakdown in the team environment: SQLDataApp (all versioned) Table1Data Table2Data ... CommonConfigCm ControlAndStatusApp MessageHandlingApp ErrorLoggingAndReportingApp AuthorizationApp GUICommonPartsApp
256
Part 5. Appendices
Note: Several additional chapters from VisualAge for Java Enterprise Version 2 Team Support, SG24-5245, are included in this redbook as these appendices:
Appendix A, Workspace Management on page 259 Appendix B, The Team Development Process on page 269 Appendix C, Program Element State Transitions on page 283 The following additional appendix was written to describe the code and other materials developed during the residency project that produced this redbook: Appendix D, Sample Code and Other Materials on page 303
257
258
259
Remember that this pageas with the other pages of the Workbenchallows developers to work with items that are currently loaded in their workspace. The Repository Explorer is used to view other editions of program elements that are not currently loaded in the workspace. Together with the management query facility described in Management query on page 262, the Managing page serves as a source of all team-related information.
260
261
The management query is invoked through the Workspace menu option of any browser. It is organized as a dialog with two areas: Query definition Result
262
The management query facility allows queries to be defined with respect to these attributes: Status Program element Scope Owners Developers
Queries can be built based on types, packages, and projects, and for each of these program elements, you can search for elements that are in a particular state; for example, all packages that are open editions. Each of these queries can be further refined by specifying ownership criteria, and in the case of types, by specifying class or interface developer criteria. Along with the customized query option, there are also 14 predefined queries which define the settings required to answer common questions (see Figure 151).
263
264
This path should identify a shared file location. You must manually create a directory under this path for each project whose resources are to be shared. Even if this option is set, VisualAge for Java still automatically creates the default resource directory. This shared resource location is used by VisualAge for Java when exporting a project in JAR format. In fact, it includes all resource files from both the shared and the default resource directories. The shared resource directory is not used to establish the code base when running an applet from within VisualAge for Java. Resource files must be managed carefully to avoid problems when VisualAge for Java needs to locate them.
265
Issues that must be considered include: If many developers are working on a single project and each developer manages resources independently, problems will occur when you attempt to consolidate the work of separate developers. For example, system testers will be unable to locate resources when testing a a package that has many class owners. More fundamentally, a class owner may be unable to test a class if it uses another class that has associated resource files and is owned by another developer. When carrying out certain kinds of export operations, all resource files for a project must be accessible to VisualAge for Java or they will not be included in the export. By default, resource files are located by the project in which a package exists. If you move the package to another project, VisualAge for Java will not be able to locate the resource files. In addition to the requirement that VisualAge for Java be able to locate resource files, it is also important that your applets and applications can find their resource files in a consistent way.
In this scenario, you want to manage your resources using a shared resources directory. Create a directory on a shared file system to act as the shared resource path. Set the VisualAge for Java option to use shared resources as detailed above. In the shared resource directory, create a subdirectory for each project that contains resource files to be managed. It is the project owners responsibility to maintain the project resource directories. This is normally done in conjunction with the owner of the
266
class that uses the resources. It is also the class owners responsibility to copy the required resources into the local project resource directory as created by VisualAge for Java. Some operating systems (UNIX, for example) allow you to create a soft link between the master copy and your local copy. This is the preferred mechanism, but a hard copy is acceptable. All developers and testers are responsible for copying the required resource files into their personal project resource directory. When it is time to deliver a project through an export operation, the required resource files are already in place.
A.6.2 Managing Resources by Package
In this scenario, you want to manage your resources by package as it likely that your packages will be moved among projects for organizational reasons. Establish a directory on a shared file system to store the master copy of all resource files. In the directory create a subdirectory for each package that contains resource files to be managed. Use the full name of the package as your directory name to keep the hierarchy shallow and facilitate retrieval. If you have a large number of packages, you can group them in arbitrary subdirectories. By organizing your resource files by package instead of by project, you avoid problems associated with moving packages among projects. It is the package owners responsibility to maintain the package resource directories. This is normally done in conjunction with the owner of the class that uses the resources. It is also the class owners responsibility to copy the required resources into the project resource directory as created by VisualAge for Java. All developers and testers are responsible for copying the required resource files into their personal project resource directory. It is the responsibility of the project owner to copy all resource files of all packages in the project into the project resource directory before exporting the project as a JAR file. In both scenarios class developers should access resource files in their code relative to a common root directory. For applets, this should be the applet code base. This organization fits in with the code base established by VisualAge for Java for testing applets. For applications, there is much greater freedom, and you will probably pass a parameter to your program indicating where resource files are kept.
267
268
Figure 153 shows the most fundamental development pattern in VisualAge for Java. As a class developer, you move through a cycle of creating a new edition, making changes to it, and versioning it.
269
You can enter this cycle at different points depending on the overall context in which you are working. You leave this cycle having created a new version of the class. This basic pattern forms the core of all the work you do in VisualAge for Java and is repeated in all of the scenarios we explore. The frequency with which you version your class depends on personal style and the overall team environment. A rule of thumb is to version the class or interface whenever you reach a known state to which you may want to return. Versioning classes at least on a daily basis would be typical practice. This pattern naturally supports an incremental development style that is usual in object-oriented programming. When you reach a point in the cycle where you want to preserve your code, version it and then move on to the next phase with the confidence that if anything goes wrong you can always return to a known state. If you are working as part of a team, there may be a requirement to version your classes at defined intervals, so that your classes can be seen by other developers or be released by the class owner for the creation of a package baseline.
B.1.2 Single Package, Single Developer
This scenario, a small application consisting of a single package where only one person is responsible for all the work, is the simplest way of working with VisualAge for Java Enterprise. The application may use classes from other packages but does not have to change them. Figure 154 shows the overall process. Although this is a simple scenario, it is probably representative of the many small applications that will be developed in VisualAge for Java.
270
Create Class-1
Create Package
Make Changes
Release All
Create Class-n
Version Package
Release Package
In this scenario you are a single user playing the role of package owner, class owner, and class developer. The project owner creates a package in the appropriate project and assigns ownership of the package to you. You create all the classes and interfaces required for the application. For each class you cycle through the standard development pattern by creating successive versions as you develop and debug the application. Work continues in parallel on each class until you are completely satisfied that your application works correctly. Now you release all classes and interfaces into the package edition and create a version of the package. Finally, either you or the project owner releases the package.
B.1.3 Single Package, Multiple Developers
In this scenario multiple developers work on an application that is being developed as a single package. The scenario introduces the issues that arise when developers must cooperate with each other to do their work. Typically, in this situation, the lead developer acts as the package owner. The project owner creates the package and assigns ownership to the lead developer. After the initial analysis of the problem domain has been completed and a first pass design has been carried out, the set of classes and interfaces that make up the application are known. The lead developer allocates
271
responsibility to each developer for a number of classes. The lead developer adds the users to the package group so that they will have the authority to create classes and interfaces within the package. Figure 155 shows the normal working pattern in this scenario.
Developer 1
Create Class-x
Release Class-x
Developer 2
Create New Edition
Create Class-y
Make Changes
Release Class-y
When a developer creates a class or interface, he or she becomes the owner of that type. This is one of the key principles of the team environment. The ownership model reinforces the notion of responsibility. Other developers can make changes to a class they do not own, but, as we see later in this scenario, the owner must eventually accept or reject those changes and make them available to the rest of the team. Each developer, who is also a class owner, works independently on the classes for which they have responsibility. The project manager has established a project plan that lays out various milestones in the application development process. These milestones generally represent the achievement of a certain level of functionality within the application and present an opportunity for all developers to synchronize with each other and have a common view of the current state of the overall application. This is normally called establishing a baseline. A baseline allows inconsistencies and discrepancies (which could be related to analysis, design, or development) to be caught early in the development process before they
272
have become too entrenched. Baselines also allow regular deadlines to be set, which is good for programmer productivity! When approaching a deadline, the lead developer expects programmers to have all their classes in a working state and instructs them to release the classes. The lead developer establishes a new package baseline by creating a new version of the package. Each developer then reloads the new package version to access the latest version of all classes in the package. This process is shown in Figure 156. The class owners resume the normal development pattern until the next project milestone and the production of a new baseline. Unfortunately, things do not always proceed smoothly. Invariably a developer working on a class finds that some new function is needed in another class or discovers a bug in another class that adversely affects his or her own progress. In these situations the developer does not have to immediately bother the owner of the other class in order to move forward. The developer simply creates a new edition of the class in question and makes any required changes in that edition. By creating a new edition of the class, the developer becomes the class developer of that private edition. When the developer is satisfied with the changes, he or she creates a new version of that class and gives it a meaningful name indicating the source of the changes. The developer consults with the owner to discuss the changes and the reasons for them. It is now up to the class owner to decide whether those changes are valid and fit in with the overall purpose of the class. In a fast-moving development project, it is quite likely that the class in question has been further developed by the owner in the meantime. In this situation the owner must reconcile the changes and merge them into a new version (see Figure 157 on page 275). Once the changes have been reconciled, the owner resumes a normal development pattern.
273
Class Owners
Release Class-x Release Class-y Release Class-z
Package Owner
Version Package
(New Baseline)
Class Owners
Reload Package Reload Package Reload Package
274
Class Owner
Create Class
Class Developer
Make Changes
Create New Edition Version the Class Make Changes
Reconcile Changes
Change reconciliation is made easy through the use of the comparison browser in VisualAge for Java. The owner views class and method definitions side-by-side with the differences highlighted. The owner selectively loads one or the other of the versions into a new edition. Where changes to a single method clash, the owner must manually edit the method to reconcile the changes. Merging changes like this should take place on a regular basis. It is much less error prone to have frequent small reconciliations than it is to wait for a long time and try to reconcile a larger set of changes in one operation.
Tip
Do you have to wait for a baseline to see changes? Developers need not wait until a new baseline is established to see changes made to other classes. Informal interaction among team members is a normal daily occurrence. A class owner can announce to the colleagues that a new version of a class, which is fit for general use, is available. Other developers may explicitly load that version into their workspace. Creating a package baseline simply formalizes this process.
275
We now move on to a more complex scenario, which is typical of a large-scale project. In this scenario we have simultaneous development of multiple packages. The scope of the project is such that we have many distinct subsystems, which are naturally partitioned into separate packages. The project team is divided into smaller teams, each of which has responsibility for a particular package. The project owner is likely to be the chief architect and creates the packages and assigns ownership of each package to the corresponding team leader. Each team leader adds the team members to the package group. All the patterns of development we have seen so far are also present in this scenario: the basic development pattern for classes; the establishment of package baselines; and the reconciliation of changes. Change reconciliation may also be necessary across package boundaries. There are always interpackage dependencies, and a developer of one package may have to change a class of another package. This is not a problem. Membership of a package group is not required in order to create a new edition of a class in that package and become the edition developer. The process of managing the reconciliation is exactly the same. In this large-scale project scenario we now must consider managing project baselines. We define and discuss two useful and typical kinds of project baselines: standard and rolling.
B.1.4.1 Standard Project Baseline A standard project baseline is directly analogous to a package baseline. With a standard project baseline you first create baselines of all the packages in the project. You then release all the package versions to the project. This step can be carried out by either the individual package owners or, more probably, by the project owner. Once all the packages have been released, the project owner creates a new baseline by versioning the project. This version represents an immutable state of the project, its packages, and all their classes. It is likely that this step will be carried out only at major project milestones and, of course, at the end of the project. Figure 158 shows the complete process.
If work is to continue after the creation of the baseline, a new project edition is created, and development continues.
276
Package Owners
Version Package1 Version Package2 Version Package3
Release Package2
Release Package3
Project Owner
Version Project
(New Baseline)
Package Owners
Create Pkg1 Edition Create Pkg2 Edition Create Pkg3 Edition
Class Owners
Reload Project Reload Project Reload Project
277
B.1.4.2 Rolling Project Baseline The standard project baseline can be quite a burdensome process. The more packages you have in the project, the more difficult it is to ensure that you can produce a baseline for all packages at the same time.
Fortunately, VisualAge for Java provides a much more convenient way for programmers to have access to an edition of the project that provides a snapshot of the current state of the application. Figure 159 shows the rolling project baseline process.
Package Owners
Version Package1 Version Package1 Version Package3
Release Package2
Release Package3
(Rolling Baseline)
Class Owners
Reload Project Reload Project Reload Project
278
The key to the rolling project baseline process is that packages do not have to be versioned before they are released to the project edition. (In Figure 159 the broken boxes indicate optional steps.) The ramifications of this are quite profound. By releasing an open package edition to the project, you are ensuring that when a class is released into that package it automatically becomes available to any developer who reloads the current edition of the project into the workspace. Hence the use of the term rollingthe project baseline is constantly changing as new classes and interfaces are released.
Tip
Use caution with rolling project baselines! As with any powerful feature, caution should be exercised when using rolling project baselines. The release of a buggy class could cause inconvenience for any programmer who loads it. Releasing a class into a released package has the effect of bypassing any integration testing that would typically occur at the package level. The ability to freely combine the release of versioned packages and open edition packages into your project enables you to exercise a degree of fine tuning over the process. For example, open edition releases could be restricted to packages where the class owners are senior programmers and can be trusted to fully test their classes before release.
This scenario shows the power of VisualAge for Java Enterprise in handling complex development situations. Suppose you are part of a software house developing an application for a customer. The application is being developed as a single package. At a certain stage in the development process, your salesperson manages to sell the system to another customer. Naturally the system has to be tailored to the new customers needs. You continue system development until all of the code that is common to both customers has been written and tested. You are now ready to enter split stream development mode. Using the tested and stable version of the package as a base, you create two new editions of the package: one for each customer. Each edition of the package can have a separate owner and package group associated with it (see Figure 160).
279
Single Stream
Release Class-x Release Class-y Release Class-z
Version Package
(New Baseline)
Stream A
Create New PKG Edition
Stream B
Create New PKG Edition
Work on Class-x
Work on Class-y
Work on Class-y
Work on Class-z
Development proceeds as if there were two distinct packages. The same class or interface can be modified independently in each package edition. The ownership of common classes can be modified to reflect the changed responsibilities. In essence, the owner of the class or interface edition is associated with the package edition that holds that edition.
280
With split stream development, there is no intention to rejoin the streams. The advantage is having a common code base from which both streams developed. If this code base has to change (as it invariably will), a new edition of the package version at the root of the split stream should be created. Each of the split streams can then be brought up-to-date by simply reloading the changed program element in question and performing any reconciliations that might be required.
281
282
283
7
Scratch Edition
Open Edition
1 9 3 2
Repository Only
Not
Existing
6 8
Version
10 9 3
These transitions are listed below and described in the subsequent sections: 1. Not Existing -> Open Edition 2. Not Existing -> Repository Only 3. Repository Only -> Version/Open Edition 4. Version -> Open Edition 5. Open Edition -> Version 6. Version -> Scratch Edition 7. Scratch Edition -> Open Edition 8. Scratch Edition -> Not Existing 9. Version/Open Edition -> Repository Only 10.Repository Only -> Not Existing
C.1.1 Not Existing -> Open Edition (1) Situation This is how brand new projects are created. Prerequisites Any registered team user can create a new project. The user becomes the owner of the project.
284
Mechanism From the Project view of the Workbench, bring up a SmartGuide by selecting Selected > Add > Project... The same SmartGuide can be invoked by selecting Projects > Add > Project... from the Managing view of the Workbench.
Select the Create a new project named: radio button and type the name of your new project. If a project of the same name already exists in your workspace, you are prompted with a message at the bottom of the SmartGuide and you will not be able to click the Finish button. Otherwise, click on the Finish button, and the new project is created in your workspace and in the repository. If the project already exists in the repository, you will be asked if you want to create a new edition of that project. You cannot have more than one project with the same name in the repository.
C.1.2 Not Existing -> Repository Only (2) Situation A project is created in the repository as a result of an import operation. Prerequisites Any registered user can import a project into the repository. The administrator becomes the owner of such projects.
Complete projects can be imported from another repository by selecting the Repository radio button. The SmartGuide asks you to provide the IP address and file name of the other repository. When you have selected a valid repository, you are presented with a list of projects (and packages) in the other repository, and you can select the projects and versions you want to import.
C.1.3 Repository Only -> Version/Open Edition (3) Situation You must bring a project into the workspace before you can work on any of its packages. Project versions and open editions are handled in the same way.
285
Prerequisites Any registered user can load a project into the workspace. The load will not be successful if the project to be loaded contains a package that already exists in the workspace as part of another project. It is a rule in VisualAge for Java Enterprise that the same package can exist in multiple projects in the repository, but not in the workspace. The entire load is an atomic operation, and the operation will either succeed completely or not load any portion of the project. Mechanism Invoke the Add Project SmartGuide by selecting Projects > Add > Project... from the Managing view of the Workbench or Selected > Add > Project... from the Project view.
Check Add projects from the repository and select the projects and the editions you want to load. Click on the Finish button, and the selected project editions are loaded into your workspace. Alternatively: Go to the Repository Explorer and highlight the project and edition you want to load. Select Editions > Add to Workspace (or use the pop-up menu in the Editions pane), and the selected project edition is loaded into your workspace. A project that already exists in the workspace can be replaced by another version/open edition from the repository. Select Projects > Replace With > Another Edition..., and you are asked to select from the list of editions in the repository. You can quickly revert to the previous edition by selecting Projects > Replace With > Previous Edition or, if you are currently working with an open edition and it has changed in the repository, you can bring your workspace up-to-date by selecting Projects > Replace With > Current Edition .
C.1.4 Version -> Open Edition (4) Situation You should create a new edition of a project when you want to make a change to the project. Remember that a project version is immutableif you want to change it in any way such as creating new package editions or even changing the comment associated with the project, you must first create a new edition.
Changing the owner of a project, however, does not force you to create a new edition.
286
Prerequisites Only the project owner is allowed to create a new edition of the project. Mechanism Select Projects > Manage > Create Open Edition (or Selected > Manage > Create Open Edition) to create a new project edition. The edition is named by appending the current data and time in parentheses to the project name.
If you attempt to add a new package to a project version, the VisualAge for Java SmartGuide asks you if you want it to create a new edition of the project. (There is actually a way for anyone to create a new edition of a project. First delete the project from your workspace. Then go into the Add Project SmartGuide and create a new project of the same name. The SmartGuide tells you that a version already exists in the repository and asks you if you want to create a new edition. If you answer yes, a new edition of the project is created with you as the owner.)
C.1.5 Open Edition -> Version (5) Situation You create a new project version from an open edition when you want to establish a baseline for your entire project. Once versioned, the project is immutable. Prerequisites Only the owner of a project can create a new version of the project.
All packages in the project must be versioned and must be released (released versions in our terminology).
Mechanism Select Projects > Manage > Version from the Managing view of the Workbench. C.1.6 Version -> Scratch Edition (6) Situation A scratch edition of the project is automatically created whenever an open edition of an existing package is created in a project version. Prerequisites None. A scratch edition is created for any user. Note that only package owners are allowed to create an open edition of a package.
287
Mechanism None. Creating a scratch edition of the project happens automatically. C.1.7 Scratch Edition -> Open Edition (7) Situation Because VisualAge for Java can automatically create scratch editions of a project, it may be necessary to convert your scratch edition to an open edition. You do this conversion if you want to eventually release package elements into the project and thus make them available to other users. Prerequisites Only the project owner can convert a scratch edition to an open edition. Mechanism Select Projects > Manage > Create Open Edition from the Managing view of the Workbench. C.1.8 Scratch Edition -> Not Existing (8) Situation If you do not want to retain the changes you made to the project that caused the scratch edition to be made, you can completely remove the scratch edition.
You can remove the scratch edition in two ways. As project owner you can delete the project and thus remove the project from the workspace. Alternatively you can replace the scratch edition with another edition from the repository and thus remove the scratch edition from the workspace. Because the scratch edition existed only in the workplace, it is completely deleted. Note that nothing ever really disappears from VisualAge for Java! If you created new package editions in your project scratch edition, they will still be in the repository after the project scratch edition is deleted. However, you have to search for the new package editions in the packages list because they do not belong to any project.
Prerequisites Only the project owner can explicitly delete a project scratch edition.
Anyone can replace a scratch edition with another edition from the repository.
Mechanism To delete a project, select Projects > Delete... from the Managing view of the Workbench, and the project is completely removed from the
288
workspace. However, all previous project versions and open editions still exist in the repository and can be reloaded at any time. Because the scratch edition existed only in the workspace, it disappears completely. To replace the scratch edition with another edition, select Projects > Replace With from the Managing view of the Workbench. You have a choice of three submenus: Current Edition: Load the edition that has the same name as the edition in your workspace. If the current edition is not a version, its contents may have changed since you last loaded it. Previous Edition: Load the version of the project that was created chronologically before the edition currently in your workspace. Another Edition...: This option presents you with a list of all project editions in the repository. You are invited to select the edition to load.
C.1.9 Version/Open Edition -> Repository Only (9) Situation VisualAge for Java provides menu options for deleting program elementshowever, you only delete in the context of your personal workspace. The elements themselves remain in the repository. You use this option simply to clear up your workspace. Having a smaller workspace reduces your startup and shutdown times. So if you are no longer working on a particular project, you should remove it from your workspace.
You may also have to remove a project from your workspace if it contains a package that is also contained in another project that you want to load. Only one copy of a package can be in your workspace at a time.
Prerequisites None. Any user can delete a project version or open edition from the workspace. Mechanism Select Projects > Delete from the Managing view of the Workbench. C.1.10 Repository Only -> Not Existing (10) Situation Eventually you want to remove old projects from your repository. Otherwise the repository continues to grow. Prerequisites Only the project owner or the administrator can purge projects or project editions. A project edition cannot be purged if it is loaded in your
289
workspace. (Check that there are no asterisks beside any of the project editions in the Repository Explorer.) Only the administrator can compact the repository.
Mechanism Completely removing projects is a two-stage process:
First you must purge the project and/or project editions. To purge the entire project, in the Repository Explorer highlight the project and select Names > Purge. To purge one or more editions, highlight the required editions and select Editions > Purge. If all editions of a project are purged, the project is also purged. The second stage involves compacting the repository.
5 4 10 6
Scratch Edition Open Edition
12 13 12
14 8
Repository Only
Not Existing
11 9
12 13
Version
2 12 7
Released Version
Not Existing
These transitions are listed below and described in the subsequent sections: 1. Not Existing -> Released Open Edition 2. Not Existing -> Repository Only 3. Released Open Edition -> Released Version 4. Released Version -> Open Edition
290
5. Open Edition -> Released Open Edition 6. Open Edition -> Version 7. Version -> Released Version 8. Version -> Open Edition 9. Version/Released Version -> Scratch Edition 10.Scratch Edition -> Open Edition 11.Scratch Edition -> Not Existing 12.(Released) Open Edition/(Released) Version -> Repository Only 13.Repository Only -> Open Edition/Version 14.Repository Only -> Not Existing
C.2.1 Not Existing -> Released Open Edition (1) Situation There are two situations where this transition can occur: creating a brand new package and importing elements (.class files, .java files, jar files) from outside VisualAge for Java into a package that does not exist.
A package must always be created within the context of a project. You typically create a new package when a major new work application is being initiated. You import an existing package when you want to copy external code into VisualAge for Java. A major difference between importing directly from another repository and importing files is that in the former case you import directly into the repository, and in the latter case you import into a package in your workspace.
Prerequisites The user must be the project owner.
The project must be an open edition. For package creation, a package of the same name must not exist in any project in the users workspace. For package import, if a package of the same name already exists in a project currently loaded in the workspace, the new classes will be added to it. This applies even if the package is in a project other than the one specified on import. In this situation, all prerequisites for creating classes in a package apply.
Mechanism Creating a new package:
291
Select Packages > Add > Package... from the Managing view of the Workbench. This brings up the Add Package SmartGuide. Select the Create a new package named: radio button and type your new package name. You may also add new package group members at this stage if you want. Package group members can create new classes and release them into your package. Importing from files: Select File > Import... from the Workbench. This brings up the Import SmartGuide. Select the project to import to and the type of import (class files, java files, JAR file, or entire directory) The next screen in the SmartGuide allows you to select the files or directory to import.
C.2.2 Not Existing -> Repository Only (2) Situation This transition occurs when you import a package from another repository into your VisualAge for Java repository. Prerequisites Any registered user can import a package into the repository. The administrator becomes the owner of such packages.
The package you want to import must be a version in the other repository.
Mechanism A package can be imported as part of a project as detailed in the corresponding transition for projects.
A package can also be imported independently: Select File > Import... from the Workbench. This brings up the Import SmartGuide. Select the type of import (Repository). The next page in the SmartGuide asks you to provide the IP address or host name of the server and the name of the repository file from which to import. When you have selected a valid repository, you are presented with a list of packages (and projects) in the repository. Select the package and package edition you want to import.
292
C.2.3 Released Open Edition -> Released Version (3) Situation You should convert a released open edition to a released version when you want to make a new package baseline. Once versioned, the package cannot be changed. Prerequisites You must be the package owner.
All classes in the package must be released (which also implies that they must be versioned).
Mechanism Select Packages > Manage > Release from the Managing view of the Workbench. C.2.4 Released Version -> Open Edition (4) Situation You can create an open edition of a package from a released version when you want to make changes to the package. Prerequisites You must be the package owner.
The owning project must be an open edition. If not, a scratch edition of the project will be created. You do not need to be the project owner to create a new package edition.
Mechanism Select Packages > Manage > Create Open Edition from the Managing view of the Workbench. C.2.5 Open Edition -> Released Open Edition (5) Situation This transition allows you to release a package to its project before you have versioned the package. This is a very useful facility when you want to create a rolling baseline from which all developers can synchronize their workspaces. When a developer loads the project, only classes that have been released to the package are visible. As other classes are released, the developer can reload the project to update the workspace. This facility avoids cluttering the repository with package versions that are created with the sole purpose of establishing a baseline.
293
Prerequisites You must be the project owner or package owner. Mechanism Select Packages > Manage > Release from the Managing view of the Workbench. C.2.6 Open Edition -> Version (6) Situation You should create a package version from an open edition when you want to freeze the contents of the package before releasing it into its project. Prerequisites You must be the package owner.
All classes in the package must be released (which also implies that they must be versioned).
Mechanism Select Packages > Manage > Version from the Managing view of the Workbench. C.2.7 Version -> Released Version (7) Situation You can release a version of your package when you want to make it available to the enclosing project. Prerequisites You must be the project owner or package owner. Mechanism Select Packages > Manage > Release from the Managing view of the Workspace. C.2.8 Version -> Open Edition (8) Situation You can create an open edition of a package from a version when you want to make changes to the package. Prerequisites You must be the package owner.
By definition, the owning project will already be an open (or scratch) edition.
294
Mechanism Select Packages > Manage > Create Open Edition from the Managing view of the Workspace. C.2.9 Version/Released Version -> Scratch Edition (9) Situation This transition occurs automatically whenever a new edition of an existing class or interface is created in a versioned package. Prerequisites None. A scratch edition will be created for any user, even if that user is a member of the package group. Mechanism None. The transition happens automatically. C.2.10 Scratch Edition -> Open Edition (10) Situation The scratch package edition exists because you created new classes or interfaces in a versioned package. You have to convert the scratch edition to an open edition to make the new classes or interfaces available to other users. Prerequisites You must be the package owner.
The project must be an open edition. If not, VisualAge for Java creates a scratch project edition.
Mechanism Select Packages > Manage > Create Open Edition from the Managing view of the Workspace. C.2.11 Scratch Edition -> Not Existing (11) Situation You can remove the package scratch edition if you do not want to retain the changes you made to the package that caused the scratch edition to be created.
You can remove the scratch edition in two ways. As package owner, you can delete the package and thus remove the package from the workspace and disassociate it from its project. However, this is unlikely to be the behavior you want. The simplest approach is to replace the scratch edition
295
with another edition from the repository. As the scratch edition is not stored in the repository, the replace deletes the scratch edition. As with scratch project editions, removing a scratch package edition does not completely remove any of its class editions. These are still stored in the repository. To see them you must use a class browser and examine editions of the class.
Prerequisites To explicitly delete a scratch edition, you must be the package owner.
Anyone can replace a scratch edition with another edition from the repository.
Mechanism To delete a package select Packages > Delete... from the Managing view of the Workbench.
To replace with another edition select Packages > Replace With from the Managing view of the Workbench. You have a choice of four submenus: Released Edition: Load the edition that has been released to the project. Current Edition: Load the edition that has the same name as the edition in your workspace. If that edition is not a version, its contents may have changed since you last loaded it. Previous Edition: Load the version of the package that was created chronologically before the edition currently in your workspace. Another Edition...: This option presents you with a list of all package editions in the repository. You are invited to select the edition to load.
C.2.12 (Released) Open Edition/(Released) Version -> Repository Only (12) Situation You can delete a package if you have the correct privileges. Deleting a package has two effects:
The package is no longer loaded into your workspace. However, it still exists in the repository and can be accessed through the Repository Explorer. The association between the project and the package is removed, even in the repository. In the repository, a package can be part of zero, one, or many projects. In a workspace it must belong to a single project.
296
The project must be an open edition. A package of the same name must not exist in the same or any other project in the workspace.
Mechanism From the Managing view of the Workbench select Packages > Add > Package. This brings up the Add Package SmartGuide.
Select the Add packages from the repository radio button and a list of available packages and editions will be displayed. Select any number of package editions and click on the Finish button.
C.2.14 Repository Only -> Not Existing (14) Situation Packages can be purged from the repository if they are no longer required. You can also purge individual package editions. Even when purged, packages can be restored, provided that the repository has not been compacted. Prerequisites Only the package owner or the administrator can purge packages or package editions.
The package must not be currently loaded into the workspace. Only the administrator can compact the repository.
297
First you must purge the package and/or package editions. In the Packages view of the Repository Explorer, select Names > Purge... to purge a complete package or select Editions > Purge... to purge a single edition. The second stage involves compacting the repository.
Open Edition
1 6 5 7
Not Existing
6 4 5
Version
Repository Only
5
Released Version
These transitions are listed below and described in the subsequent sections: 1. Not Existing -> Open Edition 2. Open Edition -> Version 3. Version -> Released Version 4. Version/Released Version -> Open Edition 5. Version/Open Edition/Released Version -> Repository Only
298
6. Repository Only -> Version/Open Edition 7. Repository Only -> Not Existing
C.3.1 Not Existing -> Open Edition (1) Situation This is how brand new classes and interfaces are created. Prerequisites The package in which the class is being created must be an open edition. If it is not, the SmartGuide will change the package to an open edition for you automatically. You must be the package owner.
If the package is already an open edition, you must be a package group member to create a new class.
Mechanism Classes are created using the Create Type SmartGuide. One way to create a new class is through the Types > Add > Class/Interface menu option in the Managing view of the Workbench. The creator of the class becomes the class owner and the class developer of the new edition. C.3.2 Open Edition -> Version (2) Situation You create a new version of a class from an open edition when you want to freeze the definition of the class. Versioned classes cannot be changed. Prerequisites Only the class developer can version a class. Mechanism Select Types > Manage > Version... from the Managing view of the Workbench. You can version multiple classes at a time and apply the same or individual version numbers to each class. C.3.3 Version -> Released Version (3) Situation You release a class to its enclosing package when you want to make it available to other users who load that edition of the package. Prerequisites Only the class owner can release a class.
299
Mechanism Select Types > Manage > Release from the Managing view of the Workbench C.3.4 Version/Released Version -> Open Edition (4) Situation If you want to make changes to a versioned class, you must first create an open edition of the class. Prerequisites Anyone can create an open edition of an existing class. If the package to which the class belongs is not an open edition, a scratch edition is created automatically. Mechanism Select Types > Manage > Create Open Edition from the Managing view of the Workbench. C.3.5 Version/Open Edition/Released Version -> Repository Only (5) Situation You can delete a class when it is no longer required. Deleting a class removes it from the enclosing package and from the workspace. The class remains in the repository and is still implicitly associated with the same package. You can load the class from the repository back into any edition of the same package at a later stage. Prerequisites Only the class owner can delete a class.
You must be a group member of the enclosing package. You automatically become the new owner of the class you load in this way. The class
300
developer remains the same, so when you load an open edition that has another user as its developer, you cannot change the class.
Mechanism Select Types > Add > Class/Interface... > Type from Repository... from the Managing view of the Workbench. You will be presented with a list of classes and interfaces that belong to the currently selected package in the repository.
301
302
The materials are provided as-is and with limited informal support. If you have questions regarding the materials, please place a question on the VisualAge Generator newsgroup or send a note to the book owner, Pat McCarthy, at patmc@us.ibm.com.
Projects containing the Developer on Java source code (Java GUIs and 4GL).
The following projects are Included in the VisualAge for Java export file: ISA ISA ISA ISA ITSO ITSO ITSO ITSO Banking Banking Banking Banking System System System System includes PLP part for remaining projects Bank Common Components Customer
Note: The Java GUIs for the subset of the ITSO Bank system were implemented using a Beta version of Developer on Java. They were tested using the Beta 3 drop, and should function fine on your code base.
303
The configuration maps and applications shown in Table 16 are included in the VisualAge generator .dat file in the VAGen directory.
Table 16. VisualAge Generator Configuration Maps and Applications
Configuration Map
VGV3ITSOBankCM VGV3BankingSystemCM
Application
(points at other configuration maps) IBKBankApp IBKCustomerApp
VGV3CommonCM
CmnGlobalItemApp CmnVAGTPartsApp
Also included in the VAGen directory are ESF exports of the VisualAge Generator V3.1 applications:
Cust31.ESF Bank31.ESF
Code from the IBKCustomerApp application. Code from the IBKBankApp application.
CmnCode31.ESF Code from the CmnVAGTPartsApp application. CmnData31.ESF Code from the CmnGlobalItemApp application.
For further information on VisualAge Generator Templates please visit the http://www.redbooks.ibm.com web page and look for the publication VisualAge Generator Templates - Creating a Well-Tailored Solution, SG24-5263.
304
D.3 Database
The VisualAge Generator server programs referenced in this book accessed one or more DB2 tables in the ITSOBank database. The following files are included in the Database directory:
BankDB.bat
Command file to create database and load data into the tables. Edit file to adjust database create statements and creator ID value for create table statements. Data definition statements to create database and tables. SQL statements to insert data into tables. Catalog report of database tables. SQL query for data in tables.
305
306
307
them into the customer's operational environment. While each item may have been reviewed by IBM for accuracy in a specific situation, there is no guarantee that the same or similar results will be obtained elsewhere. Customers attempting to adapt these techniques to their own environments do so at their own risk. Any pointers in this publication to external Web sites are provided for convenience only and do not in any manner serve as an endorsement of these Web sites. Any performance data contained in this document was determined in a controlled environment, and therefore, the results that may be obtained in other operating environments may vary significantly. Users of this document should verify the applicable data for their specific environment. This document contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples contain the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental. Reference to PTF numbers that have not been released through the normal distribution process does not imply general availability. The purpose of including these reference numbers is to alert IBM customers to specific information relative to the implementation of the PTF when it becomes available to each customer according to the normal IBM PTF distribution process. The following terms are trademarks of the International Business Machines Corporation in the United States and/or other countries:
IBM AS/400 DB2 MQ Netfinity OS/390 S/390 System/390 WebSphere AIX CICS IMS MQSeries OS/2 RS/6000 SP VisualAge
The following terms are trademarks of other companies: C-bus is a trademark of Corollary, Inc. in the United States and/or other countries.
308
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and/or other countries. Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States and/or other countries. PC Direct is a trademark of Ziff Communications Company in the United States and/or other countries and is used by IBM Corporation under license. ActionMedia, LANDesk, MMX, Pentium and ProShare are trademarks of Intel Corporation in the United States and/or other countries. UNIX is a registered trademark in the United States and/or other countries licensed exclusively through X/Open Company Limited. SET and the SET logo are trademarks owned by SET Secure Electronic Transaction LLC. Other company, product, and service names may be trademarks or service marks of others.
309
310
Collection Kit Number SK2T-2177 SK2T-6022 SK2T-8038 SK2T-8039 SK2T-8044 SK2T-2849 SK2T-8046 SK2T-8040 SK2T-8043 SK2T-8037 SK3T-3694
311
312
e-mail address usib6fpl@ibmmail.com Contact information is in the How to Order section at this site: http://www.elink.ibmlink.ibm.com/pbl/pbl/
Fax Orders United States (toll free) Canada Outside North America 1-800-445-9269 1-403-267-4455 Fax phone number is in the How to Order section at this site: http://www.elink.ibmlink.ibm.com/pbl/pbl/
This information was current at the time of publication, but is continually subject to change. The latest information may be found at the redbooks Web site.
313
First name Company Address City Telephone number Invoice to customer number Credit card number
Last name
Card issued to
Signature
We accept American Express, Diners, Eurocard, Master Card, and Visa. Payment by credit card not available in all countries. Signature mandatory for credit card payment.
314
List of Abbreviations
IBM ITSO MSL CICS ESF ECI FFS EJB PLP JSP UI Record UI Type
International Business Machines Corporation International Technical Support Organization Member Specification Library Customer Information Control System External Source Format External Call Interface Free Form Surface Enterprise Java Bean Project List Part Java Server Page User Interface Record User Interface Type
315
316
Index Symbols
/PACKAGENAME 31 /PROJECT 29 scratch edition 220 subapplication 195, 209, 213 version 196, 217, 218 concurrent 234 configuration management 104 configuration map 195, 209, 214 manager 197 manager 226 connections to VisualAge Generator parts 25 VisualAge Generator part attributes 27 containers 196 CONVERSE model 77 CustomerDetailApplication 189 CustomerDetailPanelResource 183 CustomerListApplet 187 CustomerListApplication 188 CustomerListPanel 181, 184 CustomerListPanelResource 181
Numerics
4GL syntax changes 41
A
administrator 108 definition 98 aliasing 19 application 195, 209, 213 manager 197 manager 227 automatic naming 101
C
change control 225 change management 106 class 96, 195, 209, 210 developer 108, 197, 228 owner 108, 117, 197, 228 ownership 107 release 105 class management rules 15, 19 VisualAge for Java 114 VisualAge for Smalltalk 114 CLASSPATH 264 communication session 24 components 195 application 195, 209, 213 class 195, 209, 210 configuration map 195, 209, 214 edition 196, 217 method 195, 209, 212 ownership 197, 225 application manager 197, 227 class developer 197, 228 class owner 197, 228 configuration map manager 197, 226 release 196, 221
D
Developer for Smalltalk development process 231 implementation issues 232 Developer on Java project list part defining system structure 123 team environment functional organization 113 quick start 113 VAGen Parts Browser 114 Developer on Smalltalk 4GL parts 211 feature 202 development split stream 99 development process concurrent 234 Developer for Smalltalk 231 implementation issues 232 serial 234, 247 VisualAge for Smalltalk 231
317
open edition 101 scratch edition 103 EMSRV 200 export 201 TCP/IP 203 Enterprise Java Bean overview 9 ESF in workspace 16 export 201, 281 EZE statement syntax changes 41 EZESCRPT 43
F
feature VAGen Parts Browser 14 VisualAge for Java 13 form 70 free form surface VisualAge Generator parts 21 communication session 24 connections 25, 27 functions 24 programs 24 records 22 tables 22 functions arguments 37 description 35 examples 39 loose typing 40 overview 5 reuse 35 syntax changes 41 usage 35
classes CustomerDetailApplication 189 CustomerDetailPanelResource 183 CustomerListApplet 187 CustomerListApplication 188 CustomerListPanel 181, 184 CustomerListPanelResource 181 IsaActionEventHandler 175 IsaComboBox 176 IsaErrorRoutine 175 IsaGroupBox 177 IsaLogic 176 IsaTable 178 IsaTextField 179 JComboBox 176 JPanel 177 JScrollPane 178 JTable 178 JTextField 179 component architecture 168 implementation 167 implementation global reusable components 174 Java applet 187 Java application 188, 189 system reusable components 180 introduction 167 system specifications 170 global reusable components 170 Java applet 172 Java application 172 system reusable components 171
H
hidden 70 HTML UI record mapping 71 UI record representation 72
G
generation 4GL parts 29 Java client 30 of Java 30 options /PACKAGENAME 31 /PROJECT 29 overview 29 VisualAge Generator Templates 53 Web Transaction 80 GUI development
I
image 194, 202 unload 204 image component automated packaging 10 overview 9 import 292 input 69
318
input/output 69 interoperability feature 13 free form surface 21 communication session 24 connections 25, 27 function parts 24 parts palette 21 program parts 24 record parts 22 table parts 22 menu options 14 palette 14 part aliasing 19 parts as methods 17 VAGen Parts Browser 14 VisualAge for Java and VisualAge Generator 4, 20 IsaActionEventHandler 175 IsaComboBox 176 IsaErrorRoutine 175 IsaGroupBox 177 IsaLogic 176 IsaTable 178 IsaTextField 179
J
JAR 264 Java classes CustomerDetailApplication 189 CustomerDetailPanelResource 183 CustomerListApplet 187 CustomerListApplication 188 CustomerListPanel 181, 184 CustomerListPanelResource 181 IsaActionEventHandler 175 IsaComboBox 176 IsaErrorRoutine 175 IsaGroupBox 177 IsaLogic 176 IsaTable 178 IsaTextField 179 JComboBox 176 JPanel 177 JScrollPane 178 JTable 178 JTextField 179
GUI component architecture 168 implementation 167 development 167 implementation global reusable components Java applet 187 Java application 188, 189 system reusable components system specifications 170 global reusable components Java applet 172 Java application 172 system reusable components interoperability 4, 20 Java applet implementation 187 specification 172 Java application implementation 188, 189 specification 172 Java client 30 JComboBox 176 JDK 261 JPanel 177 JScrollPane 178 JTable 178 JTextField 179
174
180 170
171
L
Library Supervisor 201 load 194 loose typing 40
M
method 96, 195, 209, 212 release 105
N
none 69
O
object scripting data exchange 44 description 42 event synchronization 49
319
examples 47 EZESCRPT 43 implementation 43 introduction 42 overview 6 reuse 48 wizards 45 open edition 100 options /PACKAGENAME 31 /PROJECT 29 organization projects 261 output 69 owner package group 99 ownership 93, 197, 225 application manager 197, 227 class developer 197, 228 class owner 197, 228 configuration map manager 197, 226
R
release 196, 221 program elements 104 repository 91, 98 description 15 resource files managing 266 reusable components global implementation 174 specification 170 system implementation 180 specification 171 reuse functions 35 object scripts 48 runtime Web Transaction 82, 85
P
package 96, 115 baseline 274 description 15 organization 261 owner 108, 110 release 106 package group 99 parts palette VisualAge Generator parts 21 program elements 95 history 103 ownership 107 relationships 96 release 104 version 100 programlink 69 project 95, 117 defining system structure 119 delete 111 delivery 281 description 15 loading rules 118 organization 261 owner 108, 110 version 287
S
scratch edition 100, 103, 220 serial 234, 247 Smalltalk image component 9 subapplication 195, 209, 213 submit 69 submitbypass 69 SUN Solaris 7 system elements 95, 98
T
TCP/IP 92, 203 team roles 108 testing HTML generation 68 programs 28 Web Transaction 71 type 96
U
UI record attributes 69 data item attributes 69
320
definition 68 HTML generation 68 HTML representation 71, 72 UI types 69 unload 204 user 98 attributes 99 package group owner 99 user definition 99 user interface type description 69 form 70 hidden 70 input 69 input/output 69 none 69 output 69 programlink 69 submit 69 submitbypass 69
V
VAGen Parts Browser 114 version 196, 217, 218 automatic naming 101 control 100 management 100 proposed naming 102 VisualAge for Java class management 114 class management rules 15, 19 CLASSPATH 264 import 285 package 15 project 15 repository 15 team environment administrator 98, 108 purge 289 applet code base 264 authority 117 automatic naming 101 baseline 272, 281 rolling 276, 278 standard 276 change reconciliation 276
change management 106 class 96 add from repository 301 create 299 developer 108 owner 108, 117 work pattern 272 ownership 107 reconciliation 275 release 105, 299 scratch edition 300 state transitions 298 version 299 class management 114, 115 class management rules 15, 19 CLASSPATH 264 comparison with Smalltalk 113 configuration management 104 containers 115 management 117, 118 defining system structure 119 Developer on Java functional organization 113 quick start 113 development patterns 269 split stream 99, 279 development pattern basic 269 edition 100 open edition 101 scratch edition 103 export 281 import 285 introduction 91 lead developer 271 management query 260, 262 workspace 259 management considerations 114 managing page 259 merge 275 method 96 release 105 open edition 100 overview 91 owner package group 99 ownership 93
321
package 15 , 96, 115 add from repository 297 create 292 delete 296 import 292 management 267 open edition 291 owner 108, 110 release 106, 293 scratch edition 295 state transitions 290 version 294 package group 99 process team development 269 program elements 95 history 103 managing 259 ownership 107 relationships 96 release 104 state transition 283 version 100 project 15, 117, 118 add from repository 286 baseline 281 delete 111 delivery 281 import 285 open edition 284 organization 261 owner 108, 110 purge 289 resources 264 scratch edition 287 state transition 283 project list part 123 reconciliation 275 release program elements 104 repository 15, 91, 98 explorer 260 resources 259 files 264, 266 project 264 shared directory 264 scratch edition 100, 103, 287, 295 split stream development 279 state transitions 283
storing ESF 16 system elements 95, 98 team development process 269 team roles 108 type 96 user 98 attributes 99 package group owner 99 user definition 99 version control 100 management 100 proposed naming 102 VisualAge Generator part organization 15 workspace 15, 91 delete 111 management 259 managing page 259 VisualAge Generator communication session 24 connections 25, 27 feature 13 free form surface 21 function parts 24 interoperability 4, 20 part aliasing 19 parts as methods 17 parts palette 21 program parts 24 record parts 22 table parts 22 VAGen Parts Browser 14 workspace 15 VisualAge for Smalltalk class management 114 components organization 252 development process concurrent 234 organization 252 serial 234, 247 team environment 4GL parts 211 application 209, 213 architecture 199 change control 225 class 209, 210 class management 114
322
comparison with Java 113 components 195, 209 application 195 class 195 configuration map 195 edition 196, 217 method 195 ownership 197, 225 application manager 197, 227 class developer 197, 228 class owner 197, 228 configuration map manager 197, 226 release 196, 221 scratch edition 220 subapplication 195 version 196, 217, 218 concepts 193 configuration map 209, 214 containers 115, 196 development process 231 EMSRV 200 export 201 image 194, 202 library interactions 203 implementation issues 232 introduction 193 library 194, 200 image interactions 203 Library Supervisor 201 load 194 manager library 200 manager.dat 200 method 209, 212 subapplication 209, 213 unload 204 workstation 200 VisualAge Generator communication session 24 connections 25, 27 enhancements functions 35 object scripting 42 overview 35 VisualAge Generator Templates 51 WebSphere RAD 60 feature 13 free form surface 21 function parts 24
generation 4GL parts 29 Java client 30 of Java 30 overview 29 interoperability 4, 20 part aliasing 19 parts as methods 17 introduction to V4 Enterprise Java Bean 9 functions 5 image component 9 object scripting 6 SUN Solaris 7 VisualAge for Java interoperability 4, 20 VisualAge Generator Templates 7 WebSphere RAD 8 overview of V4 3 part aliasing 19 parts as methods 17 parts on free form surface 21 communication session 24 connections 25, 27 functions 24 programs 24 records 22 tables 22 parts palette 21 program definition 28 generation 29 testing 28 program parts 24 record parts 22 syntax changes 41 table parts 22 team environment part organization 15 storing ESF 16 VAGen Parts Browser 14 VisualAge for Java 4GL part generation 29 feature 13 Java client generation 30 VAGen Parts Browser 14 VisualAge Generator Templates architecture 52 description 51 generation 53
323
W
Web Transaction development 67 generation 80 implementation 80 program state 76 runtime configuration 85 runtime processing 82 saving state 76 system structure CONVERSE model 77 options 75 XFER , UIRec 79 XFER Pgm WS, UIRec 78 testing 71 transfer options delayed transfer 75 direct transfer 75 form/link transfer 75 UI record 68 WebSphere RAD comparison with native Java 60 description 60 overview 8 Web Transaction approach 62 generation 80 implementation 80 program development 67 program state 76 runtime configuration 85 runtime processing 82 saving state 76 system structure 75 wizards object scripting 45 workspace 91 delete 111 description 15 storing ESF 16
X
XFER , UIRec 79 XFER Pgm WS, UIRec 78
324
_ IBM employee
Please rate your overall satisfaction with this book using the scale: (1 = very good, 2 = good, 3 = average, 4 = poor, 5 = very poor)
Overall Satisfaction __________
Comments/Suggestions:
325
SG24-5467-00