Using Visualage Smalltalk Objectextender

Using Visualage Smalltalk Objectextender

Using VisualAge Smalltalk ObjectExtender Markus Muetschard, Marianne Schmid, Bernd Kaponig, David Singleton International Technical Support Organization http://www.redbooks.ibm.com SG24-5258-00 SG24-5258-00 International Technical Support Organization Using VisualAge Smalltalk ObjectExtender February 1999 Take Note! Before using this information and the product it supports, be sure to read the general information in Appendix G, “Special Notices” on page 407. First Edition (February 1999) This edition applies to the IBM VisualAge Smalltalk ObjectExtender Feature Version 4.5a of the IBM VisualAge Smalltalk Enterprise Version 4.5a product family. Sample Code on the Internet! The code for the samples in this book is available as SG245258.zip on: . ftp://www.redbooks.ibm.com/redbooks/SG245258 Download and unzip the sg245258.zip file and read the aaRead.txt file. Comments may be addressed to: IBM Corporation, International Technical Support Organization Dept. QXXE Building 80-E2 650 Harry Road San Jose, California 95120-6099 When you send information to IBM, you grant IBM a non-exclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you. © Copyright International Business Machines Corporation 1999. All rights reserved Note to U.S Government Users – Documentation related to restricted rights – Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp. Contents Figures. .xi Tables. xvii Preface. .xxi How the Book Is Organized . xxi The Team That Wrote This Redbook . xxii Comments Welcome . xxiii Part 1. Introductory Tour . 1 Chapter 1. Concepts . 3 1.1 Application Layers . 5 1.2 Persistence Layers. 6 1.2.1 Business Objects . 7 1.2.2 Schemas . 8 1.2.3 Maps . 9 1.3 Transactions . 11 1.3.1 Shared Transaction . 11 1.3.2 Top-Level Transactions . 12 1.3.3 Nested Transactions. 12 1.3.4 Transacted Variables . 13 1.4 Frameworks . 14 1.5 Data Abstractions. 15 1.5.1 Model Metadata . 15 1.5.2 Application Scripts . 15 1.5.3 Application Data . 16 1.6 Metadata and Its Storage . 16 Chapter 2. Development Paths . 19 2.1 Forward or Top-Down: Start with the Object Model . 19 2.2 Backward or Bottom-Up: Start with the Database . 20 2.3 Outside-In: Map the Model to the Database Schema . 22 2.4 Whatever YOU Like . 22 Chapter 3. Tools . 23 3.1 Browsers . 23 3.1.1 Model Browser . 24 3.1.2 Schema Browser . 27 3.1.3 Map Browser . 32 3.1.4 Status Browser . 35 © Copyright IBM Corp. 1999 iii 3.2 System Transcript . 36 3.3 Smalltalk Class Editor and VisualAge Script Editor. 37 3.4 Inspectors . 38 Chapter 4. Sample Scenarios . 41 4.1 The Employee and Department Sample Scenario . 41 4.2 The Library Sample Scenario . 42 Part 2. Your First Samples . 45 Chapter 5. Employee Top-Down . 47 5.1 Define the Model (Metadata) . 47 5.1.1 Create New Model . 47 5.1.2 Define Classes . 49 5.1.3 Define Attributes. 50 5.1.4 Define Relationships. 54 5.2 Generate Code for the Model Classes . 54 5.2.1 Set Model Code Generation Options . 54 5.2.2 Start Model Code Generation . 56 5.3 Generate Schema and Mapping (Metadata and Database) . 57 5.3.1 Generate Image Schema . 57 5.3.2 Verify Local Image Schema and Data Store with Scripts. 58 5.3.3 Version, Release, and Save the Sample Work . 60 5.3.4 Generate Database Schema. 61 5.3.5 Generate the DDL and the Database Tables . 66 5.4 Generate Service Classes . 69 5.4.1 Set the Service Code Generation Options . 69 5.4.2 Start Service Code Generation . 70 5.5 Activate a Data Store . 71 5.6 Run Sample Headless with Scripts. 72 5.6.1 Run Scripts Stepwise . 73 5.6.2 Monitor Headless Sample with Status Browser. 75 5.7 Do Some Smalltalk Inspection . 76 5.7.1 Use the Basic Smalltalk Inspector (#inspect) . 76 5.7.2 Use the ObjectExtender Enablement for the Inspectors . 78 5.7.3 Look at All Instances of a Class (#allInstances) . 79 5.8 Create Views with Transactions . 83 5.8.1 Use the Basic Transaction Parts. 83 5.8.2 Use the BusinessTransaction Part . 90 5.9 Run Sample with User Interface . 96 5.9.1 Add Error Handling and Error Events . 97 5.9.2 Add Error Information for the User . 99 5.9.3 Add Database Error Handling . 100 iv Using VisualAge Smalltalk ObjectExtender 5.10 Stand-alone Application (GUI with Image Schema) . 101 5.11 Summary and Conclusions . 102 Chapter 6. Employee Bottom-Up. 105 6.1 Import Schema from Relational Database (Metadata) . 106 6.2 Generate Model Definition and Mapping (Metadata). 109 6.3 Generate Code to Support Model and Services . 111 6.4 Run Sample Headless with Scripts. 113 6.5 Adding the User Interface. 115 6.5.1 Create a List View . 116 6.5.2 Create a Detail View. 119 6.6 Run and Monitor the List and Detail View GUI . 122 Chapter 7. Employee and Department Top-Down. 127 7.1 Define Model (Metadata) . 127 7.1.1 Create New Model . 128 7.1.2 Define Classes . 128 7.1.3 Define Attributes. 128 7.1.4 Define Associations . 129 7.2 Generate Code for the Model Classes . 135 7.2.1 Generate Model Code into Different Applications . 135 7.2.2 Review Generated Model Class Code . 136 7.3 Generate Schema and Mapping: Metadata and Database . ..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    470 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us