SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS

16
Software Design Pattern & Quality Assurance

description

 

Transcript of SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS

Page 1: SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS

Software Design Pattern & Quality Assurance

Page 2: SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS

In early 90s, Gamma, Helm , Johnson & Vlissides borrowed the idea from architecture and used it in software engineering.

Each pattern describes a problem that occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice. — Christopher Alexander

WHAT ARE DESIGN PATTERNS ?

Page 3: SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS

TYPES OF PATTERNS

• Creational patterns:– Deal with initializing and configuring classes and objects

• Structural patterns:– Deal with decoupling interface and implementation of

classes and objects– Composition of classes or objects

• Behavioural patterns:– Deal with dynamic interactions among societies of classes

and objects– How they distribute responsibility

Page 4: SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS

23 GoF PATTERNS

Page 5: SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS

WHAT TO EXPECT FROM A DESIGN PATTERN?

• A common design vocabulary

• A documentation and learning aid

• An adjunct to existing methods

• A target for refining existing design

Page 6: SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS

APPLICATION OF DESIGN PATTERNS

Page 7: SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS

• Design Patterns have 4 essential characteristics :

1. Pattern name: increases vocabulary of designers2. Problem: intent, context, when to apply3. Solution: UML-like structure, abstract code4. Consequences: results and tradeoffs

ELEMENTS OF SOFTWARE DESIGN PATTERN

Page 8: SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS

ADVANTAGES OF USING DESIGN PATTERNS IN S/W DEVELOPMENT

• Increasing reusability

• Modularization

• Quality

• Consistency b/w design & implementation

• Relationships b/w design & implementation.

Page 9: SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS

SOME RELATED MISCONCEPTIONS

• Design Patterns ARE NOT• Data structures that can be encoded in classes and

reused as is (i.e., linked lists, hash tables)• Complex domain-specific designs

(for an entire application or subsystem)• Rules • Designed to be executed / analyzed by computers• Programming languages

Page 10: SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS

DESIGN PATTERN & QUALITY ASSURANCE

• In practice, measurement of software quality is not easy.

• There is no standard approach for estimating software

design quality by design patterns.

Page 11: SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS

IMPACT ON QUALITY

• With the design patterns, the quality improves, whole architecture of the system becomes more adaptable and extensible.

• Design pattern reusability can be perceived in two ways, (a) reusing the idea of a pattern and (b) reusing the source code of a design pattern instance.

• Developers are not particularly interested in reusing code that applies a pattern more than they are in reusing any code that fulfills their functional needs

Page 12: SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS

QUALITY

• The Five Parameters of Quality• Reliability, Maintainability, Efficiency, Security, and Size

• Software Functional Quality• Bugs, Defects, Mean-Time-To-Failure (MTTF)

• Software Structural Quality

Page 13: SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS

IMPACT ON VARIOUS PARAMETERS

• Structural quality characteristics influencing reusability

Attribute Effect

Coupling -

Cohesion +

Messaging +

Size +

Inheritance -

Complexity -

Page 14: SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS

CONCLUSION

There is no consensus among these studies regarding the impact of design patterns on software quality attributes : while some studies reported a positive or neutral impact , other studies reported a negative effect.

In general, the impact of design patterns on maintainability, evolution and change-proneness is negative.

The best designs will use many design patterns that dovetail and intertwine to produce a greater whole.

Page 15: SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS

REFERENCES

• Apostolos Ampatzoglou, Georgia Frantzeskou, Ioannis Stamelos, A methodology to assess the impact of design patterns on software quality, Information and Software Technology, Volume 54, Issue 4, April 2012, Pages 331-346, ISSN 0950-5849, http://dx.doi.org/10.1016/j.infsof.2011.10.006.

• M. Khaer, M. Hashem, and M. Masud, "An empirical analysis of software systems for measurement of design quality level based on design patterns," in Computer and information technology, 2007. iccit 2007. 10th international conference on, dec. 2007, pp. 1 -6 http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=4579432&tag=1

• Apostolos Ampatzoglou , Apostolos Kritikos, George Kakarontzas, Ioannis Stamelos An empirical investigation on the reusability of design patterns and software packages . http://dl.acm.org/citation.cfm?id=2039844

• Gang of Four Design Patterns 2.0 http://www.dofactory.com/Framework/Framework.aspx

Page 16: SOFTWARE QUALITY ASSURANCE AND DESIGN PATTERNS

QUESTIONS