Hello..
My question is...
In what circumstances would performing data validation be more appropriate in the user interface than a business object?? And vice versa.
Thanx!
;)
Printable View
Hello..
My question is...
In what circumstances would performing data validation be more appropriate in the user interface than a business object?? And vice versa.
Thanx!
;)
Well; if you are creating a system where you need to be able to update the data as fast as possible, for example on a web site, you will want to do validation in the interface itself. If you need the interface to be clean and simple, do the validation elsewhere.
An example of each:
A busy website has a shopping cart system that talks to a database to get information about the items a customer has placed in their cart. In this case, it is important to let the server be available for as many users as possible, so you would want JavaScript or something to validate the page on the user's computer.
A corporation's wireless chat service that allows employees to dial in and "chat" with other employees from their cell phones or handhelds. In this case, the interface (cell phone etc) doesn't have much processing power, so it is important to validate their data on the server.
Hope that makes things clearer.