Design Patterns

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

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

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

Design Pattern Detection

Review Software Engineering October, 7, Adrian Iftene

Design Patterns. Gunnar Gotshalks A4-1

Design Pattern Detection

Design Patterns. An introduction

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

Work groups meeting 3

CPSC 310 Software Engineering. Lecture 11. Design Patterns

OODP Session 4. Web Page: Visiting Hours: Tuesday 17:00 to 19:00

Design Patterns. James Brucker

Software Design COSC 4353/6353 D R. R A J S I N G H

The Joel Test: 12 Steps to Better Code.

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

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

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

SDC Design patterns GoF

Design patterns. Valentina Presutti courtesy of Paolo Ciancarini

CASE TOOLS LAB VIVA QUESTION

Overview of Patterns: Introduction

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

Introduction to Patterns and Frameworks

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

Architectural Blueprint

The Joel Test 12 Steps to Better Code

Requirements and Design Overview

Requirements Validation and Negotiation

Keywords: Abstract Factory, Singleton, Factory Method, Prototype, Builder, Composite, Flyweight, Decorator.

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

Cocoa Design Patterns. Erik M. Buck October 17, 2009

Inheritance. EEC 521: Software Engineering. Dealing with Change. Polymorphism. Software Design. Changing requirements Code needs to be flexible

UNIT I Introduction to Design Patterns

Oracle Application Express How It s Made November 15, 2011

A Reconnaissance on Design Patterns

1 Software Architecture

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

Reuse at Design Level: Design Patterns

THE OBJECT-ORIENTED DESIGN PROCESS AND DESIGN AXIOMS (CH -9)

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

Design Patterns #3. Reid Holmes. Material and some slide content from: - GoF Design Patterns Book - Head First Design Patterns

Application Architectures, Design Patterns

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

DESIGN PATTERN - INTERVIEW QUESTIONS

A Visual Tool for Supporting Developers in Ontology-based Application Integration

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

The Design Patterns Matrix From Analysis to Implementation

3 Product Management Anti-Patterns by Thomas Schranz

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

Work groups meeting 3

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

CS/CE 2336 Computer Science II

T Technical specification: FASTAXON Group: Muuntaja

Jonathan Haulund. AEHF Program Office United States Air Force. Reuse: Dealing With The Hand You re Dealt

Presenter: Dong hyun Park

Design Patterns. CSC207 Fall 2017

A Comparison of the Booch Method and Shlaer-Mellor OOA/RD

Design Concepts. Slide Set to accompany. Software Engineering: A Practitioner s Approach, 7/e by Roger S. Pressman

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

Cloud Based Module Configuration

CSE 70 Final Exam Fall 2009

THE BCS PROFESSIONAL EXAMINATION BCS Level 6 Professional Graduate Diploma in IT September 2017 EXAMINERS REPORT. Software Engineering 2

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

What s a BA to do with Data? Discover and define standard data elements in business terms

Design Process Overview. At Each Level of Abstraction. Design Phases. Design Phases James M. Bieman

CHAPTER 9 DESIGN ENGINEERING. Overview

Chapter 10. Database System Development Lifecycle

Introduction to Design Patterns

Tuesday, October 4. Announcements

Lecture Notes UML UNIT-II. Subject: OOAD Semester: 8TH Course No: CSE-802

Introduction to Design Patterns

Metrics and OO. SE 3S03 - Tutorial 12. Alicia Marinache. Week of Apr 04, Department of Computer Science McMaster University

Chapter 12 (revised by JAS)

Lecture 13: Design Patterns

Specifications and Modeling

Introduction to Software Engineering

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

Facade and Adapter. Comp-303 : Programming Techniques Lecture 19. Alexandre Denault Computer Science McGill University Winter 2004

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

Abstraction. Abstraction

Lectures 24 and 25 Introduction to Architectural Styles and Design Patterns

OO Frameworks. Introduction. Using Frameworks

A Rapid Overview of UML

9/15/2009. Objectives. Part I: Organizational Issues. Joel Test: 12 Steps to better code. Joel Test: 12 Steps to better code

Introduction to Software Engineering: Object Design I Reuse & Patterns

Lecture Material. Design Patterns. Visitor Client-Server Factory Singleton

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

Object-Oriented Systems Development: Using the Unified Modeling Language

Software Reuse and Component-Based Software Engineering

10. Software Testing Fundamental Concepts

Web Services. Lecture I. Valdas Rapševičius. Vilnius University Faculty of Mathematics and Informatics

Welcome to Design Patterns! For syllabus, course specifics, assignments, etc., please see Canvas

2.1 Design Patterns and Architecture (continued)

5/9/2014. Recall the design process. Lecture 1. Establishing the overall structureof a software system. Topics covered

INSTITUTE OF AERONAUTICAL ENGINEERING

Domain Driven Design IS. An architectural methodology for evolving a software system that closely aligns to business requirements

Component-Based Software Engineering TIP

Design Patterns. CSC207 Winter 2017

Transcription:

The Joel Test (Joel On Software) Do you use source control? SVN Can you make a build in one step? make or IDE Do you make daily builds? N/A Do you have a bug database? N/A or is it? Do you fix bugs before writing new code? You SHOULD Do you have an up-to-date schedule? Do you have a spec? Do programmers have quiet working conditions? Do you use the best tools money can buy? Do you have testers? Do new candidates write code during their interview? Do you do hallway usability testing?

Design Patterns

Gang of Four

Design Patterns A design pattern is a general, repeatable solution to a commonly occurring problem in software design. A description or template for how to solve a problem that can be used in many different situations. (Wikipedia)

Design Patterns are not designs that can be transformed directly into code are not algorithms Algorithms deal with computational problems, not design problems

Uses Speed up design process by providing tested, proven design paradigms Allow developers to communicate using well-known, well understood names for software interactions

Criticisms Targets the wrong problem Lacks formal foundations Unlike components, does not provide reuse Leads to inefficient solutions Does not differ significantly from other abstractions

Important Sections of Design Structure Participants Collaboration Patterns These sections describe a design motif: : a prototypical micro-architecture that developers copy and adapt to their particular designs to solve the recurrent problem described by the design pattern

Structure Section A graphical representation of the pattern. Class diagrams and interaction diagrams may be used for this purpose.

Participants Section A listing of the classes and objects used in the pattern and their roles in the design.

Collaboration Section A description of how classes and objects used in the pattern interact with each other.

Classification Creational Structural Behavioral Fundamental Concurrency Architectural

How Does One Create a Pattern?

How Does One Create a Pattern? Patterns are not created or invented. They are discovered and documented.

Documentation Pattern Name and Classification Intent Also Known As Motivation (Forces) Applicability Structure Participants Collaboration Consequences Implementation Sample Code Known Uses Related Patterns

Creational Deal with object creation mechanisms Singleton When only one instance of a class can exist Examples: recover program A game loop

Structural ease the design by identifying a simple way to realize relationships between entities Façade - provide a simplified interface to underlying subsystems - example: JDBC, ODBC

Behavioral identify common communication patterns between objects Observer Objects that display the data are different from those that contain the data Example: Stock price display Textual display Graphical display

Architectural Model-View-Controller Image editor Flight simulator Model: Simulation View: Display(s) Controller: Flight controls

Flight Simulator (or FPS, for that matter) Model: simulation Environment Flight physics View: displays Multiple out the window displays Alternate perspectives Wingman view Adversary view Controller: Simulation Inputs Flight controls Environment

Model-View-Controller (Sun)

Model-View-Controller (Sun)

Model-View-Controller The Model-View-Controller ("MVC") design pattern decouples the model from its view, enabling loose coupling and the ability to change one without affecting the other. http://www.exciton.cs.rice.edu/javaresources/designpatterns/mvc.htm

Model-View The model should operate independently from the manner in which the view interacts with the user. The view should be tailored to meet the interaction needs of the user, independent of the model below it.

Controller the controller is responsible for mapping end-user action to application response The mouse click or the keyboard press maps to an action In games, you can configure your controls

Anti-Patterns Commonly-reinvented bad solutions to problems (Wikipedia)

Anti-Patterns Project management Design OO Design Programming Methodological Configuration Management

Programming Anti-patterns Copy and paste programming Programming by permutation: Trying to approach a solution by successively modifying the code to see if it works Golden hammer: Assuming that a favorite solution is universally applicable Silver bullet: Assuming that a favorite or technical solution can solve a larger process or problem. Premature optimization: Optimization on the basis of insufficient information Reinventing the wheel: Failing to adopt an existing, adequate solution Reinventing the square wheel: Creating a poor solution when a good one exists

Framework a framework can be viewed as the implementation of a system of design patterns Design patterns are more abstract than frameworks Design patterns are smaller architectural elements than frameworks Design patterns are less specialized than frameworks (Brad Appleton - )

To Learn More Wikipedia Portland Pattern Repository: c2.com/ppr/ Hillside Group: hillside.net/patterns/ Design Patterns Java Companion: www.patterndepot.com/put/8/javapatterns.htm