Hi,
Our application is developed using Spring framework. Is it good practice to check null condition in all layers (presentation. business, database) ? The flow in our application is
Form submission -> jQuery validator -> Spring validator -> Controller -> Service -> Database
Currently we are checking the parameters for null condition in both Validators, Controller and Service layer. In the controller, service is called only when the parameters are not null, and in the service if the parameters are null we are throwing IllegalArgumentException.
Is the above right design ? Are there any links which suggests such good practices ?