Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What Tier Has Responsibility
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00716526
Message ID:
00716556
Views:
16
>>In a 3-Tier plan, what tier would have the reponsibility to ensure that fields are entered/modified/queried at the correct size. So lets say I have a UserName field. Is the presentation layer responsible for ensuring that it is 18 characters max or is it the middle layers job to ensure that what is passed to it does not go over the max and report an error if it does. If it is the Presentation layer's job, then should it call a middle layer function to find the size of all fields before presentation.
>>
>>Any thoughts or discussion welcomed.
>
>Hi Bret
>
>IMO, the ultimate responsibility lays on the middle tier; it should not allow invalid entries no matter how dummy the presentation tier (or its developer!) is.
>But, as you don't want the user to fill a complete form and then get it rejected because field #27 is to long.. you 'd probably want to duplicate the validation on the front tier, just as an "early notice".
>
>If you want strict compliance of the "defined once" rule, the front-end can query the middle tier for all field sizes, etc. However, this kind of information is usually duplicated for practical purposes (avoid extra trips to the server, and simplify development)
>
>Any disagreeing opinion is welcomed.
>Regards,

Thanks for the reply. My problem with 3-Tier is the strict non-dupliating rule. I don't know if I break the rules if I add size code to my presentation layer and also to my middle layer. I want to do the best I can for this project and to get as close to a 3-tier app as I can. So I want to avoid pitfalls if possible.
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform