Upload
agnes-bates
View
217
Download
4
Embed Size (px)
Citation preview
Advanced topics in software engineeringAdvanced topics in software engineering CSC532 CSC532
Term Paper Term Paper
Design PatternsDesign Patterns
Harpreet Singh
Submitted By:-
IntroductionIntroduction
What are Design patterns ?What are Design patterns ?
A standard solution to problems in object oriented A standard solution to problems in object oriented
software developmentsoftware development
A well formed language to represent the software designA well formed language to represent the software design
Ready made and Proven solution for some recurring Ready made and Proven solution for some recurring problemsproblems
How did the need for Design Patterns raisedHow did the need for Design Patterns raised
Look at Problem:-Look at Problem:-
Hundred and thousands of Software Projects made each yearHundred and thousands of Software Projects made each year Not all of the Software Development techniques are differentNot all of the Software Development techniques are different Developers don’t invent a new design all the TimeDevelopers don’t invent a new design all the Time A procedure should be present to reuse the existing design work in A procedure should be present to reuse the existing design work in
order to save time and Moneyorder to save time and Money
Solution :-Solution :- DESIGN PATTERNSDESIGN PATTERNS
How are Design Patterns the solutionHow are Design Patterns the solution
Provide ready to use and proven DesignProvide ready to use and proven Design
Represent the expertise of whole community so reduce Represent the expertise of whole community so reduce the chances of problemsthe chances of problems
Help novice developers to learn the process easilyHelp novice developers to learn the process easily
Better quality software is developedBetter quality software is developed
History of Design PatternsHistory of Design Patterns
Term coined byTerm coined by Christopher Alexander Christopher Alexander
He was an Architect and a BuilderHe was an Architect and a Builder
Made the Design Patterns for Buildings Made the Design Patterns for Buildings
Not of much use as only few used it.Not of much use as only few used it.
How were Design patterns used in SoftwareHow were Design patterns used in Software
WWard Cunningham and Kent Back used some of the ideas of ard Cunningham and Kent Back used some of the ideas of
Alexender for User Interface DesignAlexender for User Interface Design
Most significant work done byMost significant work done by :- :-
Erich Gamma, Richard Helm John Vlissides Erich Gamma, Richard Helm John Vlissides
and Ralph Johnson and Ralph Johnson
Wrote the book :-Wrote the book :-
Design Patterns: Elements of Reusable Object-Oriented SoftDesign Patterns: Elements of Reusable Object-Oriented Softwareware
popularly called popularly called “ Gang Of Four ”“ Gang Of Four ”
Classification ofClassification of Design PatternsDesign Patterns
Design Pattern Classification
Purpose Scope
Creational Structural Behavioral
Class Object
PurposePurpose
What the pattern will do or has done in the pastWhat the pattern will do or has done in the past
Creational StructuralCreational Structural BehavioralBehavioral
Scope Scope Where the pattern would be appliedWhere the pattern would be applied
ClassClass ObjectsObjects
Creational Creational
Deals with object creation mechanismDeals with object creation mechanism
Structural Structural
Identifies ways to realize relationships between the Identifies ways to realize relationships between the entities that are used in the software developmententities that are used in the software development
BehavioralBehavioral
identify common communication patterns between the identify common communication patterns between the objectsobjects
ClassClass
Patterns mainly deal with relationships between classes and Patterns mainly deal with relationships between classes and their subclasses. their subclasses.
Static as they are established through inheritanceStatic as they are established through inheritance..
ObjectObject
Patterns in this category deal with object relationships . Patterns in this category deal with object relationships .
Relationships are dynamic in nature and can be changed at Relationships are dynamic in nature and can be changed at
runtimeruntime
Documenting the Design PatternsDocumenting the Design Patterns
One of the toughest taskOne of the toughest task
Should provide fact and complete information Should provide fact and complete information about the problem and its Domainabout the problem and its Domain
Should help users to investigate existing system Should help users to investigate existing system and customize it to fit users needs and customize it to fit users needs
Characteristics of DocumentationCharacteristics of Documentation
Pattern name and classificationPattern name and classification
IntentIntent MotivationMotivation Applicability Applicability StructureStructure ParticipantsParticipants Implementation Implementation Known usKnown usee
Related patternsRelated patterns
Critique of Design PatternsCritique of Design Patterns
Don’t always provide the relevant solutionDon’t always provide the relevant solution
Experiments performed on OBSERVER, COMPOSITE, Experiments performed on OBSERVER, COMPOSITE,
VISITOR are examplesVISITOR are examples
Need only arises due to insufficient AbstractionNeed only arises due to insufficient Abstraction
Complicate the problems even more in some situationsComplicate the problems even more in some situations
ConclusionConclusion
Design patterns are very useful as they provide ready Design patterns are very useful as they provide ready to use and proven solutions that speed up to use and proven solutions that speed up development and improve software qualitydevelopment and improve software quality
They do have limitations and negative points but their They do have limitations and negative points but their benefits overpower the limitationsbenefits overpower the limitations
Unless there is clear need to use simpler solutions the Unless there is clear need to use simpler solutions the design patterns should be used as they provide more design patterns should be used as they provide more flexibilityflexibility
ReferencesReferences 1.1. Formal specification of design patterns: a comparisonFormal specification of design patterns: a comparison
Taibi, T.; Ling, D.N.C.;Taibi, T.; Ling, D.N.C.;
2.2. Evolutionary patterns of design and design patternsEvolutionary patterns of design and design patternsAoyama, M.;Aoyama, M.;
3.3. Precise modeling of design patterns in UMLPrecise modeling of design patterns in UMLMak, J.K.H.; Choy, C.S.T.; Lun, D.P.K.;Mak, J.K.H.; Choy, C.S.T.; Lun, D.P.K.;
4.4. Instantiating and detecting design patterns: putting bits and pieces togetherInstantiating and detecting design patterns: putting bits and pieces togetherAlbin-Amiot, H.; Cointe, P.; Gueheneuc, Y.-G.; Jussien, N.;Albin-Amiot, H.; Cointe, P.; Gueheneuc, Y.-G.; Jussien, N.;
5.5. Design patterns-essentials, experience, Java case studyDesign patterns-essentials, experience, Java case studyPree, W.; Sikora, H.;Pree, W.; Sikora, H.;
6.6. A controlled experiment in maintenance: comparing design patterns to simpler A controlled experiment in maintenance: comparing design patterns to simpler solutionssolutionsPrechelt, L.; Unger, B.; Tichy, W.F.; Brossler, P.; Votta, L.G.;Prechelt, L.; Unger, B.; Tichy, W.F.; Brossler, P.; Votta, L.G.;
7.7. Precise specification and automatic application of design patternsPrecise specification and automatic application of design patternsEden, A.H.; Yehudai, A.; Gil, J.;Eden, A.H.; Yehudai, A.; Gil, J.;
Thank youThank you
Any Questions ????Any Questions ????