Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's a component.
Message
 
À
02/11/1999 11:45:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00284554
Message ID:
00285584
Vues:
27
>Tier boundaries are sometimes fuzzy. Lets say you have an edit mask on a field that formats a phone number. You could have a business rule that says "Anytime you have a phone number, it is formatted as ###-###-####." To further complicate things, the mask can be stored in the data dictionary (DBC for VFP data) and you can pull this out at runtime. Which tier does this belong in? You could argue for any of the three. My personal feeling is that it belongs in the UI since it only affects how to see the data.

You mean the mask definition is stored in the front end? Shouldn't it be stored either in the business object or the backend?

A phone business object could both apply the rule to any requests to update the back-end but also expose a GetMask() method that would return the mask to the front-end for UI implementation. The business object could either store the mask as a property or have a encapsulated method to retrieve it from the data dictionary. Would that work?
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform