Hi Guys I was going to do my validation between the gui and the call to the Data interface. My problem is if sun are going to run tests automatically with the data interface supplied in the exam then none of this validation with be run. In effect I am using the Data interface as a interface to the database file and I have a application layer(run in the same vm as the gui). It is in this application layer that I wish to do my validation
Joined: May 26, 2004
IHMO, it is no hurt to validate in both client and server side, no matter which client type, thin or fat, you choose to implement. In this case, it won't affect your program when sun runs its gui front against your db server.
David, IMO, data validation belongs to the model layer of the application. So that, the model layer can be reusable and is not tight to its view. However, adding another validation mechanism in the view layer is helpful to not waste resources (ex. network bandwidth, and database resources). If you have time, then do it twice in the model and the view, and if you don't have time, do it in the model layer only.
SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
Joined: Jul 01, 2003
In my experience, when I design J2EE project, I always use java script to validate data before sending them back to server. If the validation happens in server, client has to wait and server has to waste resource for processing useless data. Therefore, in the real world, I will validate data both in client and server side. Not in either client or server side. In my project, I will validate data both in client and server side.