Software Engineering I (02161)

Size: px
Start display at page:

Download "Software Engineering I (02161)"

Transcription

1 Software Engineering I (02161) Week 7 Assoc. Prof. Hubert Baumeister Informatics and Mathematical Modelling Technical University of Denmark Spring 2011 c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

2 Recap Recap State Machines Good for representing that behaviour is changed as a reaction to events: Implementation using the state pattern (a Design Pattern) based on distributed control Layered Architecture Layers have their own set of responsibilities: e.g. Presentation, Application, Domain, and Database/Infrastructer layer Interface between layers is small Easy to exchange layer Separation between Presentation and Application layer allows to test application logic c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

3 Layered Architecture: Persistence Layer Layered Architecture: Persistency Layer for the library application Presentation Layer Application Layer LibraryApp Persistency Layer LibraryUI PersistentObject Medium User Book Cd PersistencyLayer For simplicity: Data (User and Medium) is stored in two files users.txt and media.txt; address has no file A book dtu.library.app.book b01 some book author some book title Mar 13, 2011 <empty line> A user dtu.library.app.user cpr-number Some Name a@b.dk Kongevejen 2120 København b01 c01 <empty line> c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

4 Layered Architecture: Persistence Layer Persistency Layer LibraryApp PersistencyLayer... cleardatabase() createmedium(m:medium) createuser(u:user) readmedium(sig:string):medium readuser(cpr:string):user updatemedium(m:medium) updateuser(m:user) deletemedium(sig:string) deleteuser(cpr:string) getusers(): List<User> getmedia(): List<Medium>... 1 key:string key:string cache_users 0..1 cache_media 0..1 PersistentObject storeon(out:printwriter) getkey():string User getkey():string storeon(out:printwriter) readfromreader(r:buff.read. ol:persistencylayer) borrowedmedia * Medium getkey():string storeon(out:printwriter) readfromreader(r:buff.read. ol:persistencylayer) { return getcprnumber(); } { return getsignature(); } c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

5 Layered Architecture: Persistence Layer Layered Architecture: Persistency Layer for the library application PersistencyLayer cache_users cahce_medium cleardatabase() createmedium(m:medium) createuser(u:user) readmedium(sig:string):medium readuser(cpr:string):user updatemedium(m:medium) updateuser(m:user) deletemedium(sig:string) deleteuser(cpr:string) getusers(): List<User> getmedia(): List<Medium>... CRUD: Create, Read, Update, Delete: typical database operations cleardatabase: removes the two files users.txt and media.txt createmedium/user: appends a new record to the corresponding file readmedium/user: go sequentially through the files, reads the object and returns it if the key matches updatemedium/user: copy all entries in a new file; replace the old entry with the new entry on copying; rename the new file to the old file deletemedium/user: The same as updatemedium/user, the difference is that the object to delete is not copied getusers/media c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

6 Layered Architecture: Persistence Layer Reading/Writing User and Media objects PersistentObject storeon(out:printwriter) getkey():string User Medium getkey():string borrowedmedia * getkey():string storeon(out:printwriter) storeon(out:printwriter) readfromreader(r:buff.read. readfromreader(r:buff.read. ol:persistencylayer) ol:persistencylayer) readfrom(r:buff.read. ol:persistencylayer):user Book Cd readfrom(r:buff.read., readfrom(r:buff.read., pl:persistencylayer):book pl:persistencylayer):cd storeon writes a representation of the object on a writer readfrom is a static method that creates a new object from a read; it creates the object and delegates the initialisation to the object itself: i.e. User u = new User(); u.readfromreader(reader,pl); return u; readfromreader reads the state of an object from a reader Note that the user needs the PersistencyLayer to get from it the borrowed books based on their signatures c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

7 Layered Architecture: Persistence Layer Use of Files Writing to files: Second argument to FileWriter constructor: if true, this means append to the file if the file exists, false means, replace the file if the file exists FileWriter fw = new FileWriter(filename, true); PrintWriter out = new PrintWriter(fw); out.println("some line"); out.print("some string without new lline"); Reading from files FileReader fr = new FileReader(filename); BufferedReader in = new BufferedReader(fr); String line - in.readline(); Deleting and renaming files File f = new File(filename); f.delete(); f.renameto(new File(new_filename)); c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

8 Issues Layered Architecture: Persistence Layer readmedium/user should return the same object if called twice with the same key use a cache of media/users and return the object in the cache if it exists The cache maps keys to persistent objects, i.e., Map<String,PersistentObject> cache Note: the cache needs also to work together with the add and delete operations updatemedium/user needs to be called whenever the state of a user/media changes (e.g. through borrowing and returning media) Don t forget to create tests for that c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

9 Tasks Layered Architecture: Persistence Layer 1) Implement the persistency layer as described (based on the provided tests) Note: Don t implement the class diagram directly; instead implement parts of the diagram as necessary to so that the test pass The diagram describes the final state to be achieved using TDD Challenge: the CRUD operations for users are similar to those for media. Actually, they can be implemented for all instances of PersistentObject DRY principle 2) Connect the persistency layer with the library application a) Change the library application code to use the persistency layer This requires to add throws clauses to some of the methods of library application b) Adapt the tests as necessary Note that most tests require now to have the database cleared before the tests can start (using PersistencyLayer.clearDatabase()) c) Add additional tests to make sure that the database is updated when, e.g. books are borrowed or returned. c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

10 Architecture Architectural Design Identify the main structural components of the system Usually done after the requirements as a first design step Outcome is an architectural model or metaphor (XP) Example: Packing robot control system c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

11 Architecture Overlap Requirements Engineering and Architectural Design Ideally: System specification should not include design information Reality: For complex system the system specification will come with a structure Also: Requirements may state architectural requirements: e.g. application should run on the Web, mobile phone, desktop,... Requirements engineering may already yield a coarse system architecture c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

12 Architecture Software architecture Importance: It influences performance, robustness, distributability, and maintainability Functional requirements are implemented by the components Non-functional requirements depend on the architecture Advantage of an explicit system architecture 1) Manage the complexity of the system and development task 2) Communication with stakeholders 3) Allows to analyse the system according to emergent properties (like performance, security, safety, etc.) 4) Possibility for large-scale reuse c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

13 Architecture Notation for architectural design Commonly: Informal, boxes denoting components and sub-components and lines denoting data or control-flow Also: UML component diagram with precise defined interfaces for the components Two purposes a) A way of facilitating discussion abut the system design e.g metaphor in XP b) A way of documenting an architecture that has been designed e.g. base of model-driven architecture where the implementation is derived from the architecture through model-transformations c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

14 Architecture Architectural Patterns/styles There are a set of common architectural patterns: Model View Controller Layered Architecture Repository Architecture Client-Server Architecture Pipe and filter Architecture... Quite often, the patterns are mixed, e.g. the client in a client-server architecture could be build using a layered architecture where the presentation layer uses the model-view-controller pattern c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

15 Architecture Model View Controller Used when there are multiple ways to view and interact with data. Advantage: Easy to change and add data representations and interactions; supports different presentations of the same data where changes in one presentation are reflected in all others ( Vending Machine UI s from last week) Disadvantage: Can involve additional code with simple data models and interactions. c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

16 Architecture Layered Architecture Used when building new facilities on top of existing systems or separation of concerns is important (e.g. easy exchange of presentation or data layer) Advantage: Easy replacement of entire layers; redundant facilities (like authentification) can be provided in each layer to increase the dependability of the system Disadvantage: Sometimes higher layers have to talk directly to lower layers; possible performance issues by propagating messages through layers c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

17 Architecture Repository Architecture Used when the system has large volumes of data Advantage: Independent of components (they don t have to know each other); components can easily be added or exchanged Disadvantage: Repository is a single point of failure; possible source for inefficiencies c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

18 Architecture Client-Server Architecture Used when data in a shared database has to be accessed from a range of locations Advantage: access to remote servers/data Disadvantage: single point of failure (the server); denial-of-service attacks c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

19 Architecture Pipes-and-Filter Architecture Used in data processing applications Advantage: Easy to understand; reuse of transformations Disadvantage: agreement on data structures; each transformation needs to parse and unparse the data c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

20 DRY principle Basic Principles of Good Design Duplication DRY principle Don t repeat yourself: Every piece of knowledge must have a single, unambiguous, authoritative representation within a system. Problem with duplication Consistency: Changes need to be applied to each of the duplicates Changes won t be executed because changes needed to be done in too many places Kind of duplication Code duplications Concept duplications Code / Comments / Documentation Self documenting code Only document ideas, concepts,... that are not expressible (expressed) clearly in the code: e.g. What is the idea behind a design, what were the design decisions Example: euml: Class diagrams == Code... c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

21 Basic Principles of Good Design Example: Code Duplication Duplication c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

22 DRY principle Basic Principles of Good Design Duplication Techniques to avoid duplication Use appropriate abstractions Inheritance Classes with instance variables Methods with parameters refactor your software to remove duplications... to refactor software Change the structure of the software without changing its functionality Use generation techniques generate documention from code e.g. Javadoc generates HTML documentation from Java source files e.g. generate code from UML models most modern tools support this for class diagrams in both directions (i.e. code diagram and diagram code... c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

23 KISS principle Basic Principles of Good Design Simplicity KISS principle Keep it short and simple (sometimes also: Keep it simple, stupid) Try to use the simplest solution first Make complex solutions only if needed Strive for simplicity Takes time!! refactor your software to make it simpler Antoine de Saint Exupéry It seems that perfection is reached not when there is nothing left to add, but when there is nothing left to take away. c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

24 Project Course Exam Project Exam project: Monday 21.3 Monday min demonstrations of the software are planned for Monday 9.5 To be delivered the running software and source code a report describing the software (Use cases, class diagrams, sequence diagrams,... ) Group size: 2 4 Group forming: next week Either you are personally present or someone can speak for you If not, then there is no guarantee for participation in the exam project c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

25 Patterns (I) Introduction What is a pattern and a pattern language? Pattern A pattern is a solution to a problem in context A pattern usually contains a discussion on the problem, the forces involved in the problem, a solution that addresses the problem, and references to other patterns Pattern language A pattern language is a collection of related patterns c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

26 History of patterns Patterns (I) Introduction Christopher Alexander (architect) Patterns and pattern language for constructing buildings / cities Timeless Way of Building and A Pattern Language: Towns, Buildings, Construction (1977/79) Investigated for use of patterns with Software by Kent Beck and Ward Cunningham in 1987 Design patterns book (1994) Pattern conferences, e.g. PloP (Pattern Languages of Programming) since 1994 Portland Pattern repository (since 1995) c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

27 Patterns (I) What is a design pattern? Introduction Design patterns book by Gang of Four (Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides) A set of best practices for designing software E.g. Observer pattern, Factory pattern, Composite pattern,... Many of the design patterns describe how to use decentralised control (i.e. object-oriented techniques) to solve common design problems Places to find patterns: Wikipedia pattern_(computer_science) Portland Pattern repository (since 1995) Wikipedia Software_design_patterns c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

28 Template Method Patterns (I) Template Method Template Method Define the skeleton of an algortihm in an operation, deferring some steps to subclasses. Template Method lets sublcasses redefine certain steps of an algorithm without changing the algorithm s structure. AbstractClass templatemethod primitivemethod1 primitivemethod2... The template method defines its algortihm based on primitivemethod1,... PrimitiveMethod1,... in AbstractClass are usually abstract, but they could also define some default behavior. ConcreteClass1 primitivemethod1 primitivemethod2... ConcreteClass2 primitivemethod1 primitivemethod2... c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

29 Patterns (I) Template Method Template Method: Library Application Book.... getmaxdaysforloan():int Medium.... getmaxdaysforloan():int isoverdue():bool Cd.... getmaxdaysforloan():int if (!isborrowed()) { return false; } Calendar date = libapp.getdate(); Calendar latestreturndate = new GregorianCalendar(); latestreturndate.settime(borrowdate.gettime()); latestreturndate.add(calendar.day_of_year, getmaxdaysforloan()); return latestreturndate.before(date); The computation of isoverdue depends on getmaxdaysforloan which is different for Book and Cd. c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

30 Observer Pattern Patterns (I) Observer Pattern Observer Pattern Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically. c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

31 Observer Pattern Patterns (I) Observer Pattern The basic idea is that the object being observed does not know that there are observers observers can be added independently on the observable (also called subject) new types of observers can be created without changing the subject The observer pattern is used often in GUI programming to connect the presentation of a model with the model itself c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

32 Observer Pattern Patterns (I) Observer Pattern c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

33 Observer Pattern Patterns (I) Observer Pattern c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

34 Implementation in Java Patterns (I) Observer Pattern Support from the class library: One abstract class and interface: Interface java.util.observer Implement update(observable o, Object aspect) Class java.util.observable Provides connection to the observers Provides methods addobserver(observer o), deleteobserver(observer o) To add and delete observers setchanged() Marks the observable / subject as dirty notifyobservers(), notifyobservers(object aspects) Notify the observers that the state of the observable has changed The aspect can be used to say what has changed in the observable c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

35 Patterns (I) Example: Stack with observers Observer Pattern public class Stack<E> extends Observable { List<E> data = new ArrayList<E>(); } void push(type o) { data.add(o); setchanged(); notifyobserver("data elements"); } E pop() { E top = data.remove(data.size()) setchanged(); notifyobserver("data elements"); } E.top() { return data.get(data.size()); } int size() { return data.size(); }... c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

36 Patterns (I) Example: Stack observer Observer Pattern Observe the number of elements that are on the stack. Each time the stack changes its size, a message is printed on the console. class NumberOfElementsObserver() implements Observer { Stack<E> stack; NumberOfElementsObserver(Stack<E> st) { stack = st; } } public void update(observable o, Object aspect) { System.out.println(subject.size()+" elements on the stac } c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

37 Patterns (I) Example: Stack observer Observer Pattern Adding an observer... Stack<Integer> stack = new Stack<Integer>; NumberOfElementsObserver observer = new NumberOfElementsObserver(stack); stack.addobserver(observer); stack.push(10); stack.pop();... stack.deleteobserver(observer)... c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

38 Patterns (I) Observer Pattern Sequence diagram for the stack sample c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

39 State Pattern Patterns (I) State pattern State Pattern Allow an object to alter its behavior when its internal state changes. The object will appear to change its class. This pattern delegates the behaviour of one object to another object AClass request1 request2... changestate * State request1 request2 sd: StatePattern State1 request1 request2 State2 request1 request2 c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

40 Composite Pattern Patterns (I) Composite Pattern Composite Pattern Compose objects into tree structures to represent part-whole hierarchies. Composite lets client treat individual objects and compositions of objects uniformly. Component computecost() * CatalogueEntry cost computecost() * Part computecost() Assembly computecost() {return catalogueentry.cost} {int costs = 0; foreach (Component c : components) { costs += c.computecost(); } return costs; } c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

41 Example: Graphics Patterns (I) Composite Pattern Class Diagram Instance diagram c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

42 Visitor Pattern Patterns (I) Visitor Pattern Visitor Pattern Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operation without changing the classes of the elements on which it operates. The object structure (e.g. based on a composite pattern) provides access to itself through a set of methods c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

43 Patterns (I) Visitor Pattern Example: compute costs for components Component computecost() * Part cost computecost() Assembly computecost() {return cost} {int costs = 0; foreach (Component c : components) { costs += c.computecost(); } return costs; } c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

44 Patterns (I) Visitor Pattern Example: compute costs as a visitor Component acceptvisitor(visitor v) * Visitor visitpart(component c) visitassembly(component c) Part cost acceptvisitor(visitor v) Assembly acceptvisitor() ComputeCosts visitpart(component c) visitassembly(component c) visitpart visitassembly Function {v.visitpart(this)} {v.visitassembly(this)} {return c.getcost()} { int costs = 0; foreach (Component co : c.getcomponents()) { costs += co.accept(this); } return costs; } c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

45 Visitor pattern Patterns (I) Visitor Pattern The trick of the visitor is to use double dispatch add type information to the method name acceptvisitor visitpart, visitassembly Use the visitor pattern if The functions don t belong to the concept of the object structure:e.g. generator functions One should be able to do traverse an object structure without wanting to add operations to the object structure One has several functions almost the same. Then one can use the visitor pattern and inheritance between the visitors do define slight variants of the functions (e.g. only overriding acceptpart) Do not use it if the complexity of the visitor pattern is not justified if the functions belongs conceptually to the object structure If the flexibility of the visitor is not needed, e.g.. if one only wants to add one function c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

46 Double Dispatch Patterns (I) Visitor Pattern Double Dispatch Here the method is based on the type of the receiver and the argument => "Dynamic binding" on both arguments => "double dispatch" Here it is known that a is an integer and thus needs to be converted to the more general type (i.e. float) Here we know that both arguments are floats and that we can use the addition on floats e.g. found in Smalltalk or Ruby where numbers are first class objects c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

47 Patterns (I) Summary Design Patterns Summary Original Gang of Four book: Creational Patterns Abstract Factory, Builder, Factory Method, Prototype, Singleton Structural Patterns Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy Behavioral Patterns Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visitor There are more: Implementation Patterns, Architectural Patterns, Analysis Patterns, Domain Patterns... c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

48 Summary Recap Layered Architecture: Persistent Layer Architecture Good Design Design Patterns (I): (Object-oriented) solutions to common design problems Template Method, Observer Pattern, State Pattern, Composite Pattern, Visitor Pattern c 2011 H. Baumeister (IMM) Software Engineering I (02161) Spring / 111

Software Engineering I (02161)

Software Engineering I (02161) Software Engineering I (02161) Week 10 Assoc. Prof. Hubert Baumeister DTU Compute Technical University of Denmark Spring 2016 Last Time Project Planning Non-agile Agile Refactoring Contents Basic Principles

More information

Software Engineering I (02161)

Software Engineering I (02161) Software Engineering I (02161) Week 8: Principle of good Design, Project, and Design Patterns Hubert Baumeister Informatics and Mathematical Modelling Technical University of Denmark Spring 2009 c 2009

More information

Software Engineering I (02161)

Software Engineering I (02161) Software Engineering I (02161) Week 9: Principles of good design, Patterns, Layered Architecture Hubert Baumeister Informatics and Mathematical Modelling Technical University of Denmark Spring 2010 c 2010

More information

Software Engineering I (02161)

Software Engineering I (02161) Software Engineering I (02161) Week 11 Assoc. Prof. Hubert Baumeister DTU Compute Technical University of Denmark Spring 2017 Recap I Software Development Processes (cont.) I Project Planning I Design

More information

Software Engineering I (02161)

Software Engineering I (02161) Software Engineering I (02161) Week 9: Layered Architecture Persistency Layer; Software Development Process Assoc. Prof. Hubert Baumeister DTU Compute Technical University of Denmark Spring 2017 Recap

More information

Software Engineering I (02161)

Software Engineering I (02161) Software Engineering I (02161) Week 8 Assoc. Prof. Hubert Baumeister DTU Compute Technical University of Denmark Spring 2018 Contents Basic Principles of Good Design Design Patterns Low Coupling High coupling

More information

Software Engineering I (02161)

Software Engineering I (02161) Software Engineering I (02161) Week 7 Assoc. Prof. Hubert Baumeister DTU Compute Technical University of Denmark Spring 2016 Contents State machines Library Application and GUI Layered Architecture: Persistence

More information

DESIGN PATTERN - INTERVIEW QUESTIONS

DESIGN PATTERN - INTERVIEW QUESTIONS DESIGN PATTERN - INTERVIEW QUESTIONS http://www.tutorialspoint.com/design_pattern/design_pattern_interview_questions.htm Copyright tutorialspoint.com Dear readers, these Design Pattern Interview Questions

More information

Ingegneria del Software Corso di Laurea in Informatica per il Management. Design Patterns part 1

Ingegneria del Software Corso di Laurea in Informatica per il Management. Design Patterns part 1 Ingegneria del Software Corso di Laurea in Informatica per il Management Design Patterns part 1 Davide Rossi Dipartimento di Informatica Università di Bologna Pattern Each pattern describes a problem which

More information

The Strategy Pattern Design Principle: Design Principle: Design Principle:

The Strategy Pattern Design Principle: Design Principle: Design Principle: Strategy Pattern The Strategy Pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it. Design

More information

Design Patterns. An introduction

Design Patterns. An introduction Design Patterns An introduction Introduction Designing object-oriented software is hard, and designing reusable object-oriented software is even harder. Your design should be specific to the problem at

More information

02291: System Integration

02291: System Integration 02291: System Integration Hubert Baumeister hub@imm.dtu.dk Spring 2011 Contents 1 Recap 1 2 More UML Diagrams 2 2.1 Object Diagrams........................................... 2 2.2 Communication Diagrams......................................

More information

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich CSCD01 Engineering Large Software Systems Design Patterns Joe Bettridge Winter 2018 With thanks to Anya Tafliovich Design Patterns Design patterns take the problems consistently found in software, and

More information

Using Design Patterns in Java Application Development

Using Design Patterns in Java Application Development Using Design Patterns in Java Application Development ExxonMobil Research & Engineering Co. Clinton, New Jersey Michael P. Redlich (908) 730-3416 michael.p.redlich@exxonmobil.com About Myself Degree B.S.

More information

Design Pattern. CMPSC 487 Lecture 10 Topics: Design Patterns: Elements of Reusable Object-Oriented Software (Gamma, et al.)

Design Pattern. CMPSC 487 Lecture 10 Topics: Design Patterns: Elements of Reusable Object-Oriented Software (Gamma, et al.) Design Pattern CMPSC 487 Lecture 10 Topics: Design Patterns: Elements of Reusable Object-Oriented Software (Gamma, et al.) A. Design Pattern Design patterns represent the best practices used by experienced

More information

Ingegneria del Software Corso di Laurea in Informatica per il Management. Design Patterns part 1

Ingegneria del Software Corso di Laurea in Informatica per il Management. Design Patterns part 1 Ingegneria del Software Corso di Laurea in Informatica per il Management Design Patterns part 1 Davide Rossi Dipartimento di Informatica Università di Bologna Pattern Each pattern describes a problem which

More information

CS/CE 2336 Computer Science II

CS/CE 2336 Computer Science II CS/CE 2336 Computer Science II UT D Session 20 Design Patterns An Overview 2 History Architect Christopher Alexander coined the term "pattern" circa 1977-1979 Kent Beck and Ward Cunningham, OOPSLA'87 used

More information

Tuesday, October 4. Announcements

Tuesday, October 4. Announcements Tuesday, October 4 Announcements www.singularsource.net Donate to my short story contest UCI Delta Sigma Pi Accepts business and ICS students See Facebook page for details Slide 2 1 Design Patterns Design

More information

A Rapid Overview of UML

A Rapid Overview of UML A Rapid Overview of UML The Unified dmodeling Language (UML) Emerged in the mid 90s as the de facto standard for softwareengineering engineering design Use case diagram depicts user interaction with system

More information

MVC. Model-View-Controller. Design Patterns. Certain programs reuse the same basic structure or set of ideas

MVC. Model-View-Controller. Design Patterns. Certain programs reuse the same basic structure or set of ideas MVC -- Design Patterns Certain programs reuse the same basic structure or set of ideas These regularly occurring structures have been called Design Patterns Design Patterns Design Patterns: Elements of

More information

EPL 603 TOPICS IN SOFTWARE ENGINEERING. Lab 6: Design Patterns

EPL 603 TOPICS IN SOFTWARE ENGINEERING. Lab 6: Design Patterns EPL 603 TOPICS IN SOFTWARE ENGINEERING Lab 6: Design Patterns Links to Design Pattern Material 1 http://www.oodesign.com/ http://www.vincehuston.org/dp/patterns_quiz.html Types of Design Patterns 2 Creational

More information

CS251 Software Engineering Lectures 18: Intro to DP

CS251 Software Engineering Lectures 18: Intro to DP و ابتغ فيما آتاك هللا الدار اآلخرة و ال تنس نصيبك من الدنيا CS251 Software Engineering Lectures 18: Intro to DP Slides by Rick Mercer, Christian Ratliff, Oscar Nierstrasz and others 1 Outline Introduction

More information

Software Design Patterns. Background 1. Background 2. Jonathan I. Maletic, Ph.D.

Software Design Patterns. Background 1. Background 2. Jonathan I. Maletic, Ph.D. Software Design Patterns Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University J. Maletic 1 Background 1 Search for recurring successful designs emergent designs from practice

More information

Object Oriented Methods with UML. Introduction to Design Patterns- Lecture 8

Object Oriented Methods with UML. Introduction to Design Patterns- Lecture 8 Object Oriented Methods with UML Introduction to Design Patterns- Lecture 8 Topics(03/05/16) Design Patterns Design Pattern In software engineering, a design pattern is a general repeatable solution to

More information

Kerievsky_book.fm Page 355 Thursday, July 8, :12 PM. Index

Kerievsky_book.fm Page 355 Thursday, July 8, :12 PM. Index Kerievsky_book.fm Page 355 Thursday, July 8, 2004 12:12 PM Index A Absorbing class, 117 Abstract Factory, 70 71 Accept methods, 327 Accumulation methods, 315, 325 330 Accumulation refactorings Collecting

More information

What is Design Patterns?

What is Design Patterns? Paweł Zajączkowski What is Design Patterns? 1. Design patterns may be said as a set of probable solutions for a particular problem which is tested to work best in certain situations. 2. In other words,

More information

Trusted Components. Reuse, Contracts and Patterns. Prof. Dr. Bertrand Meyer Dr. Karine Arnout

Trusted Components. Reuse, Contracts and Patterns. Prof. Dr. Bertrand Meyer Dr. Karine Arnout 1 Last update: 2 November 2004 Trusted Components Reuse, Contracts and Patterns Prof. Dr. Bertrand Meyer Dr. Karine Arnout 2 Lecture 5: Design patterns Agenda for today 3 Overview Benefits of patterns

More information

Applying the Observer Design Pattern

Applying the Observer Design Pattern Applying the Observer Design Pattern Trenton Computer Festival Professional Seminars Michael P. Redlich (908) 730-3416 michael.p.redlich@exxonmobil.com About Myself Degree B.S. in Computer Science Rutgers

More information

Applying Design Patterns to accelerate development of reusable, configurable and portable UVCs. Accellera Systems Initiative 1

Applying Design Patterns to accelerate development of reusable, configurable and portable UVCs. Accellera Systems Initiative 1 Applying Design Patterns to accelerate development of reusable, configurable and portable UVCs. Accellera Systems Initiative 1 About the presenter Paul Kaunds Paul Kaunds is a Verification Consultant at

More information

Patterns. Erich Gamma Richard Helm Ralph Johnson John Vlissides

Patterns. Erich Gamma Richard Helm Ralph Johnson John Vlissides Patterns Patterns Pattern-based engineering: in the field of (building) architecting and other disciplines from 1960 s Some software engineers also started to use the concepts Become widely known in SE

More information

Design Patterns. Manuel Mastrofini. Systems Engineering and Web Services. University of Rome Tor Vergata June 2011

Design Patterns. Manuel Mastrofini. Systems Engineering and Web Services. University of Rome Tor Vergata June 2011 Design Patterns Lecture 1 Manuel Mastrofini Systems Engineering and Web Services University of Rome Tor Vergata June 2011 Definition A pattern is a reusable solution to a commonly occurring problem within

More information

Socket attaches to a Ratchet. 2) Bridge Decouple an abstraction from its implementation so that the two can vary independently.

Socket attaches to a Ratchet. 2) Bridge Decouple an abstraction from its implementation so that the two can vary independently. Gang of Four Software Design Patterns with examples STRUCTURAL 1) Adapter Convert the interface of a class into another interface clients expect. It lets the classes work together that couldn't otherwise

More information

Goals of Lecture. Lecture 27: OO Design Patterns. Pattern Resources. Design Patterns. Cover OO Design Patterns. Pattern Languages of Programming

Goals of Lecture. Lecture 27: OO Design Patterns. Pattern Resources. Design Patterns. Cover OO Design Patterns. Pattern Languages of Programming Goals of Lecture Lecture 27: OO Design Patterns Cover OO Design Patterns Background Examples Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 6448 - Spring Semester, 2001 April 24, 2001 Kenneth

More information

Introduction and History

Introduction and History Pieter van den Hombergh Fontys Hogeschool voor Techniek en Logistiek September 15, 2016 Content /FHTenL September 15, 2016 2/28 The idea is quite old, although rather young in SE. Keep up a roof. /FHTenL

More information

Topics in Object-Oriented Design Patterns

Topics in Object-Oriented Design Patterns Software design Topics in Object-Oriented Design Patterns Material mainly from the book Design Patterns by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides; slides originally by Spiros Mancoridis;

More information

Introduction to Software Engineering: Object Design I Reuse & Patterns

Introduction to Software Engineering: Object Design I Reuse & Patterns Introduction to Software Engineering: Object Design I Reuse & Patterns John T. Bell Department of Computer Science University of Illinois, Chicago Based on materials from Bruegge & DuToit 3e, Chapter 8,

More information

1 Software Architecture

1 Software Architecture Some buzzwords and acronyms for today Software architecture Design pattern Separation of concerns Single responsibility principle Keep it simple, stupid (KISS) Don t repeat yourself (DRY) Don t talk to

More information

Idioms and Design Patterns. Martin Skogevall IDE, Mälardalen University

Idioms and Design Patterns. Martin Skogevall IDE, Mälardalen University Idioms and Design Patterns Martin Skogevall IDE, Mälardalen University 2005-04-07 Acronyms Object Oriented Analysis and Design (OOAD) Object Oriented Programming (OOD Software Design Patterns (SDP) Gang

More information

Software Engineering I (02161)

Software Engineering I (02161) Software Engineering I (02161) Week 6: Design 1: CRC cards, class and sequence diagram Assoc. Prof. Hubert Baumeister DTU Compute Technical University of Denmark Spring 2017 Contents Midterm evaluation

More information

CSCI 253. Overview. The Elements of a Design Pattern. George Blankenship 1. Object Oriented Design: Template Method Pattern. George Blankenship

CSCI 253. Overview. The Elements of a Design Pattern. George Blankenship 1. Object Oriented Design: Template Method Pattern. George Blankenship CSCI 253 Object Oriented Design: George Blankenship George Blankenship 1 Creational Patterns Singleton Abstract factory Factory Method Prototype Builder Overview Structural Patterns Composite Façade Proxy

More information

What is Design Patterns?

What is Design Patterns? Paweł Zajączkowski What is Design Patterns? 1. Design patterns may be said as a set of probable solutions for a particular problem which is tested to work best in certain situations. 2. In other words,

More information

SDC Design patterns GoF

SDC Design patterns GoF SDC Design patterns GoF Design Patterns The design pattern concept can be viewed as an abstraction of imitating useful parts of other software products. The design pattern is a description of communicating

More information

Design Patterns. "Gang of Four"* Design Patterns. "Gang of Four" Design Patterns. Design Pattern. CS 247: Software Engineering Principles

Design Patterns. Gang of Four* Design Patterns. Gang of Four Design Patterns. Design Pattern. CS 247: Software Engineering Principles CS 247: Software Engineering Principles Design Patterns Reading: Freeman, Robson, Bates, Sierra, Head First Design Patterns, O'Reilly Media, Inc. 2004 Ch Strategy Pattern Ch 7 Adapter and Facade patterns

More information

CS 247: Software Engineering Principles. Design Patterns

CS 247: Software Engineering Principles. Design Patterns CS 247: Software Engineering Principles Design Patterns Reading: Freeman, Robson, Bates, Sierra, Head First Design Patterns, O'Reilly Media, Inc. 2004 Ch 1 Strategy Pattern Ch 7 Adapter and Facade patterns

More information

Design Patterns. Gunnar Gotshalks A4-1

Design Patterns. Gunnar Gotshalks A4-1 Design Patterns A4-1 On Design Patterns A design pattern systematically names, explains and evaluates an important and recurring design problem and its solution Good designers know not to solve every problem

More information

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich CSCD01 Engineering Large Software Systems Design Patterns Joe Bettridge Winter 2018 With thanks to Anya Tafliovich Design Patterns Design patterns take the problems consistently found in software, and

More information

Application Architectures, Design Patterns

Application Architectures, Design Patterns Application Architectures, Design Patterns Martin Ledvinka martin.ledvinka@fel.cvut.cz Winter Term 2017 Martin Ledvinka (martin.ledvinka@fel.cvut.cz) Application Architectures, Design Patterns Winter Term

More information

be used for more than one use case (for instance, for use cases Create User and Delete User, one can have one UserController, instead of two separate

be used for more than one use case (for instance, for use cases Create User and Delete User, one can have one UserController, instead of two separate UNIT 4 GRASP GRASP: Designing objects with responsibilities Creator Information expert Low Coupling Controller High Cohesion Designing for visibility - Applying GoF design patterns adapter, singleton,

More information

Produced by. Design Patterns. MSc in Communications Software. Eamonn de Leastar

Produced by. Design Patterns. MSc in Communications Software. Eamonn de Leastar Design Patterns MSc in Communications Software Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie

More information

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico Modellistica Medica Maria Grazia Pia INFN Genova Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico 2002-2003 Lezione 8 OO modeling Design Patterns Introduction Creational Patterns Software

More information

Design patterns. OOD Lecture 6

Design patterns. OOD Lecture 6 Design patterns OOD Lecture 6 Next lecture Monday, Oct 1, at 1:15 pm, in 1311 Remember that the poster sessions are in two days Thursday, Sep 27 1:15 or 3:15 pm (check which with your TA) Room 2244 + 2245

More information

A few important patterns and their connections

A few important patterns and their connections A few important patterns and their connections Perdita Stevens School of Informatics University of Edinburgh Plan Singleton Factory method Facade and how they are connected. You should understand how to

More information

Plan. A few important patterns and their connections. Singleton. Singleton: class diagram. Singleton Factory method Facade

Plan. A few important patterns and their connections. Singleton. Singleton: class diagram. Singleton Factory method Facade Plan A few important patterns and their connections Perdita Stevens School of Informatics University of Edinburgh Singleton Factory method Facade and how they are connected. You should understand how to

More information

Lectures 24 and 25 Introduction to Architectural Styles and Design Patterns

Lectures 24 and 25 Introduction to Architectural Styles and Design Patterns Lectures 24 and 25 Introduction to Architectural Styles and Design Patterns Software Engineering ITCS 3155 Fall 2008 Dr. Jamie Payton Department of Computer Science University of North Carolina at Charlotte

More information

The GoF Design Patterns Reference

The GoF Design Patterns Reference The GoF Design Patterns Reference Version.0 / 0.0.07 / Printed.0.07 Copyright 0-07 wsdesign. All rights reserved. The GoF Design Patterns Reference ii Table of Contents Preface... viii I. Introduction....

More information

Introduction to Testing and Maintainable code

Introduction to Testing and Maintainable code Introduction to Testing and Maintainable code Reasons not to write unit tests 1. I don't know how to write tests. 2. Writing tests is too hard. 3. I don't have enough time to write tests. 4. Testing is

More information

Design Patterns. Hausi A. Müller University of Victoria. Software Architecture Course Spring 2000

Design Patterns. Hausi A. Müller University of Victoria. Software Architecture Course Spring 2000 Design Patterns Hausi A. Müller University of Victoria Software Architecture Course Spring 2000 1 Motivation Vehicle for reasoning about design or architecture at a higher level of abstraction (design

More information

Design Patterns. Observations. Electrical Engineering Patterns. Mechanical Engineering Patterns

Design Patterns. Observations. Electrical Engineering Patterns. Mechanical Engineering Patterns Introduction o to Patterns and Design Patterns Dept. of Computer Science Baylor University Some slides adapted from slides by R. France and B. Tekinerdogan Observations Engineering=Problem Solving Many

More information

Software Engineering I (02161)

Software Engineering I (02161) Software Engineering I (02161) Week 3 Assoc. Prof. Hubert Baumeister DTU Compute Technical University of Denmark Spring 2013 Recap Requirements Engineering user- / system requirements functional- / non-functional

More information

Information systems modelling UML and service description languages

Information systems modelling UML and service description languages Internet Engineering Tomasz Babczyński, Zofia Kruczkiewicz Tomasz Kubik Information systems modelling UML and service description languages Overview of design patterns for supporting information systems

More information

Design Patterns: Part 2

Design Patterns: Part 2 Design Patterns: Part 2 ENGI 5895: Software Design Andrew Vardy with code samples from Dr. Rodrigue Byrne and [Martin(2003)] Faculty of Engineering & Applied Science Memorial University of Newfoundland

More information

Plan. Design principles: laughing in the face of change. What kind of change? What are we trying to achieve?

Plan. Design principles: laughing in the face of change. What kind of change? What are we trying to achieve? Plan Design principles: laughing in the face of change Perdita Stevens School of Informatics University of Edinburgh What are we trying to achieve? Review: Design principles you know from Inf2C-SE Going

More information

What is Design Patterns?

What is Design Patterns? Paweł Zajączkowski What is Design Patterns? 1. Design patterns may be said as a set of probable solutions for a particular problem which is tested to work best in certain situations. 2. In other words,

More information

A Reconnaissance on Design Patterns

A Reconnaissance on Design Patterns A Reconnaissance on Design Patterns M.Chaithanya Varma Student of computer science engineering, Sree Vidhyanikethan Engineering college, Tirupati, India ABSTRACT: In past decade, design patterns have been

More information

What is a Pattern? Lecture 40: Design Patterns. Elements of Design Patterns. What are design patterns?

What is a Pattern? Lecture 40: Design Patterns. Elements of Design Patterns. What are design patterns? What is a Pattern? Lecture 40: Design Patterns CS 62 Fall 2017 Kim Bruce & Alexandra Papoutsaki "Each pattern describes a problem which occurs over and over again in our environment, and then describes

More information

Lecture 13: Design Patterns

Lecture 13: Design Patterns 1 Lecture 13: Design Patterns Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 6448 - Spring Semester, 2005 2 Pattern Resources Pattern Languages of Programming Technical conference on Patterns

More information

Object-Oriented Oriented Programming

Object-Oriented Oriented Programming Object-Oriented Oriented Programming Composite Pattern CSIE Department, NTUT Woei-Kae Chen Catalog of Design patterns Creational patterns Abstract Factory, Builder, Factory Method, Prototype, Singleton

More information

Software Engineering I (02161)

Software Engineering I (02161) Software Engineering I (02161) Week 5 Assoc. Prof. Hubert Baumeister DTU Compute Technical University of Denmark Spring 2015 Contents From Requirements to Design: CRC Cards Class Diagrams I Sequence Diagrams

More information

Pattern Resources. Lecture 25: Design Patterns. What are Patterns? Design Patterns. Pattern Languages of Programming. The Portland Pattern Repository

Pattern Resources. Lecture 25: Design Patterns. What are Patterns? Design Patterns. Pattern Languages of Programming. The Portland Pattern Repository Pattern Resources Lecture 25: Design Patterns Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 6448 - Spring Semester, 2003 Pattern Languages of Programming Technical conference on Patterns

More information

Design Patterns (DP) In the beginning. It s not a course about DP (just a little) A lot of good design and efficient implementation is based on DP

Design Patterns (DP) In the beginning. It s not a course about DP (just a little) A lot of good design and efficient implementation is based on DP User Interface Design 2 Design Patterns IT Uppsala University Design Patterns (DP) It s not a course about DP (just a little) A lot of good design and efficient implementation is based on DP In order to

More information

administrivia today UML start design patterns Tuesday, September 28, 2010

administrivia today UML start design patterns Tuesday, September 28, 2010 administrivia Assignment 2? promise to get past assignment 1 back soon exam on monday review slides are posted your responsibility to review covers through last week today UML start design patterns 1 Unified

More information

Applying the Decorator Design Pattern

Applying the Decorator Design Pattern Applying the Decorator Design Pattern Trenton Computer Festival Professional Seminars Michael P. Redlich (908) 730-3416 michael.p.redlich@exxonmobil.com About Myself Degree B.S. in Computer Science Rutgers

More information

A Primer on Design Patterns

A Primer on Design Patterns A Primer on Design Patterns First Edition Rahul Batra This book is for sale at http://leanpub.com/aprimerondesignpatterns This version was published on 2016-03-23 This is a Leanpub book. Leanpub empowers

More information

Slide 1. Design Patterns. Prof. Mirco Tribastone, Ph.D

Slide 1. Design Patterns. Prof. Mirco Tribastone, Ph.D Slide 1 Design Patterns Prof. Mirco Tribastone, Ph.D. 22.11.2011 Introduction Slide 2 Basic Idea The same (well-established) schema can be reused as a solution to similar problems. Muster Abstraktion Anwendung

More information

APPLYING DESIGN PATTERNS TO SCA IMPLEMENTATIONS

APPLYING DESIGN PATTERNS TO SCA IMPLEMENTATIONS APPLYING DESIGN PATTERNS TO SCA IMPLEMENTATIONS Adem Zumbul (TUBITAK-UEKAE, Kocaeli, Turkey, ademz@uekae.tubitak.gov.tr); Tuna Tugcu (Bogazici University, Istanbul, Turkey, tugcu@boun.edu.tr) ABSTRACT

More information

Why a Design Pattern. History of Design Pattern. Properties

Why a Design Pattern. History of Design Pattern. Properties Introduction to Design Patterns Nasreddine Aoumeur Why a Design Pattern Reusability: one of the basis for an efficient and actual SE discipline Helping new designers to have a more flexible and reusable

More information

Design Pattern What is a Design Pattern? Design Pattern Elements. Almas Ansari Page 1

Design Pattern What is a Design Pattern? Design Pattern Elements. Almas Ansari Page 1 What is a Design Pattern? Each pattern Describes a problem which occurs over and over again in our environment,and then describes the core of the problem Novelists, playwrights and other writers rarely

More information

Design Patterns. Dr. Rania Khairy. Software Engineering and Development Tool

Design Patterns. Dr. Rania Khairy. Software Engineering and Development Tool Design Patterns What are Design Patterns? What are Design Patterns? Why Patterns? Canonical Cataloging Other Design Patterns Books: Freeman, Eric and Elisabeth Freeman with Kathy Sierra and Bert Bates.

More information

A Metric for Measuring the Abstraction Level of Design Patterns

A Metric for Measuring the Abstraction Level of Design Patterns A Metric for Measuring the Abstraction Level of Design Patterns Atsuto Kubo 1, Hironori Washizaki 2, and Yoshiaki Fukazawa 1 1 Department of Computer Science, Waseda University, 3-4-1 Okubo, Shinjuku-ku,

More information

An Introduction to Patterns

An Introduction to Patterns An Introduction to Patterns Robert B. France Colorado State University Robert B. France 1 What is a Pattern? Patterns are intended to capture the best available software development experiences in the

More information

Object-oriented Software Design Patterns

Object-oriented Software Design Patterns Object-oriented Software Design Patterns Concepts and Examples Marcelo Vinícius Cysneiros Aragão marcelovca90@inatel.br Topics What are design patterns? Benefits of using design patterns Categories and

More information

The Design Patterns Matrix From Analysis to Implementation

The Design Patterns Matrix From Analysis to Implementation The Design Patterns Matrix From Analysis to Implementation This is an excerpt from Shalloway, Alan and James R. Trott. Design Patterns Explained: A New Perspective for Object-Oriented Design. Addison-Wesley

More information

Design patterns. Valentina Presutti courtesy of Paolo Ciancarini

Design patterns. Valentina Presutti courtesy of Paolo Ciancarini Design patterns Valentina Presutti courtesy of Paolo Ciancarini Agenda What are design patterns? Catalogues of patterns Languages of patterns Two case studies: design with patterns Software Architectures

More information

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich CSCD01 Engineering Large Software Systems Design Patterns Joe Bettridge Winter 2018 With thanks to Anya Tafliovich Design Patterns Design patterns take the problems consistently found in software, and

More information

C++ for System Developers with Design Pattern

C++ for System Developers with Design Pattern C++ for System Developers with Design Pattern Introduction: This course introduces the C++ language for use on real time and embedded applications. The first part of the course focuses on the language

More information

CS560. Lecture: Design Patterns II Includes slides by E. Gamma et al., 1995

CS560. Lecture: Design Patterns II Includes slides by E. Gamma et al., 1995 CS560 Lecture: Design Patterns II Includes slides by E. Gamma et al., 1995 Classification of GoF Design Pattern Creational Structural Behavioural Factory Method Adapter Interpreter Abstract Factory Bridge

More information

Designing and Writing a Program. Divide and Conquer! The Design-Code-Debug Cycle. Documentation is Code. Pair Programming 3/8/2012

Designing and Writing a Program. Divide and Conquer! The Design-Code-Debug Cycle. Documentation is Code. Pair Programming 3/8/2012 CS/ENGRD 2110 Object-Oriented Programming and Data Structures Spring 2012 Thorsten Joachims Lecture 13: Designing, Coding, and Documenting Designing and Writing a Program Don't sit down at the terminal

More information

SYLLABUS CHAPTER - 1 [SOFTWARE REUSE SUCCESS FACTORS] Reuse Driven Software Engineering is a Business

SYLLABUS CHAPTER - 1 [SOFTWARE REUSE SUCCESS FACTORS] Reuse Driven Software Engineering is a Business Contents i UNIT - I UNIT - II UNIT - III CHAPTER - 1 [SOFTWARE REUSE SUCCESS FACTORS] Software Reuse Success Factors. CHAPTER - 2 [REUSE-DRIVEN SOFTWARE ENGINEERING IS A BUSINESS] Reuse Driven Software

More information

Software Engineering Prof. Rushikesh K.Joshi IIT Bombay Lecture-15 Design Patterns

Software Engineering Prof. Rushikesh K.Joshi IIT Bombay Lecture-15 Design Patterns Software Engineering Prof. Rushikesh K.Joshi IIT Bombay Lecture-15 Design Patterns Today we are going to talk about an important aspect of design that is reusability of design. How much our old design

More information

WS01/02 - Design Pattern and Software Architecture

WS01/02 - Design Pattern and Software Architecture Design Pattern and Software Architecture: VIII. Conclusion AG Softwaretechnik Raum E 3.165 Tele. 60-3321 hg@upb.de VIII. Conclusion VIII.1 Classifications VIII.2 Common Misconceptions VIII.3 Open Questions

More information

SWEN425 DESIGN PATTERNS

SWEN425 DESIGN PATTERNS T E W H A R E W Ā N A N G A O T E Ū P O K O O T E I K A A M Ā U I VUW V I C T O R I A UNIVERSITY OF WELLINGTON EXAMINATIONS 2011 END OF YEAR SWEN425 DESIGN PATTERNS Time Allowed: 3 Hours Instructions:

More information

Applying the Factory Method Design Pattern

Applying the Factory Method Design Pattern Applying the Factory Method Design Pattern Trenton Computer Festival Professional Seminars Michael P. Redlich (908) 730-3416 michael.p.redlich@exxonmobil.com About Myself Degree B.S. in Computer Science

More information

Design Patterns 2. Page 1. Software Requirements and Design CITS 4401 Lecture 10. Proxy Pattern: Motivation. Proxy Pattern.

Design Patterns 2. Page 1. Software Requirements and Design CITS 4401 Lecture 10. Proxy Pattern: Motivation. Proxy Pattern. Proxy : Motivation Design s 2 It is 3pm. I am sitting at my 10Mbps connection and go to browse a fancy web page from the US, This is prime web time all over the US. So I am getting 100kbps What can you

More information

CSCI Object Oriented Design: Frameworks and Design Patterns George Blankenship. Frameworks and Design George Blankenship 1

CSCI Object Oriented Design: Frameworks and Design Patterns George Blankenship. Frameworks and Design George Blankenship 1 CSCI 6234 Object Oriented Design: Frameworks and Design Patterns George Blankenship Frameworks and Design George Blankenship 1 Background A class is a mechanisms for encapsulation, it embodies a certain

More information

Software Engineering - I An Introduction to Software Construction Techniques for Industrial Strength Software

Software Engineering - I An Introduction to Software Construction Techniques for Industrial Strength Software Software Engineering - I An Introduction to Software Construction Techniques for Industrial Strength Software Chapter 9 Introduction to Design Patterns Copy Rights Virtual University of Pakistan 1 Design

More information

Design Patterns. CSC207 Fall 2017

Design Patterns. CSC207 Fall 2017 Design Patterns CSC207 Fall 2017 Design Patterns A design pattern is a general description of the solution to a well-established problem using an arrangement of classes and objects. Patterns describe the

More information

Lecture 20: Design Patterns II

Lecture 20: Design Patterns II Lecture 20: Design Patterns II Software System Design and Implementation ITCS/ITIS 6112/8112 001 Fall 2008 Dr. Jamie Payton Department of Computer Science University of North Carolina at Charlotte Nov.

More information

Design Patterns. CSC207 Winter 2017

Design Patterns. CSC207 Winter 2017 Design Patterns CSC207 Winter 2017 Design Patterns A design pattern is a general description of the solution to a well-established problem using an arrangement of classes and objects. Patterns describe

More information

Overview of Patterns: Introduction

Overview of Patterns: Introduction : Introduction d.schmidt@vanderbilt.edu www.dre.vanderbilt.edu/~schmidt Professor of Computer Science Institute for Software Integrated Systems Vanderbilt University Nashville, Tennessee, USA Introduction

More information

Software Engineering I (02161)

Software Engineering I (02161) Software Engineering I (02161) Week 9 Assoc. Prof. Hubert Baumeister DTU Compute Technical University of Denmark Spring 2018 Recap Last week Principles of good design: DRY, KISS, YAGNI, high cohesion /

More information