20.02.2013 Views

Connie's Convenience Store - About Peter Coad

Connie's Convenience Store - About Peter Coad

Connie's Convenience Store - About Peter Coad

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6 Connie’s <strong>Convenience</strong> <strong>Store</strong> Selecting Objects<br />

#25. “Object-Model Components as a Guide” Strategy selecting objects<br />

(model components)<br />

• Use object-model components as a working outline for organizing your search for objects.<br />

• PD: problem domain HI: human interaction<br />

DM: data management SI: system interaction (and NT: not this time).<br />

Each class fits into just one of these model components.<br />

Why use model components? Use them to partition the classes into meaningful,<br />

loosely coupled subsets. Here’s an overview (Figure 1–2) of how it works:<br />

WINDOWS<br />

kslzm lalz o a.kk<br />

alf iekl a;flki klcli a tl<br />

f iksliadj' lkdsfos ek li<br />

akdo l;e;ils kslzm lkfoek lalz o a.kk<br />

aodir lalo alf iekl akdo a;flki gol klcli a tl<br />

tola fo f ejap iksliadj' mane lkdsfos ae ek li<br />

akdo l;e;ils lkfoek<br />

aodir lalo akdo gol<br />

tola fo ejap mane ae<br />

REPORTS<br />

tola jfdoaleokj<br />

s skfo elacnma<br />

afot kamdm z<br />

htislj lsf tola a pao jfdoaleokj<br />

akidl azk s skfo l elacnma<br />

majdio afot akdo kamdm a z<br />

the alid htislj apa lsf to a pao<br />

balon aldoej akidl azk sa l<br />

gamm majdio aoe lweakdo<br />

a<br />

the alid apa to<br />

balon aldoej sa<br />

gamm aoe lwe<br />

HumanInteraction<br />

ProblemDomain<br />

DataManagement<br />

DISK<br />

Files<br />

RDBMS<br />

ODBMS<br />

SystemInteraction<br />

Figure 1–2: Object model components and their interactions.<br />

The problem-domain (PD) component contains the objects that directly correspond<br />

to the problem being modeled. Objects in this component are technology-neutral. They<br />

have little (or no) knowledge about objects in the other components (human interaction,<br />

data management, and system interaction).<br />

The human-interaction (HI) component contains objects that provide an interface<br />

between problem-domain objects and people. In an object model, such objects most<br />

often correspond to specific windows and reports.<br />

The data-management (DM) component contains objects that provide an interface<br />

between problem-domain objects and a database or file-management system. In an object<br />

model, such objects most often correspond to specific problem-domain objects that<br />

need support for persistence and searching.<br />

The system-interaction (SI) component contains objects that provide an interface<br />

between problem-domain objects and other systems or devices. A system-interaction<br />

object encapsulates communication protocol, keeping its companion problem-domain<br />

object free of such low-level, implementation-specific detail.<br />

OTHER SYSTEMS<br />

DEVICES

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!