• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Validation of input parameters

 
Lucy Hummel
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,

Which component of client side validates input parameters, like is the input parameter really a String value and if not claims an error to the client?

I am looking forward to your answers

Lucy
 
Bhanu
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would prefer to have the validation in server side component than it is in client. Of course the discussion on this never conclude and optimally that depends purely on your system and its present,future requirements.

This approach has following benefits.

1) All validation rules are built at one single place. So maintainance kind of job woould be easier.
2)All these validations can be reused across for different client types. So is implementation ease.
3) Java is obviously a better language and platform to support any kind of Validation functions than any other language/platform.

So, I normally suggest to have the validation functions in Serverside: in request/command/service specific validation helper classes. Now you can visualize the design.
 
Lucy Hummel
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bhanu,

Your points are quite good. Since many systems have to provide more than one client type, the validation should be put to some java classes that can be reused by the different client types.



Lucy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic