Submitted by Anonymous on Thu, 01/14/2010 - 23:21.
Get/setters are the most embarrassing part of all classes. Bad, anti-OO part of code. However many programmers think this is "true and valid" encapsulation that provide "true and valid" object oriented applications. In the other hand in many courses, books etc. you could read that getters/setters are icon of encapsulation.
In my opinion validators as you present in this post are good thing that should be solution of getters/setters hell.
Get/setters are the most
Get/setters are the most embarrassing part of all classes. Bad, anti-OO part of code. However many programmers think this is "true and valid" encapsulation that provide "true and valid" object oriented applications. In the other hand in many courses, books etc. you could read that getters/setters are icon of encapsulation.
In my opinion validators as you present in this post are good thing that should be solution of getters/setters hell.
Koziołek
http://koziolekweb.pl