Last updated 2003-12-04 11:42:45 EST
Doc Title DLXS Middleware Naming Conventions
Author 1 Pagliere, Alan
CVS Revision $Revision: 1.8 $
DLXS Middleware Naming Conventions

Several naming conventions have evolved in the writing of the DLXS Middleware. Being familiar with them will help when looking at and possibly making changes to the Middleware code.

Subclass Module Names

Subclass modules generally carry some portion, even if abbreviated, of the name of its superclass ancestry. For example, the top-level is subclassed by and The latter is in turn subclassed by and When needs to be subclassed for a particular collection, the collection id is used, with the first letter capitalized, followed by "TC" to represent "TextClass". So, in the case of "Making of America", whose collection id is "moa", the collection subclass would be called

See the DLXS Object Hierarchies.

Variable names for most common object instantiations

Many DLXS Middleware-specific objects are created and used during the running of the CGI progam. When an object is "new-ed up" or instantiated in Perl, a variable which is "blessed" as an object of the class in question, is created. A convention has evolved for the naming of the variable by the calling code. Most of the variables have three-letter names (though a few have names of more than three letters). The most common ones are listed below. On the left is the object (from the module/Class name). On the right, a typical name for the variable that holds the reference to the object.

Being a bit familier with these object names should ease the task of looking through code.

Class name variable name
CollsInfo object $cio
GroupInfo object $gio
ProcIns object $pio
DlpsSession object $dso
ApplicationResult object $aro
XPat object $xpat
XPatResult object $xro
SearchSet object $xro
SearchHistory object $sho
DLXSApp object $app
TextClass object $tco
BibClass object $bco
FindaidClass object $fco
Bookbag object $bbo
BookBagItem object $bbi
QueryFactory object $qf
TerminologyMapper object $tm

Method Names

DLXS Programmers try to give methods names that are as self-documenting as possible. Names are written in proper case; one string with no spaces, in which the words are marked only with a capital letter.

Examples include: