newbie question, MY classes in the hierarchy 
Author Message
 newbie question, MY classes in the hierarchy

This is a question about style and general practice in placing an application's
classes in the hierarchy.  (ST/V here).

It seems that very often, most or all of a project's domain classes are
subclasses of Object.  Is it reasonable to try to group these under a single
Abstract Class (prossibly containing no instance or class vars and no methods)
just for the convenience of keeping them together in the browser's class pane
and to be able to FileOut the whole package with one operation?

For Example:

Object
 AnApplication \
  AppClass1     \
  AppClass2      >  My application's domain classes (or most of them)
     .          /
     .         /
 AnimatedObject
 Behavior



Wed, 13 Aug 1997 04:29:24 GMT  
 newbie question, MY classes in the hierarchy

Quote:
>It seems that very often, most or all of a project's domain classes are
>subclasses of Object.  Is it reasonable to try to group these under a single
>Abstract Class (prossibly containing no instance or class vars and no methods)
>just for the convenience of keeping them together in the browser's class pane
>and to be able to FileOut the whole package with one operation?

Yes, though not for the reasons you mention.  I handle the organizational
stuff with application browsers, which let you look at the classes and
methods that belong to a specific application.  These tools also permit
filing out applications as a unit.

Ask around for recommendations; there are many of these tools.

Nonetheless, I favor collecting application specific classes under common
root classes (frequently there are several -- there are several popular
superclasses).  Frequently, I find that I'd like to add common behavior
to all my application classes.

These classes typically apply to all applications.

For example, ParcPlace's VW wants you to inherit from ApplicationModel.
Instead, I inherit from my own ApplicationModel subclass, which can
provide extended services to all my applications.

-dms



Sat, 16 Aug 1997 01:50:19 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Class hierarchy design question

2. Question: Querying Class Hierarchies

3. How to print class hierarchy diagram?

4. Class hierarchy

5. Enfin class hierarchy

6. The ABC Class Hierarchy

7. VAST Record Class Generator, OSObject hierarchy, and C structs

8. Toward a new class hierarchy for numerics

9. Cheapest Class Hierarchy Browser

10. dynamic class hierarchies, dynamic changes to multimethods ?

11. On the Structure of a Class Hierarchy

12. Translating C++ class hierarchies to Eiffel

 

 
Powered by phpBB® Forum Software