Hi,
I would like know what would be the best practise for implementing data validations for a Type's properties in OOP context within web services?
I have shortlisted the following two approaches:
– Validate the properties in the Type's constructor itself for each overloaded constructor with at least one parameter
– Define a dedicated component/bean/class to separately validate the properties for the particular type that takes an object of the concerned type as parameter and returns a validation result
I am open to other approaches or suggestions as well.
submitted by /u/Historical_Ad4384
[link] [comments]
from Software Development – methodologies, techniques, and tools. Covering Agile, RUP, Waterfall + more! https://ift.tt/j8aIYdx