H
headware
I realize that when making a web application, performing input
validation in the browser is good because it prevents postbacks.
However, input checking that goes beyond making sure a value exists or
that it's not alphabetic when it's supposed to be numeric is arguably
best left to the business tier code on the server where there is
access to other data.
My questions, is what's the best way to communicate complicated error
checking failures? I was thinking that it would be to throw exceptions
from the business tier to the GUI tier. However, I'm reading that
maybe that's not the right way to go. Most people feel that exceptions
are slow and should only be used in situations in which the program
could be relatively easily tripped up by forces outside of its control
(like when trying to access a file that the user might have deleted).
So if exceptions are not a good way to go, what's the best way to move
input validation errors between the business and presentation tiers?
How about simply creating and object containing a list of error
messages and have the GUI display them? That's essentially what I was
thinking the exceptions would do.
Dave
validation in the browser is good because it prevents postbacks.
However, input checking that goes beyond making sure a value exists or
that it's not alphabetic when it's supposed to be numeric is arguably
best left to the business tier code on the server where there is
access to other data.
My questions, is what's the best way to communicate complicated error
checking failures? I was thinking that it would be to throw exceptions
from the business tier to the GUI tier. However, I'm reading that
maybe that's not the right way to go. Most people feel that exceptions
are slow and should only be used in situations in which the program
could be relatively easily tripped up by forces outside of its control
(like when trying to access a file that the user might have deleted).
So if exceptions are not a good way to go, what's the best way to move
input validation errors between the business and presentation tiers?
How about simply creating and object containing a list of error
messages and have the GUI display them? That's essentially what I was
thinking the exceptions would do.
Dave