Design Patterns (II) Lecture Three. Solution to Homework Two Used framework Used design patterns: composite and state Question: what are the differences.

Slides:



Advertisements
Similar presentations
SWE 4743 Strategy Patterns Richard Gesick. CSE Strategy Pattern the strategy pattern (also known as the policy pattern) is a software design.
Advertisements

Design Patterns In OPM Presented by: Galia Shlezinger Instructors: Prop. Dov Dori, Dr. Iris Berger.
Visitor Pattern Jeff Schott CS590L Spring What is the Purpose of the Visitor Pattern ? n Represent an operation to be performed on the elements.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Problem Spaces and Search Fall 2008 Jingsong.
Dept. of Computer Engineering, Amir-Kabir University 1 Design Patterns Dr. Noorhosseini Lecture 2.
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH 1 Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 Design Patterns: someone has already.
Logical Architecture and UML Package Diagrams
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Design Patterns VI Composite, Iterator, and Visitor Patterns.
+ Informatics 122 Software Design II Lecture 8 Emily Navarro Duplication of course material for any commercial purpose without the explicit written permission.
CERN – European Organization for Nuclear Research GS Department – Administrative Information Services Design Patterns in Groovy Nicolas Décrevel Advanced.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Inheritance using Java
Logical Architecture and UML Package Diagrams 徐迎晓 复旦大学软件学院.
Ceg860 (Prasad)L6MR1 Modularity Extendibility Reusability.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Requirements To Design--Iteratively Chapter 12 Applying UML and Patterns Craig Larman.
Creational Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
Go4 Visitor Pattern Presented By: Matt Wilson. Introduction 2  This presentation originated out of casual talk between former WMS “C++ Book Club” (defunct.
Effective C#, Chapter 1: C# Language Elements Last Updated: Fall 2011.
Object Oriented Programming Principles Lecturer: Kalamullah Ramli Electrical Engineering Dept. University of Indonesia Session-3.
Object-Oriented Design Principles and Patterns. © 2005, James R. Vallino2 How Do You Design? What principles guide you when you create a design? What.
CS 350 – Software Design The Strategy Pattern – Chapter 9 Changes to software, like other things in life, often focus on the immediate concerns and ignore.
Chapter 13 Logical Architecture and UML Package Diagrams 1CS6359 Fall 2012 John Cole.
Architectural pattern: Interceptor Source: POSA II pp 109 – 140POSA II Environment: developing frameworks that can be extended transparently Recurring.
....and other creepy things from John Vlissides The Visitor Pattern EXISTS! And its INTENT is to represent an operation to be performed on the elements.
Kal Bugrara, Ph.DSoftware Engineering Northeastern University Fundamentals Of Software Engineering Lecture V.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
Design Model Lecture p6 T120B pavasario sem.
CSE 332: Design Patterns Review: Design Pattern Structure A design pattern has a name –So when someone says “Adapter” you know what they mean –So you can.
UML Package Diagrams. Package Diagrams UML Package Diagrams are often used to show the contents of components, which are often packages in the Java sense.
Test Stubs... getting the world under control. TDD of State Pattern To implement GammaTown requirements I CS, AUHenrik Bærbak Christensen2.
Advanced Object-Oriented Design Patterns and Architectures Part One COEN396A John Xiao
Design Reuse Earlier we have covered the re-usable Architectural Styles as design patterns for High-Level Design. At mid-level and low-level, design patterns.
1 Languages and Compilers (SProg og Oversættere) Bent Thomsen Department of Computer Science Aalborg University With acknowledgement to Wei-Tek Tsai who’s.
1 Chapter 5:Design Patterns. 2 What are design pattern?  Schematic description of design solution to recurring problems in software design and,  Reusable.
CS212: Object Oriented Analysis and Design Lecture 39: Design Pattern-III.
Introduction (Continued) Design Patterns (I) Lecture Two.
The Visitor Pattern (Behavioral) ©SoftMoore ConsultingSlide 1.
TK2023 Object-Oriented Software Engineering CHAPTER 8 LOGICAL ARCHITECTURE.
The ODMG Standard for Object Databases
Informatics 122 Software Design II Lecture 12 Emily Navarro Duplication of course material for any commercial purpose without the explicit written permission.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
04 - OOD Intro.CSC4071 Software Design ‘Requirements’ defines –The goals the system needs to satisfy. ‘Specification’ defines –The externally-observable.
CSE 332: Design Patterns (Part II) Last Time: Part I, Familiar Design Patterns We’ve looked at patterns related to course material –Singleton: share a.
Object Design More Design Patterns Object Constraint Language Object Design Specifying Interfaces Review Exam 2 CEN 4010 Class 18 – 11/03.
Conceptual Modelling The Entity-Relationship (ER) Model The ER diagram Data Modelling.
The Visitor Design Pattern. What’s It All About? Allows for new operations to be defined and used on elements of an object structure with out changing.
3/1/01H-1 © 2001 T. Horton CS 494 Object-Oriented Analysis & Design Evaluating Class Diagrams Topics include: Cohesion, Coupling Law of Demeter (handout)
Command Pattern. Intent encapsulate a request as an object  can parameterize clients with different requests, queue or log requests, support undoable.
Design Patterns: MORE Examples
Strategy Pattern.
Chapter 5:Design Patterns
Object-Oriented Modeling with UML
CS 350 – Software Design The Strategy Pattern – Chapter 9
Behavioral Design Patterns
Inheritance B.Ramamurthy 11/7/2018 B.Ramamurthy.
CS 4240 Principles of SW Design
A Pattern Language for Software Architecture
Design Pattern: Visitor
Informatics 122 Software Design II
Reusability 11/29/2018© 2006 ITT Educational Services Inc.
Third lecture Review Visitor pattern DemeterJ 12/25/2018 SD.
Third lecture Review Visitor pattern DemeterJ 2/17/2019 SD.
Introduction to Pattern Oriented Analysis and Design (POAD)
Strategy Design Pattern
Informatics 122 Software Design II
16. Visitors SE2811 Software Component Design
16. Visitors SE2811 Software Component Design
FRAMEWORKS AND REUSE What is “Framework”?
Visitor Pattern Intent
Presentation transcript:

Design Patterns (II) Lecture Three

Solution to Homework Two Used framework Used design patterns: composite and state Question: what are the differences between frameworks and design patterns?

Patterns vs Frameworks Patterns –reuse of design –tells you how to do good design –language independent –often covers general domains –addresses small part of a program architecture

Patterns vs Frameworks Framework –reuse of design and code –is a design (generic implementation) –language specific –often covers specific domain –addresses overall program architecture

Solution to Digital Watch Problem How many states? –State diagram How to change state? –Who should know what? How to implement state-specific behaviour? –Delegate the responsibility to the right party

Java Review Properties Reflection Serialization

Visitor Pattern Represent an operation to be performed on the elements of an object structure Let you define a new operation without changing the classes of the elements on which it operates

Company Example A company has departments and each department has more than one employee What is the total salary?

More Functionality How many departments with more than ten people?

Class Structure Evolved A company has several divisions, and each division has several companies –two solutions

Discussion Applicability –Operations performed on objects in an object structure depend on their concrete classes –Many distinct and unrelated operations to be performed on objects Differences from Composite Pattern

Discussion Separate navigation and processing –calling an operation on an element object with the visitor as an argument (double dispatch) –calling an operation on a visitor with an element as an argument

Discussion Make adding new operations easy Gather related operations and separate unrelated ones Visiting across class hierarchies Accumulating state

Discussion Adding new concrete classes for the object structure could be hard Break encapsulation