In a
recent posting, I looked at how it could be useful to model some of your business objects as state machines. In this posting I wanted to do a thought experiment about how you could build the concept of state right into a business object so you would be able to declaratively describe states and then the object would be smart enough to provide the appropriate attributes, validations and methods automatically, throwing an error should you try to access/modify information or undertake an action which was not valid in the object's current state . . .
[More]