Architectural Styles, Design Patterns, and Objects Robert T. Monroe (Doctoral Candiate) Andrew Kompanek (Research Programmer) Ralph Melton (Graduate Student)

Slides:



Advertisements
Similar presentations
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Advertisements

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
CS590L - Lecture 6 1 CS590L Distributed Component Architecture References: - E. Gamma, R. Helm, R. Johnson, J. Vlissides, Design Patterns: Elements of.
Design Patterns for Object Oriented systems CSC 515 Ashwin Dandwate.
Introduction To System Analysis and Design
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 System models.
05/26/2004www.indyjug.net1 Indy Java User’s Group June Knowledge Services, Inc.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
Design Patterns CS is not simply about programming
Copyright © Active Frameworks, Inc.. - All Rights Reserved - V2.0 Introduction - Page L1-1 PS95&96-MEF-L1-1 Dr. M.E. Fayad Creationa l Paradigm.
Unified Modeling (Part I) Overview of UML & Modeling
James Tam Introduction To Design Patterns You will learn about design techniques that have been successfully applied to different scenarios.
Spring 2010CS 2251 Design Patterns. Spring 2010CS 2252 What is a Design Pattern? "a general reusable solution to a commonly occurring problem in software.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
Architectural Styles, Design Patterns, and Objects Architectural Styles, Design Patterns, and Objects By Robert T. Monroe, Andrew Kompanek, Ralph Melton,
Course Instructor: Aisha Azeem
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Introduction To System Analysis and design
Design Patterns Discussion of pages: xi-11 Sections: Preface, Forward, Chapter
Design Patterns Alan Shalloway, James Trott, Design Patterns Explained, Addison-Wesley, Gamma, Helm, Johnson, Vlissides, Design Patterns, Elements.
Design Patterns Trends and Case Study John Hurst June 2005.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
An Introduction to Software Architecture
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 07. Review Architectural Representation – Using UML – Using ADL.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Introduction To System Analysis and Design
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
Powerpoint Templates Page 1 Powerpoint Templates What is Design Patterns ? by Indriati Teknik Informatika – UB.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 27. Review UML dynamic view – State Diagrams.
Design engineering Vilnius The goal of design engineering is to produce a model that exhibits: firmness – a program should not have bugs that inhibit.
Object-Oriented Design Principles and Patterns. © 2005, James R. Vallino2 How Do You Design? What principles guide you when you create a design? What.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 05. Review Software design methods Design Paradigms Typical Design Trade-offs.
GRASP: Designing Objects with Responsibilities
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
DESIGN PATTERNS CSC532 Adv. Topics in Software Engineering Shirin A. Lakhani.
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
CS 4850: Senior Project Fall 2014 Object-Oriented Design.
ECE450S – Software Engineering II
05/26/2004www.indyjug.net1 Indy Java User’s Group May Knowledge Services, Inc.
Copyright © Active Frameworks Inc. - All Rights Reserved - V2.0Design Pattern Catalog - Page L3-1 PS95&96-MEF-L10-1 Dr. M.E. Fayad Creationa.
Architectural Styles, Design Patterns, and Objects Joe Paulowskey.
CSE 303 – Software Design and Architecture
Design Patterns Introduction
CSIS 4850: CS Senior Project – Spring 2009 CSIS 4850: Senior Project Spring 2009 Object-Oriented Design.
Behavioural Patterns GoF pg Iterator GoF pg. 257 – 271 Memento GoF pg By: Dan Sibbernsen.
Object Design More Design Patterns Object Constraint Language Object Design Specifying Interfaces Review Exam 2 CEN 4010 Class 18 – 11/03.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
Design Patterns CSCE 315 – Programming Studio Spring 2013.
The Object-Oriented Thought Process Chapter 15
Chapter 5:Design Patterns
Software Design Patterns
MPCS – Advanced java Programming
Introduction to Design Patterns
Design Patterns Lecture part 2.
Introduction to Design Patterns
OO Methodology OO Architecture.
Object-Oriented Design
Chapter 5 Designing the Architecture Shari L. Pfleeger Joanne M. Atlee
SYS466 Domain Classes – Part 1.
An Introduction to Software Architecture
DESIGN PATTERNS : Introduction
CS 8532: Advanced Software Engineering
Design Yaodong Bi.
Presentation transcript:

Architectural Styles, Design Patterns, and Objects Robert T. Monroe (Doctoral Candiate) Andrew Kompanek (Research Programmer) Ralph Melton (Graduate Student) David Garlan (Associate Professor) (Carnegie Mellon University) Presented By: Ken Waller EEL 6883 – Software Engineering II

Agenda Review and Present the Paper Gives my Thoughts on the Paper Strengths Weaknesses Suggestions for Improvement Provide more information on Design Patterns Give an Example of a Design Pattern Questions and Comments from the Class But feel free to ask questions during the presentation as well

Paper Overview Introduction Define Software Architecture Design Define Architectural Styles Object-Oriented Design and Software Architecture Define Design Patterns Explore Architectural Styles and Design Patterns

Paper Introduction Goal: Simplify software design by capturing (thus allowing reuse) and exploiting Design Knowledge Two approaches: Architectural Level Gross structure Key issues (system wide): scalability, portability, communication protocols, processing rates, performance Informal (block) diagrams Architectural Styles Object Oriented Level Encapsulate data and behavior Define public interfaces Design Patterns

Software Architecture Phase Occurs after requirements analysis, before detailed design Break the (conceptualized) software system into large grain components (subsystems) Define behavior Define relationships Allocate requirements Several well known Client-server, Layered, Pipes Define modules Processes, dynamic libraries, static libraries

Software Architecture Requirements (from customer) Req 1 Req 2 … Req n Conceptual System Analysis Req 1..i Req i..j Req j..n Arch. Breakdown Subsys. 1 Subsys. 2 Subsys. 3

Software Architecture Design Serves two purposes: Captures Behavioral Abstraction (critical requirements) Describes system’s “Conscience” Guides system evolution How easily can changes be made? How will system integrity be effective by change? “Load Bearing Walls” – Large Grain components or subsystems

Software Architecture Design Concerned with: Structure: Large grain components (subsystems) and their relationships Interaction: Pipes, Client Server, Peer-to- Peer System-wide Properties: Data rates, latencies, behavioral change propagation Suggested simple (1-2 pages) description

Architectural Styles Capture past experiences with Architectural Design (i.e. Client-Server, Pipes, etc.) Formal architectural styles provide their own “language” May be graphical/diagram-based (similar to UML) May be textual based (similar to pseudo-code – Wright architecture description language) Provides: Common Vocabulary of Design Elements (clients, parsers, database) Design Rules/Constraints Semantics System Analysis

Architectural Styles Benefits Design Reuse Code Reuse (may be domain dependant) Communication among colleagues Interoperability System Analysis

Architectural Styles Visual Example: Pipe and filter architecture Easily Conveys the idea Filter 1 may only send data to Filter 2 Filter 2 may only receive data from Filter 1 Filter 1 may not receive data Filter 2 may not send data Pipe is the data transport mechanism Filter 1 (Source) Filter 2 (Sink) Pipe

Object-Oriented Design and Software Architecture Object-Oriented Design can address some issues associated with architecture design Downfall of OO is inability to describe rich interfaces and protocols

Object-Oriented Design and Software Architecture Consider a simple UML class diagram to describe the Pipe and Filter architecture Association between two Filter objects Filter Doesn’t constrain the direction of communication (pipe) (source) (sink) Filter (source)(sink)

Object-Oriented Design and Software Architecture More refined UML class diagram Filters no longer know about each other Filter Pipe Read_from() Write_to() (source) (sink) Filter (source)(sink) Pipe Still cannot ensure proper use (cannot formally specify)

Design Patterns Object Oriented approach Captures designs that require cooperation between multiple objects/classes Make common design solutions explicit Requirements for specifying and reusing: Design domain must be well understood Must support encapsulation of design elements Must have a collection of well-known design idioms (phrases)

Design Patterns for Pipe and Filter Simplicity is lost (vs. Architectural Styles) Still cannot specify all of the constraints Only sink may invoke dequeue Only source may invoke enqueue Source Write_to( ) Sink Read_from( ) Pipe Enqueue() Dequeue() Filter PipeSourceSink

Architectural Styles and Design Patterns Architectural Styles provide their own design language Focus on large grain components Design Patterns utilize UML as the design language Focus on objects Architectural Styles tend to solve system wide problems System wide analysis Design Patterns tend to solve small, specific problems Can easily be translated into code

Paper Summary Architectural Styles are not “better” than Design Patterns Design Patterns are not “better” than Architectural Styles Both appropriate, but at different times Use architectural styles during architectural (top level) design Use design patterns during detailed (subsystem) design Complimentary to one another

My Thoughts on the Paper Strengths Use of Diagrams Good description of Architectural Styles advantages vs. Design Patterns Weaknesses Poor Organization No numbering of sections Ideas spread out across many sections Many phrases used multiple times (Perhaps too many authors?) Not enough on Design Patterns Areas for Improvement Better organization Condense related ideas Incorporate a number system More detail on Design Patters

More on Design Patterns Summerville (in “Software Engineering”, V7) suggests that a Design Patterns Are abstract designs Include algorithms and data types Have four important elements Meaningful Name Problem Description Solution Description (algorithms, data types) Consequences (results and trade-offs)

More on Design Patterns Famous book: “Design Patterns: Elements of Reusable Object-Oriented Software” Serves as a Catalog of Design Patterns Similar to the idea of a Pattern Handbook Divides patterns into three categories Creational: Patterns that govern the creation of objects Structural: Patterns that govern composition of large structures Behavioral: Patterns that assign responsibilities (algorithms) to objects

More on Design Patterns Examples Creational Factory Singleton Structural Adapter Bridge Behavioral Memento Mediator

More on Design Patterns Outline used: Intent: Quick description Also known as: Alternative names Motivation: Background of the problem solved Applicability: Situations Structure: UML class diagrams Participants: Classes/objects used Collaborations: UML sequence diagrams Consequences: Tradeoffs and results Implementation: Language specific issues Sample Code: C++ Code snippets Known Uses: Real world examples Related Patterns: Similar patterns

Example of a Design Pattern: Memento Intent: Capture an objects internal state AKA: Token Motivation: Undo commands Applicability: When an objects internal state may need to be restored later

Example of a Design Pattern: Memento (continued) Structure Originator SetMemento(Memento m) CreateMemento() state Memento GetState() SetState() state Caretaker Participants: Memento: Stores internal state Originator: Creates and uses mementos Caretaker: Manages mementos

Example of a Design Pattern: Memento (continued) Collaborations: CaretakerOriginatorMemento CreateMemento( ) new SetState( ) SetMemento(Memento) GetState( )

Example of a Design Pattern: Memento (continued) Implementations: class Memento { … private: friend class Originator; Memento(); … }; Sample Code: Not covered here Known Uses: Older applications Related Patterns: Command and Iterator

My Experiences with Pattrens Patterns should be regarded as Frameworks Will have to modify to “fit” into your program

Additional References Sommerville, Ian. “Software Engineering Seventh Edition” Section 18.2 “Design Patterns” (pages ) Gamma, Erich; Helm, Richard; Johnson, Ralph; and Vlissides, John. “Design Patterns: Elements of Reusable Object-Oriented Software” Memento Design Patter (pages )

Questions? Comments?

Thank you!