Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Access and Assign vs. OOSE
Message
 
À
27/10/1998 10:05:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00149911
Message ID:
00150961
Vues:
44
>Hi again Rox ---
>
>:-)
>
>I love this thread.
>
>I initially questioned how Access and Assign fit into pure OOP but then I did some research and found more of less the same "questionable" language constructs in every single OOP or object-based language I looked at.
>
>Also, as others have pointed out, Access and Assign allow you to *prevent* direct manipulation of the properties of an object by another object by trapping the calls so maybe they *are* inline with pure OOP.

(I love this thread too)
And I agree, _Access and _Access, *IF* used correctly, can be used to prevent direct manipulation. But my point was that using them correctly in regards to OOP theory is up to the developer. There is nothing in these constructs that would prevent us from using them to do the exact opposite. For example, I could have an _Assign on an Employee ID field that goes out and changes the properties of my Payroll Business Object and my User Security object once a new Employee ID is validated and accepted. Now if I don't setup similar _Assigns on those properties in my other objects, I'm still not circumventing direct manipulation.

All-in-all John I think you've shown us a valuable lesson with this thread. As technology gives us more perks and cool stuff to aide development, we should always take time to reflect on established OOP/OOSE theories before rushing to use the new stuff just to 'be cool' if you will, and see how the new perk fits into the bigger picture before we find ourselves looking backwards on a completed project and paying homage to the gods of hindsight with a mantra such as "Well, I could of done that better..."

It's easy enough to lead the horse to water, and with effort and dedication you can even make him drink. But who is to say the horse will drink in a politically correct fashion if you don't take the time to train him (or beat it into his/her head) what politically correct means. :) (ok, time for the third cup)
Roxanne M. Seibert
Independent Consultant, VFP MCP

Code Monkey Like Fritos
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform