Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
Lecture 13 - Thursday October 28 2010.
Material and some slide content from:- GoF Design Patterns Book
Design Patterns #3 &MidTerm ReviewReid Holmes
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
GoF design patternsDesign Patterns!"#$%&'()*$+,--&.*'
/.&,-("*,0 1-.23-2.,0 4&5,6(".,0
#,3-".7$8&-5"9
:;'-.,3-$#,3-".7
42(09&.
+."-"-7<&
1(*)0&-"*
:9,<-".$=$30,''
4.(9)&
/"><"'(-&
%&3".,-".
#,3,9&
:9,<-".=";?&3-
#07@&()5-
+."A7
B*-&.<.&-&.
/5,(*$"C$.&'<"*'(;(0(-7
/">>,*9
B-&.,-".
8&9(,-".
D&><0,-&$8&-5"9
8&>&*-"
E;'&.6&.
1-,-&
1-.,-&)7
F('(-".
30,''
";?&3-
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
MidTerm Review‣ Intended Learning Outcomes:‣ “Critique an existing architecture or design.”‣ “Differentiate how various architectural styles and
design patterns enhance and degrade functional-and non-functional properties.”
‣ “Generate and justify and architecture and/or design given a collection of requirements.”
‣ “Produce and present concise and unambiguous architecture and design descriptions.”
‣ “Create and implement an architecture and design, refining it into a complete system.”
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
ILO 1: Critique‣ “Critique an existing architecture or design.”‣ So what is architecture?
‣
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
ILO 1: Critique‣ “Critique an existing architecture or design.”‣ Why is architecting software hard?
‣ What has improved complexity?
‣
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
ILO 1: Critique‣ “Critique an existing architecture or design.”‣ Example:
‣ Given GWTs architecture, what is one benefit of 2nd generation web apps compared to GWT-based web-apps?
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
ILO 2: Differentiate‣ “Differentiate how various architectural styles and
design patterns enhance and degrade functional-and non-functional properties.”
‣ What is an architectural style?
‣ What is a design pattern?
‣
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
ILO 2: Differentiate‣ “Differentiate how various architectural styles and
design patterns enhance and degrade functional-and non-functional properties.”
‣ Abstraction:
‣ Separation of concerns:‣
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
ILO 2: Differentiate‣ “Differentiate how various architectural styles and
design patterns enhance and degrade functional-and non-functional properties.”
‣ FPs: ‣ NFPs:
‣ Covered Styles: client-server, main / subroutine, OO, VM, layered, batch-sequential, pipe & filter, rule-based, blackboard, event-based, publish / subscribe, interpreter, mobile code, peer to peer.
‣ Covered Patterns: singleton, abstract factory, builder, proxy, facade, decorator, composite, visitor.
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
ILO 2: Differentiate‣ “Differentiate how various architectural styles and
design patterns enhance and degrade functional-and non-functional properties.”
‣ Security:
‣ Security Arch Principles: ‣
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
ILO 3: Generate and Justify‣ “Generate and justify and architecture and/or
design given a collection of requirements.”
‣ Analysis vs design:
‣ Example: Apply your knowledge of architectural styles to architect a system that allows users to dynamically enter text commands that the system will then carry out. Provide a component diagram. Justify your selection of architectural style.
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
ILO 3: Generate and Justify‣ “Generate and justify and architecture and/or
design given a collection of requirements.”
‣ Example: ‣ DatabaseLayer layer = DatabaseLayer.getInstance();‣ What design pattern is being demonstrated above. Why is
this pattern used? What visibility is applied to constructors in this pattern? Why?
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
ILO 4: Produce and Present‣ “Produce and present concise and unambiguous
architecture and design descriptions.”‣ Alternative views:
‣
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
ILO 4: Produce and Present‣ “Produce and present concise and unambiguous
architecture and design descriptions.”‣ Example: ‣ - Create a component diagram for an event-based
system that has a Producer component and a Consumer component connected to an event bus.
‣
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
ILO 5: Create and Implement‣ “Create and implement an architecture and
design, refining it into a complete system.”
‣ This is really about the project.