(Design Pattern)
a b a 64 [email protected] b 64 [email protected] CK Metrics 1:1(Design Pattern) (Software Complexity) (Complexity
Metrics) CK Metrics
1.
(design pattern) (application framework)
(Booch 1994)
Ralf Reißing State Pattern CK Metrics
(Ralf Reißing 2001) (State
Pattern) 1:1
2.
2.1.
Gamma, Johnson, Helm and Vlissides (1995)( Gof )
(Context) (Problen) (Solution) Gof(1995) (1) (2) (3) (4)
2.2.
Metapattern
(Pree 1994) (Solution) (1)(Template Method) (Hook Method)
(Template Class) (Hook Class)
(Delegation)
Template-Hook (2) (Unification Metapattern) (Connection Metapattern) Unification Pattern (Override) Gof 23 (Template Pattern) 1:1 1:N 1:1
Connection Pattern 1:N Connection Pattern 1:1
1:N (Runtime)
Gof 23 (Strategy Pattern) 1:1
(Recursive)
1:1 Recursive Connection Pattern 1:N Recursive Connection Pattern
Pree 1994
2.3.
Basili(1980) (a system) (Joseph K 1986) CK Metrics(Chidamber 1986)2.4. CK Metrics
CK Metrics Shyam R. Chidamber Chris F. Kemerer(1994) (1) Weighted Methods per Class (WMC)
(2) Depth of the Inheritance Tree (DIT) Root
(3) Number of Childern (NOC)
(4) Coupling Between Object classes(CBO)
(Dependency Relation) (5) Response for a Class (RFC)
(6) Lack of Cohesion of Methods (LCOM) Instance Variable
(method-pair) Instance Variable
3.
3.1.
CK Metrics CK Metrics
Steven John Metsker(2002)
Design Patterns Java Workbook Martin Fowler(1999) Refactoring Imporving
the Design of Existing Code CIF tHUB
3.2.
CIF tHUB CIF Portal CIF 1. 2. IBM MQ Series ( ) 3. CIF tHUBtHUB tHUB tAdapter tHUB
tHUB
tAdapter (
2. tAdapter 3. 4. tAdapter 5. tHUB
3.3.
Gof(1995) CIF Portlet (Action)Portlet Portlet doActionEvent if-else
Protlet CIF Portlet Portlet Gof(1995) tHUB 3.3-2 Assignment DateT2C( ) StringFilter( ) XML Converter XML
Conveter XML Conveter 1 1 CIF Portlet-Command CIF 2001 tHUB tHUB 2001
tHUB
tHUB 2001
3.4.
CIF CIF
CIF
Portlet doActionEvent doActionEvent
CIF
tHUB Steven John Metsker(2002)
Design Patterns Java Workbook
if-else
Martin Fowler Refactoring Imporving the
Design of Existing Code
Movie getPrice
if-else attrMap
tHUB
3.5.
CK Metrics WMC
McCabe(1976) Cyclomatic Complexity WMC
Cyclomatic Complexity (binary decision) +1
n-way n-1
if-else
McCabe Cyclomatic Complexity WMC
4. CK Metrics
4.1. CK Metrics
CIF A B CK Metrics IndiOpenController B A CBO RFC Metrics CK Metrics IndiOpenController B B A CK Metrics A tHUB A B CK Metrics Converter B CBO RFC A B A CK MetricsWMC DIT NOC CBO RFC LCOM
IndiOpenController 2 7 1 1 0 0 1 0 3 2 0 0 PortletCommand 1 0 5 0 1 0 CustomerEditCommand 1 1 0 0 1 0 CustomerViewCommand 1 1 0 0 1 0 CustomerSaveCommand 1 1 0 0 1 0 BankEditCommand 1 1 0 0 1 0 FundEditCommand 1 1 0 0 1 0 SUM 8 7 6 1 5 0 1 0 9 2 0 0 CIF CK Metrics A B A B A B A B A B A B Converter MapStrategy AssignmentStrategy DateT2CStrategy StringFilterStrategy SUM CIF CK Metrics
4.2.
CK Metrics 1 1 if-else CBO RFC 1 1 CBO RFC if-else (Method) Cyclomatic Complexity WMC 1 DIT NOC RFCRFC 1 1 (1) CBO RFC (2) RFC (3) WMC (4) DIT NOC WMC DIT
NOC CBO RFC LCOM
1 1
CK Metrics
WMC 1 WMC
Cyclomatic Complexity
DIT NOC DIT NOC 1
CBO CBO 1 RFC 1 1 RFC 1 (1) WMC =1 (2) DIT = (3) NOC = (4) CBO =1 (5) RFC =2+
5.
CK Metrics CK Metrics 1 1 CK Metrics (1) CBO RFC(2) RFC (3) WMC (4) DIT NOC (1) WMC =1 (2) DIT = (3) NOC = (4) CBO =1 (5) RFC =2+ CK Metrics (1) 1 1 (2)
1. 2002 Design Patterns Java
2. Gamma Johnson Helm Vlissides 2001
1. Booch,G. (1994), Object-Oriented Analysis and Design with Applications, second ed. Redwood City, Calif.: Benjamin/Cummings
2. Chidamber, S.; Kemerer, C (1994), A Metrics Suite for Object Oriented Design. IEEE Transactions on Software Engineering, 20(6), 1994, 476-493.
3. Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides, (1993), Design Patterns:
Abstraction and Reuse of Object-Oriented Design, ECOOP ’93 Conference Proceedings,
Springer-Verlag Lecture Notes in Computer Science.
29, Nov.
5. Steven John Metsker, (2002), Design Patterns Java Workbook, Addison Wesley
6. Fowler, M.; Beck, K.; Brant, J.; Opdyke,W.; Roberts, D., (1999), Refactoring Imporving
the Design of Existing Code, Addison Wesley
7. Ralf Reißing, (2001), The Impact of Pattern Use on Design Quality, OOPSLA 2001 Workshop,
8. Stephen H. Kan, (2003), Metrics and Models in Software Quality Engineering Second
Edition
9. Wolfgang Pree, (1994), Meta Patterns—A Means For Capturing the Essentials of