| Home | Previous Lesson: Diadvantages Next Lesson: Service Oriented Class Libraries |
Classes of this type define the generic functionality in the super ancestor. The ancestor class is sub-classed, and the functionality is added until all required combinations of functionality are defined. For example, in the following diagram, u_dw_for_data_entry has methods for adding a new record, and for find & replace. u_dw_for_reports has method for sorting the DataWindow.
Later, if you need a DataWindow with adding new record, find & replace as well as sorting features, all you need to do is create one more class by inheriting from one of those two sub-classes u_dw_for_data_entry, u_dw_for_reports and duplicate the code from the other class. This is because, multiple inheritance is not possible in PowerBuilder. What does it mean to us?
The developer (user of your class library) turns on the functionality by using the appropriate class from the hierarchy.
| Home | Previous Lesson: Diadvantages Next Lesson: Service Oriented Class Libraries |