(responding to Eric)
> Something strange has happened with Bar Bet #5 -- nobody has come up > with an answer that has clinched the matter for me. On previous > questions, somebody fairly quickly said something that made such good > sense that I just had to hand over the beer. > > Bar Bet #5 is that, when you use boundary, entity, and control classes, > the controls should contain the business rules. > > I have confessed to taking the affirmative, based on finding an analogy > between 3-tier architecture and the three stereotypes (boundary, entity, > control). > > The question seems to hinge on finding one useful, true relationship in > all three statements of the analogy, something like: > > Boundary objects comprise the Graphical User Interface as > Control objects comprise the Business Object Model as > Entity objects comprise the Relational DataBase. > > The first statement is true. > The second statement is indeterminate. > The third statement is clearly false. > > I don't think that I can provide a relationship that fits, so my > original proposition falls. (I can be saved if somebody can think of > one useful, true relationship.) > > This reasoning is based on people's responses more than it may appear to > be. There are various problems associated with the bar bet. One of these is that different people have different things in mind when they think of Business Rules. I tend to think of rules inherent in the domain - let's call these 'Domain Rules'. OTOH, other people think of more transient rules - these are how we currently intend to engage in business. These rules apply today, but may change tomorrow. I think the more permanent the rule, the more likely it belongs with the entity object. The more transient the rule, the more likely it belongs elsewhere - though not necessarily in a controller object. I suspect the underlying problem we have with this bar bet is that there isn't any clear cut right answer - it just depends... I was trying to think of an example that might illustrate my point, as usual I don't think I'll hit the perfect example until just after I post this one - so bear with me... It's (for the sake of argument) a permanent Domain rule about Orders that they're not done with until they're delivered to the customer. (okay, there are a load of 'if's and 'but's - let's leave them aside). This sort of rule I'd be happy to build into the entity object, probably as a state machine transition. Now it may be a current business rule that we don't deliver an order until it's complete. Tomorrow, that business rule may change and allow us to deliver an order in batches. These are alternate approaches, and I'd try not to build such a 'business rule' into the entity objects of my system. > So. I am sending virtual beers to everyone who disagreed with me in the > first place. That is, Oldfield, Baynes, Kesterton and Dunnevant. > > Maybe I should cook these questions more before I ship them. Question - do you feel that "It depends" is not an acceptable answer? I'll accept the virtual beer anyway, but would like to think it's been well earned. Paul Oldfield ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ www.aptprocess.com any opinions expressed herein are not necessarily those of Mentors of Cally or the Appropriate Process Movement ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ************************************************************************ * Rose Forum is a public venue for ideas and discussions. * For technical support, visit http://www.rational.com/support * * Post or Reply to: [EMAIL PROTECTED] * Subscription Requests: [EMAIL PROTECTED] * Archive of messages: * http://www.rational.com/support/usergroups/rose/rose_forum.jsp * Other Requests: [EMAIL PROTECTED] * * To unsubscribe from the list, please send email * To: [EMAIL PROTECTED] * Subject: <BLANK> * Body: unsubscribe rose_forum *************************************************************************
