Information générale
Catégorie:
Programmation Orientée Object
Yes, there is a great deal of difference between a method that is intended to be filled in at the subclass level and commonly *overriding* parent method code, which is, I believe, the distinction in what DF is saying.
Indeed if I'm using DODEFAULT (or think I will be) I've started creating the primary method as hidden/private and then putting in a pre/post hook call that he subclass then fills in.
Then the subclass only has access to the method that it's safe to write in.
This is helped me a lot in starting to manage these darned hierarchies.
>This is not always true David. My framework relies heavily on hooked methods that are empty in the class definition, and over half of the code that I write at the instance level is in methods that are empty in the class definition.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement