Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
White paper on business objects?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00304694
Message ID:
00306119
Vues:
35
>>
>>PMFJI. Think of designing your classes with absolutely no custom properties, and you'll start seeing what additional parameters you need for your methods. That will buy you stateless objects.
>>Just my .02
>
> I'm not quite sure I follow. Are you saying to use this just as a design aid (if so, I think I understand where you're coming from)? If not, let me just add that there isn't anything inherently wrong with using properties - using them doesn't preclude a stateless design. You just can't depend that they will contain the same values the next time you need to use the object.

Yes, as design aid. Obviously this is not a rule of thumb for all your stateless designs but rather a beginner's tip. Now, you build them as you design them unless there's no design process in place.
There is nothing wrong with using properties for a stateless design, as long as you don't count on your properties being there across method calls, not just the object call.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform