Try OpenEdge Now
skip to main content
Object-oriented Programming
Object-oriented Programming and ABL : Programming conventions for classes
 

Programming conventions for classes

Progress Software Corporation recommends the following programming conventions for classes, which are demonstrated in this manual:
*Class names and interface names should begin with an upper case letter and each separate word in the name should start with an upper case letter. This is known as camel case, for example, MyCustomerClass.
*Classes and interfaces should be put into packages to uniquely identify their type. Using your company name as part of the package name might help avoid conflicts with similarly named types from other companies that might be on your PROPATH. For example built-in classes provided by ABL are contained in the package, Progress.Lang.
*References to static class members should be qualified with the class type name.
*You can use ABL reserved keywords to define class, interface, method, property, data member, or class event names. However, Progress Software Corporation recommends that you do not use keywords to define these ABL elements. If you do use keywords to define method, variable data member, property or class event names, you must use additional syntax to access such methods, variable data members, properties, and events within the class hierarchy where they are defined. For more information, see Usingthe CLASS construct and the sections on accessing class members in Programmingwith Class-based Objects.
*When defining a class member, its access mode, although optional, should be specified.
*Calls to a method should include the parameter mode, e.g. (INPUT cName).