The Final Packaging Structure


Table 30-3 shows the final allocation of classes to components. Table 30-4 contains the metrics spreadsheet. Figure 30-10 shows the final component structure, which uses object factories to bring the concrete components near the main sequence

Table 30-3. Final Allocation of Classes to Components

[View Full Width]

Table 30-4. Metrics Spreadsheet

Component Name

N

A

Ca

Ce

R

H

I

A

D

D'

AbstractTransactions

5

5

13

1

0

0.20

0.07

1

0.05

0.07

Application

1

1

1

0

0

1

0

1

0

0

PayrollApplication

1

0

0

5

0

1

1

0

0

0

PayrollDatabase

1

1

19

5

0

1

0.21

1

0.15

0.21

PayrollDatabase-

Implementation

1

0

0

1

0

1

1

0

0

0

PayrollDomain

5

4

30

0

4

1

0

0.80

0.14

0.20

PayrollFactory

1

1

12

4

0

1

0.25

1

0.18

0.25

PayrollImplementation

14

0

1

5

3

0.29

0.83

0

0.12

0.17

TextParserTransactionSource

1

0

1

3

0

1

0.75

0

0.18

0.25

transactionApplication

3

3

14

1

3

1.33

0.07

1

0.05

0.07

transactionFactory

1

1

3

1

0

1

0.25

1

0.18

0.25

TRansactionImplementation

19

0

1

14

0

0.05

0.93

0

0.05

0.07


Figure 30-10. Final payroll component structure


The metrics on this diagram are heartening. The relational cohesions are all very high, thanks in part to the relationships of the concrete factories to the objects they create, and there are no significant deviations from the main sequence. Thus, the couplings between our components are appropriate to a sane development environment. Our abstract components are closed, reusable, and heavily depended on but have few dependencies of their own. Our concrete components are segregated on the basis of reuse, are heavily dependent on the abstract components, and are not heavily depended on themselves.




Agile Principles, Patterns, and Practices in C#
Agile Principles, Patterns, and Practices in C#
ISBN: 0131857258
EAN: 2147483647
Year: 2006
Pages: 272

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net