Programming conventions for classes
- Last Updated: December 18, 2019
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Programming conventions for classes
Progress 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 Use the CLASS construct and the sections on accessing class members in Program with 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. (
INPUTcName).