Week 2 Design Examples and Designing for Change Alex Baker.

Slides:



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

Object-Oriented Software Development CS 3331 Fall 2009.
Informatics 122 Software Design II 1 Portions of the slides in this lecture are adapted from a/classes/5448/f12/lectures/
Inheritance Definition Relationships Member Access Control Data Encapsulation Overloading vs. Overriding Constructors & Destructors.
The Bridge Pattern.. Intent Decouple an abstraction from its implementation so that the two can vary independently Also known as: Handle/Body.
Software Engineering and Design Principles Chapter 1.
Informatics 122 Software Design II Lecture 5 Emily Navarro Duplication of course material for any commercial purpose without the explicit written permission.
Introduction To System Analysis and Design
© 2009 University of California, Irvine – André van der Hoek1June 10, 2015 – 18:31:15 Informatics 122 Software Design II Lecture 2 André van der Hoek &
Inheritance. Extending Classes It’s possible to create a class by using another as a starting point  i.e. Start with the original class then add methods,
© 2009 University of California, Irvine – André van der Hoek1June 17, 2015 – 09:17:24 Informatics 122 Software Design II Lecture 6 André van der Hoek &
Week 8 Implementation Design Alex Baker. Implementation Design System Design – Describes what the system should do Implementation Design – Describes what.
Software Engineering CSE470: Requirements Analysis 1 Requirements Analysis Defining the WHAT.
© 2010 University of California, Irvine – André van der Hoek1June 26, 2015 – 00:06:40 Informatics 122 Software Design II Lecture 6 André van der Hoek &
1 CSE1301 Computer Programming: Lecture 25 Software Engineering 2.
CSE1301 Computer Programming: Lecture 29 Group Project: “Quabble”
Systems Design. Analysis involves understanding and documenting user requirements in a clear and unambiguous way. It focuses on the business side and.
Algorithm Programming Coding Advices Bar-Ilan University תשס " ו by Moshe Fresko.
PRJ566: PROJECT PLANNING AND MANAGEMENT Class Diagrams.
Copyright © 2002, Systems and Computer Engineering, Carleton University Intro.ppt * Object-Oriented Software Development Unit 1 Course.
Week 2 Design Examples and Designing for Change Alex Baker.
Chapter 13 Starting Design: Logical Architecture and UML Package Diagrams.
Design Patterns.
1/19 Component Design On-demand Learning Series Software Engineering of Web Application - Principles of Good Component Design Hunan University, Software.
Object Oriented Analysis and Design Introduction.
CSE 303 – Software Design and Architecture
Software Engineering Chapter 8 Fall Analysis Extension of use cases, use cases are converted into a more formal description of the system.Extension.
Ceg860 (Prasad)L6MR1 Modularity Extendibility Reusability.
Writing Quality Requirements Karl E. Wiegers Presented by: Ricardo Carlos.
Chapter 2 소프트웨어공학 Software Engineering 임현승 강원대학교
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
Detailed design – class design Domain Modeling SE-2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.
Introduction To System Analysis and Design
CSC 395 – Software Engineering Lecture 12: Reusability –or– Programming was Bjarne Again.
Chapter 17. Initial Object Design Inputs: requirements meetings various Use Cases – 10% complete Key risks addressed with preliminary programming System.
CSC 213 – Large Scale Programming. Today’s Goal  Improve design skills to make usable designs  Noun extraction & UML class diagram reviewed  Connections.
+ Informatics 122 Software Design II Lecture 6 Emily Navarro Duplication of course material for any commercial purpose without the explicit written permission.
SE: CHAPTER 7 Writing The Program
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.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 05. Review Software design methods Design Paradigms Typical Design Trade-offs.
GRASP: Designing Objects with Responsibilities
Requirement Handling
1 CMPT 275 High Level Design Phase Modularization.
Introduction to Design. What is Design? 2 minutes Pairs.
CSCI-383 Object-Oriented Programming & Design Lecture 10.
CS 350 – Software Design Expanding Our Horizons – Chapter 8 The traditional view of objects is that they are data with methods. Sometimes objects could.
Informatics 122 Software Design II Lecture 12 Emily Navarro Duplication of course material for any commercial purpose without the explicit written permission.
Software Engineering Principles Practical Advice and Steps for Managing Your Project.
Design. Practices Principles Patterns What are the characteristics of good design? What are good solutions to common design problems? How do we go about.
March 1, 2004CS WPI1 CS 509 Design of Software Systems Lecture #6 Monday, March 1, 2004.
ITEC0724 Modern Related Technology on Mobile Devices Lecture Notes #2 1.
Duke CPS Programming Heuristics l Identify the aspects of your application that vary and separate them from what stays the same ä Take what varies.
Oct. 16, 2003CS WPI1 CS 509 Design of Software Systems Lecture #7 Thursday, Oct. 16, 2003.
What is this? SE-2030 Dr. Mark L. Hornick 1. Same images with different levels of detail SE-2030 Dr. Mark L. Hornick 2.
+ Informatics 122 Software Design II Lecture 3 Emily Navarro Duplication of course material for any commercial purpose without the explicit written permission.
Dillon: CSE470: ANALYSIS1 Requirements l Specify functionality »model objects and resources »model behavior l Specify data interfaces »type, quantity,
Design I. Properties of good design Minimize complexity Maintainable Loose coupling Extensibility Reusability High fan in Low to medium fan out Portability.
Senior DesignSeattle Pacific UniversitySenior Design Design-1 Seattle Pacific University Stages of Engineering Design 1. Identify project and goals 2.
Design Patterns: MORE Examples
CS 350 – Software Design The Strategy Pattern – Chapter 9
Data Abstraction: The Walls
Apply Expert, Creator, Controller, Low Coupling, High Cohesion
Informatics 122 Software Design II
Informatics 122 Software Design II
Applying Use Cases (Chapters 25,26)
Applying Use Cases (Chapters 25,26)
Informatics 122 Software Design II
Informatics 122 Software Design II
Object Oriented Design & Analysis
Presentation transcript:

Week 2 Design Examples and Designing for Change Alex Baker

Implementation Design An implementation design is a road map – understandable, unambiguous, consistent, helpful, … An implementation design describes a path from system design to the outcome – correct, complete, concise, verifiable, effective, … An implementation design describes what the implementers should do – elegant, partitionable, recomposable, resilient, … An implementation design is a guide towards future change – evolvable, …

Emphasis: Changability Subtle Requires foresight and careful balancing An implementation design describes what the implementers should do – elegant, partitionable, recomposable, resilient, … An implementation design is a guide towards future change – evolvable, …

Emphasis: Changability Reusable Extensible Maintainable Portable Well-Documented Adaptable Simplicity Readability Minimalistic Elegant Well-Organized Concise Efficiency Powerful

Changability: Basic Principles Low Coupling: Reducing interdependency – Changes don’t propagate – Reuse is facilitated High Cohesion: Grouping functionality – Easier to find things – Metaphor guides decisions Information Hiding

Information Hiding Made Very Simple A List class with: 1) getArray() : Array 2) getElementAt(int i) : Element

Information Hiding Made Very Simple A List class with: 1) getArray() : Array 2) getElementAt(int i) : Element Its too slow, so we switch to a hash table 1) Everywhere you call getArray needs changing 2) Only List is changed Little things like this add up

The Ideal Program … vs.

Why the Emphasis on Changability? Change abounds… – During coding – After use – Reuse for later projects

Why is there so Much Change? Designs Outcomes

Why is there so Much Change? Designs Outcomes Engineering Physics Principles Existing Examples

Why is there so Much Change? Designs Outcomes Software Engineering Physics Principles Existing Examples

Why is there so Much Change? Designs Outcomes Software Engineering Physics Principles Existing Examples

Why is there so Much Change? Designs Outcomes Software Engineering Physics Principles Existing Examples

Why the Emphasis on Changability? Change abounds… – During coding – After use – Reuse for later projects You usually just don’t know for sure…

Changes During Coding Refinement of the high level design Dependencies reveal themselves – Oh, I need to know [X]. – I can’t access that data? ‘It turns out this class is HUGE’ Need to redesign as you go Can changes be made within the design?

Changes during Use Potential breakdowns at several levels – Customers have needs – Customers make requests – Developers provide software

Reuse A changing of context …

Change Happens Let’s design for it

Our Approach Lots of examples (3 problems, many solutions, today) Some overarching lessons Build up an intuition

UML Review: Class Diagrams Class Name Attribute : Type Operation (parameter) : Return Type Attribute : Type Operation (parameter) : Return Type

UML Review: Class Diagrams Association Aggregation Generalization Composition

A Class Diagram

Example #1: Theseus and the Minotaur

Original Theseus Design

What if we want to add “Water” ?

Original Theseus Design What if we want to add “Water” ? ?

Original Theseus Design ? What if we want to add “Water” ? How do we fix this?

TntM: Changes Changing the board size Adding terrain types Adding more monsters Adding a second player “Intelligent elements”

TntM 2

TntM 2: Object Interfaces & Inheritance

TntM: Changes Changing the board size Adding terrain types Adding more monsters Adding a second player “Intelligent elements”

How far is too far? Changing board size? Pushable blocks? Intelligent elements? Real time gameplay? Physics challenges?

TntM 2

Bonus! StompOn( stompee ) Or StompedOn( stomper )

Aside: Three Degrees of Support Is it a good solution? Can they build that solution? Can that solution be used to make other good solutions?

Example #2 Klax Blocks fall from above, use a paddle to catch Deposit blocks in one of 5 columns Try to make lines of 3 in a row or more klax_eng.php

A Good Klax Design?

Chiron 2 Architectural Style

C2 Klax

Spelling Klax?

Example #3: Scrabble

Function Overload Changes to rack

Class Overload

(besides missing details)

Is this a good design?

Overengineered? What change are you designing for? Multiple point values for a given tile type? More types of board objects?

Overengineered? Meanwhile: Board doesn’t actually work Populating the tiles is likely a hassle Tilepool vs. Player.currentTiles Inelegance lead to problems

A Nice Approach?

Scrabble Can a design accommodate: – Changes to letter values? – Changes to bonus squares? – AI opponents? – Different dictionaries?

Summary Designing for change is a matter of: – Controlling dependency – Proper encapsulation – Generalizing where you can Which changes? – What are the biggest change risks? – What kind of program is this, essentially? – Where is “the line”?

Practically: What is the core we know will be true? – What variations on that will we see? If there’s something that needs to change: – Can it be changed in one place? – Does anything else need to be changed when it changes? Can each class ignore its context? Discipline

Assignment #1 Continued []