Thursday, October 8, 2009

Validation


Need for validation: Simple, Garbage In- Garbage Out.

Where will you validate? Typically, the calculate button click event should have the following 3 steps.
1. Move form objects into variables
2. Processing or calculation
3. Move contents of output variable into form objects


Knowing that the computer executes code sequentially, where would you want to place the code that validates what the user keys in.
1.After you display the output to the user?
2.After Processing but before display the output to the user?
3.Before you start processing?

Thoughts? Comments?

No comments:

Post a Comment