Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vfp vs Vb
Message
 
To
01/11/1999 02:39:52
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00283708
Message ID:
00284771
Views:
25
Walter,

Using your security example, here's how I might construct the inheritence heirarchy;
                  [ Security_base ] - Provides the methods and properties
                           |           that all subclasses will have in common
                           |
         |-----------------|--------------------|
 [ Security_novell ]    [ Security_NT ]  [ Security_win2000 ]

The second level provides the behaviors, they may introduce additional methods and properties that are specific to the implementation.
What this is doing is using inheritence to define the public interface of all security objects. The individula sub classes (all siblings to each other) provide the specific behaviors required by their respective environments.

A different desing that is equally as effective would be;
             ---------------------------------------------     
             |               Security_base               |
             |                                           |
             | [ Novell Behavior Object ]                |
             | [ NT Behavior Object ]                    |
             | [ Win2000 Behavior Object ]               |
             |                                           |
             ---------------------------------------------
In the second example the Security_base is a container that presents an interface to the outside world. It is capable of holding any one or more of the individula beahvior objects and can create them as needed at runtime. The specific behavior opbjects may or may not be subclasses of Security_base, however they are totally concealed from the outside world which only knows about Security_base.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform