In our application we have different layers. The service level, level and actions of the DAO (location applications).
Data is transferred from one layer to another.
Where should we ideally enter an input confirmation?
Say userid, the phone number comes from the user interface, they are required. Therefore, we are already doing a client-side check.
Now, in my opinion, all you need. No where else should it be checked.
But one of my colleagues claims that if the client makes a request directly. Therefore, we need to add Actions.
Now, in Dao also, the same method is used in some other actions, and tht has no verification.
Or, say, a service level, it can be set as, say, a web service, so you also have validation.
So essentially, He offers ... we have all the validations. That doesn't make sense to me. Its duplication by layer.
What is the ideal approach for this? Let's say a check can be a simple zero check or some kind of complex validation.
Jigar shah
source share