Copyright
This documentation is Copyright (c) 1991-2001 by Anton van Straaten.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1, with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts.
A copy of the license can be viewed by clicking on the following link:
GNU Free Documentation License
1 Getting Started
Welcome to Class(y), the standard for class creation in CA-Clipper. Class(y) provides complete object-oriented programming capabilities, seamlessly extending Clipper’s power as an application development language.
Installation
Class(y) does not have an automated installation program. Installation is very straightforward. We suggest that you copy the contents of the distribution diskette to a directory on your hard disk called \CLASSY, as in the following example:
XCOPY A:\*.* C:\CLASSY\ /S
Note the /S switch to XCOPY, which causes all subdirectories to be correctly copied.
Once the files have been copied correctly, you need to set up your DOS environment so that you can compile and link Class(y) programs. Throughout this section, we will assume that you installed Class(y) in a directory named CLASSY, as in the above XCOPY example.
We suggest that you add the \CLASSY\LIB directory to the library path via the LIB environment variable, and add the \CLASSY\INCLUDE directory to the include file path via the INCLUDE environment variable, as in the following example:
SET LIB=C:\CLIPPER\LIB;C:\CLASSY\LIB
SET INCLUDE=C:\CLIPPER\INCLUDE;C:\CLASSY\INCLUDE
If you are short of environment space or already have very long LIB and INCLUDE paths, you may wish instead to copy the two libraries (*.LIB) in \CLASSY\LIB into your default library directory. Similarly, the header files (*.CH) can be copied from the \CLASSY\INCLUDE directory to a default include file directory.
Finally, copy the file CLASS(Y).NG into your Norton Guide or Expert Help directory (Norton Guide is supplied with CA-Clipper).
Online Documentation
An online command and usage reference is provided in the form of a Norton Guide file, CLASS(Y).NG, found in the \CLASSY\DOCS directory.
Sample Programs
Class(y) includes various sample classes and programs to demonstrate their use. Batch files are provided to compile and link these samples. For an overview of the available sample programs, examine the File List in the Class(y) READ.ME file.
Upgrading from Class(y) v1.0x
If you are upgrading from Class(y) v1.0x, please print out and read the file CONVERT.TXT, which can be found in the \CLASSY\DOCS directory. It explains how to compile code in the "Version 1 compatibility mode" supported by Class(y) v2.0. "Version 1 compatibility mode" is provided to allow Class(y) v1.0x code to be compiled with few or no changes. CONVERT.TXT also describes how to convert files to "Version 2 native mode". We suggest that you begin by using compatibility mode to compile v1.0x classes, and convert to native mode incrementally. Classes compiled in different modes can be mixed in the same application.
Guide to the Manual
Getting Started
Chapter 1, Getting Started, deals with technical support, the license agreement, upgrades, installation, and this section. The remainder of the manual can be broadly divided into two sections: an introduction and tutorial section, and a reference section.
Introduction and Tutorial
To familiarize yourself with Class(y), we suggest that you work through this section, i.e. chapters 2 through 5:
Chapter 2, Introduction to Object Orientation, is essential reading unless you are already very familiar with object-oriented concepts and terminology. Even if you are familiar with another object-oriented language such as C++, you should read this chapter since there are areas in which object-orientation in Clipper differs from other OO languages.
Chapter 3, Using Class(y), deals with the basics of defining and using classes, including compiling and linking a program with Class(y). If you’re in a hurry to get started, you could start by working through this section, but don’t forget to read Chapter 2 and work through the tutorials in Chapters 4 and 5 before attempting to make serious use of Class(y).
Chapter 4, Pull-Down Menu Tutorial, and Chapter 5, Inheriting from Tbrowse, are tutorials which cover the design of some sample classes in some detail. You should work through these regardless of your degree of expertise since they contain hints and information about ways to use Class(y) in real programs.
Reference
Chapter 6, Class Declaration Commands, and Chapter 7, Method Definition Commands, is a command reference. Each chapter is organized alphabetically. The command reference contains details of the syntax and behavior of individual Class(y) commands. Chapter 6 covers commands used in the declaration of classes (commands used in a CREATE CLASS...END CLASS block), while Chapter 7 contains commands used in the definition of methods (method definitions usually appear after the class declaration in a .PRG file).
Chapter 8, Usage Reference, and Chapter 9, Advanced Topics, form a combined glossary and reference which covers a variety of Class(y) terminology and features. Each chapter is organized alphabetically by major topic name. The Advanced Topics chapter contains material which is not required for normal use of Class(y), but it will be of interest to those doing more advanced work.
An alphabetical index can be found at the end of the manual.
Note that the reference chapters, 6 through 9, are also contained in the Class(y) Norton Guide.
Other Reading
Most of the material in this manual deals either with object-oriented programming in general or with programming in Class(y). However, there is more to object technology than OOP. A very important aspect is that of object-oriented analysis (OOA) and object-oriented design (OOD).
Object-oriented analysis refers to the process of analyzing a problem from an object-oriented perspective, with the aim of achieving an object-oriented design for a solution to the problem being analyzed. During the analysis and design phases, the problem is broken down by identifying classes and objects, and the relationships (such as inheritance or composition) between them. The programming phase involves actually writing the code to implement the classes, objects and relationships identified during analysis and design.
The process of successfully developing a typical application usually iterates repeatedly through analysis, design and programming. Issues raised during design or programming often lead to a new or more detailed analysis being performed, which in turn leads to new design and programming. This kind of development has proved to be one of the most successful ways of implementing systems, and object-oriented systems are well suited to developing in this way.
It is beyond the scope of this manual to provide an in-depth discussion of object-oriented analysis and design. However, many excellent books on the topic are available, as shown in the list below.
The list contains books about object-oriented analysis, design and programming, as well as other aspects of object technology such as database systems (ODBMS), interface design, and managerial perspectives. If you are serious about taking advantage of object technology, you will want to obtain and read some of these books.
At the very least, we highly recommend that you read more than one of the books covering analysis and design. Different authors espouse different approaches, and familiarity with more than one approach helps in determining which issues are fundamental, and which are artifacts of the particular approach being used.
The list below is based on a list compiled by Larry Dysert and posted on the CLIPPER forum on CompuServe. Thanks, Larry, and all the other regulars in the OOP section on the Clipper forum (they know who they are)!
Book List
An Introduction To Object-Oriented Programming
Author:
Timothy Budd
ISBN:
0-201-54709-0
Publisher:
Addison-Wesley
Designing Object-Oriented Software
Author:
Rebecca Wirfs-Brock, Brian Wilkerson, and Lauren Wiener
ISBN:
0-13-629825-7
Publisher:
Prentice-Hall
Object-Orientation - Concepts, Languages, Databases, User Interfaces
Author:
Setrag Khoshafian and Razmik Abnous
ISBN:
0-471-51801-8
Publisher:
John Wiley & Sons, Inc.
Object-Oriented Analysis
Author:
Peter Coad and Edward Yourdon
ISBN:
0-13-629981-4
Publisher:
Yourdon Press (Prentice-Hall)
Object-Oriented Analysis & Design
Author:
James Martin and James Odell
ISBN:
0-13-630245-9
Publisher:
Prentice-Hall
Object-Oriented Databases
Author:
Dimitris Chorafas and Heirich Steinmann
ISBN:
0-13-491804-5
Publisher:
Prentice-Hall
Object-Oriented Databases
Author:
Setrag Khoshafian
ISBN:
0471-57056-7
Publisher:
John Wiley & Sons
Object Oriented Design
Author:
Peter Coad and Edward Yourdon
ISBN:
0-13-630070-7
Publisher:
Yourdon Press (Addison-Wesley)
Object-Oriented Design With Applications
Author:
Grady Booch
ISBN:
0-8053-0091-0
Publisher:
Benjamin Cummings Publishing Company
Object-Oriented GUI Application Development
Author:
Geoff Lee
ISBN:
0-13-363086-2
Publisher:
Prentice Hall
Object-Oriented Information Systems
Author:
David Taylor
ISBN:
0-471-54364-0
Publisher:
John Wiley & Sons, Inc.
Object-Oriented Interface Design
Author:
IBM
ISBN:
1-56529-170-0
Publisher:
Que
Object-Oriented Methods
Author:
Ian Graham
ISBN:
0-201-56521-8
Publisher:
Addison Wesley
Object-Oriented Modeling And Design
Author:
James Rumbaugh, et al
ISBN:
0-13-629841-9
Publisher:
Prentice-Hall
Object-Oriented Programming: An Introduction
Author:
Greg Voss
ISBN:
0-07-881682-3
Publisher:
McGraw Hill
Object-Oriented Software Construction
Author:
Bertrand Meyer
ISBN:
0-13-629049-3
Publisher:
Prentice-Hall
Object-Oriented Systems Analysis
Author:
David Embley/Barry Kurtz/Scott Woodfield
ISBN:
0-13-629973-3
Publisher:
Yourdon Press
Object-Oriented System Development
Author:
Dennis de Champeaux, Doug Lea, and Penelope Faure
ISBN:
0-201-56355-X
Publisher:
Addison-Wesley
Object-Oriented Technology: A Manager's Guide
Author:
David Taylor
ISBN:
Publisher:
Addison-Wesley
Objects In Action: Commercial Application Of O-O Technology
Author:
Phil Harmon and David Taylor
ISBN:
0-201-63336-1
Publisher:
Programming In An O-O Environment
Author:
Raimund Ege
ISBN:
0-12-232931-7
Publisher:
AP Professional
The Tao Of Objects
Author:
Gary Entsminger
ISBN:
1-55851-155-5
Publisher:
M&T Books