This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
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
Andy Zhu
Ranch Hand
Joined: May 26, 2004
Posts: 145
posted
0
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
Steve Taiwan
Ranch Hand
Joined: Jul 01, 2003
Posts: 166
posted
0
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.