Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
N-tier question
Message
From
13/01/2003 05:59:34
 
 
To
10/01/2003 11:49:53
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Miscellaneous
Thread ID:
00740247
Message ID:
00740917
Views:
15
>>Hi
>>
>>In a 3-tier environment, if checking for the presence of empty fields, when a save is called, should the middle-tier validate this, or the presentation-tier?
>>
>>Thanks
>>Kev

>
>I do it in both. We need to ensure data quality, right? Consider the case of a web browser in your example, where everything generally requires a round trip. The user forgets to fill a must-fill field, and presses Submit. Then a round trip to server happens and a long wait, just to be told that you forgot to fill it. These kinds of simple validations I do at the client itself, with some simple JavaScript code to catch the most obvious mistakes.


So why bother with a middle tier?

If you put all your validation into the client, why not save a few bucks and do away with the middle tier and just go for a 2 tier environment?

The whole point of a 3 tier environment is that the presentation layer is interchangeable: either a dedicated front end, or another general purpose tool like excel. Irrepsective of the front end, with a middle tier, the business logic and data validation is respected.

In a decent setup, the data being transferred between the client and the middle tier should be minimal, so why references to a long wait????

Mace
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform