Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfp vs Vb
Message
 
À
01/11/1999 02:39:52
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00283708
Message ID:
00284771
Vues:
24
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform