In the first post in this series, we saw how to add a new property to a domain object and specify some choices.
One of the aims of Naked Objects is to ensure that our domain objects are behaviourally-complete: that they encapsulate a coherent set of responsibilities. Not anaemic domain models, but OO like your mother taught you.
So in this screencast we extend the example to add in various validation business rules for a property. We also specify whether the property is enabled, and even if it is visible.


Why did you make CATEGORIES instance constant instead of class constant?
Any Collection have method isEmpty() and I suppose its more clearly to use it instead of “.size > 0″
re: CATEGORIES: Yup, should have been static.
Nice article
[...] http://danhaywood.com/2009/10/16/naked-objects-programming-property-business-rules/ [...]
[...] http://danhaywood.com/2009/10/16/naked-objects-programming-property-business-rules/ [...]