Connie's Convenience Store - About Peter Coad
Connie's Convenience Store - About Peter Coad
Connie's Convenience Store - About Peter Coad
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Selecting Problem-Domain Objects Connie’s <strong>Convenience</strong> <strong>Store</strong> 11<br />
<strong>About</strong> class names:<br />
#38. “Use the Domain Vocabulary” Strategy selecting objects (names)<br />
• Use the domain vocabulary.<br />
• Encourage domain experts to eliminate names of things that aren’t their own.<br />
• Don’t put words in your domain expert’s mouth.<br />
• Don’t change the vocabulary unless the domain expert feels the need to do so.<br />
• Don’t change the domain vocabulary—unless your domain experts choose to change<br />
their own vocabulary.<br />
<strong>About</strong> the class-with-objects symbol: the bold inner-rounded rectangle represents a<br />
class; the outer-rounded rectangle represents one or more objects in a class. The class<br />
name goes in the top section; attributes go in the middle; services go in the bottom.<br />
Select places<br />
#15. “Select Places” Strategy selecting objects (pattern players)<br />
• Look for places where things come to rest, places that contain other objects.<br />
• Examples: airport, assembly-line, bank, clinic, depot, garage, geographic entity, hangar,<br />
hospital, manufacturing site, plant, region, sales outlet, service center, shelf, station,<br />
store, warehouse, zone.<br />
What places are important?<br />
Here’s what to look for. Look for places where things come to rest. And look for<br />
places that hold or contain other objects.<br />
At Connie’s, that sounds a lot like:<br />
– store<br />
– shelf.<br />
Both of these classes are in the problem domain. So far, so good.<br />
#42. “System Responsibility” Strategy selecting objects (consider and challenge)<br />
• Is the object something that your system is responsible to know or do anything about?<br />
• If not, put it in the “not this time” model component.