• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Data Layer Validation

 
Allan Cheong
Ranch Hand
Posts: 71
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

If I were to use the Strategy pattern to validate the fields in the data layer, would you think it is over-design? Having a class for each fields for validation is too much?

Regards,
Allan
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Allan,

I think that is a bit of overhead for this assignment. The only validation I did was checking the size of each String (must be equal or less than the size in the database schema).

Kind regards,
Roel
 
Allan Cheong
Ranch Hand
Posts: 71
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got it. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic