Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating/Writing to object methods at run-time?
Message
 
À
30/04/1999 14:29:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00212771
Message ID:
00214566
Vues:
27
There are some purists out there who think that encapsulation should be adhered to all costs. I guess it depends on your meaning of encapsulation. IMHO, trying to put all of the functionality into the TextBox overloads the class. Yes, you get self-sufficiency, full encapsulation, but at what cost. A big-single class with functionality that is bound within its borders that could be utilitzed in other areas. Also, the class itself will be a bear to maintain. And, with all of the functionality, inheritance could be an issue when attempting to specialize the behavior.

IMHO, collaboration amongst class is the way to go!!!

>Thanks John for your reply.
>
>I am not an OOP pro (like you) and understand the benefits of
>your suggestion.
>
>Creating a hook like you suggested is better design than what I have done
>since the textbox now explicitely call my PopList class and set some
>of its parameters. You suggested that the PopList class itself should
>be doing all the work and I agree.
>
>But should not the textbox behavior be self-contained?
>
>I was trying to make this textbox self-sufficient without having
>to call another class. I can actually create the PopList container
>and its list from inside the textbox object when the developper put
>an SQL statement into its SQLQuery property, but then how do
>I make these objects react as I want.
>
>Is there a way to make it so?
>
>I would really appreciate if you could tell me wether this
>could be done, or even if it should be done that way in a good
>OOP design.
>
>I am still new to OOP and am always looking for improvement
>on my OOP design issues.
>
>Thanks in advance
>
>Pascal
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform