Naked Objects Programming: Property Business Rules

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.

http://content.screencast.com/users/danhaywood/folders/Jing/media/09e7d9a9-a7ee-4a77-865b-ebee8de6ee38/jingh264player.swf

Advertisement

Posted on October 16, 2009, in apache isis. Bookmark the permalink. 5 Comments.

  1. 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″

  2. re: CATEGORIES: Yup, should have been static.

  3. Nice article

  1. Pingback: Naked Objects Programming: Property Business Rules | Software Development Videos

  2. Pingback: Naked Objects Programming: Property Business Rules | Java™ Software Development Videos and Tutorials Directory

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 109 other followers