CS 2340 Objects and Design

Similar documents
Patterns and Testing

Clean Boundaries. Christopher Simpkins Chris Simpkins (Georgia Tech) CS 2340 Objects and Design CS / 10

Ingegneria del Software Corso di Laurea in Informatica per il Management. Software quality and Object Oriented Principles

On to OO design ideas. Really just an introduction (much more in CS 48) About programming in the large

Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page:

CASE TOOLS LAB VIVA QUESTION

Object Design Guidelines

Goal: build an object-oriented model of the realworld system (or imaginary world) Slicing the soup: OOA vs. OOD

[Sample] Quality Report: <<project>>

Chapter 1: Principles of Programming and Software Engineering

Object-Oriented Design. Module UFC016QM. and Programming. Objects and Classes. O-O Design Unit 2: Faculty of Computing, Engineering

Topic : Object Oriented Design Principles

Introduction to Software Engineering (2+1 SWS) Winter Term 2009 / 2010 Dr. Michael Eichberg Vertretungsprofessur Software Engineering Department of

Characterizing your Objects

06. Analysis Modeling

Object-Oriented Systems Analysis and Design Using UML

Review: Cohesion and Coupling, Mutable, Inheritance Screen Layouts. Object-Oriented Design CRC Cards - UML class diagrams

CS 1331 Introduction to Object Oriented Programming

Testing. Christopher Simpkins Chris Simpkins (Georgia Tech) CS 2340 Objects and Design CS / 13

CS 2340 Objects and Design - Scala

1: Introduction to Object (1)

Review sheet for Final Exam (List of objectives for this course)

Outline. Software Rots

A Data Modeling Process. Determining System Requirements. Planning the Project. Specifying Relationships. Specifying Entities

CHAPTER 9 DESIGN ENGINEERING. Overview

Chapter 1: Programming Principles

CS504-Softwere Engineering -1 Solved Objective Midterm Papers For Preparation of Midterm Exam

INTERNAL ASSESSMENT TEST III Answer Schema

Object Analysis & Design in the textbook. Introduction to GRASP: Assigning Responsibilities to Objects. Responsibility-Driven Design

Design and Information Hiding

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING CS2353-OBJECT ORIENTED ANALYSIS AND DESIGN. Unit-I. Introduction to OOAD

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

Object Visibility: Making the Necessary Connections

20 Years of. Improve the Design of your Code. Dr Dimitris Dranidis JAVA Meetup Group, Thessaloniki May 2015

A few more things about Agile and SE. Could help in interviews, but don t try to bluff your way through

Objectives. Explain the purpose and objectives of objectoriented. Develop design class diagrams

Chapter 2: The Object-Oriented Design Process

Objectives. Architectural Design. Software architecture. Topics covered. Architectural design. Advantages of explicit architecture

Topic 3 Unified Modeling Language UML. Objective: Student will use UML to represent relationshiops between objects, its structure and dynamics.

A - 1. CS 494 Object-Oriented Analysis & Design. UML Class Models. Overview. Class Model Perspectives (cont d) Developing Class Models

17. GRASP: Designing Objects with Responsibilities

Single Responsibility Principle (SRP)

Programmazione. Prof. Marco Bertini

5 Object Oriented Analysis

Chapter : Analysis Modeling

Software Engineering

LABORATORY 1 REVISION

Principles of Object-Oriented Design

UML Fundamental. OutLine. NetFusion Tech. Co., Ltd. Jack Lee. Use-case diagram Class diagram Sequence diagram

Architectural Design

Announcements. How to build a UML model. Rational Unified Process. How RUP builds a model. UI design. Architect

Object- Oriented Design with UML and Java Part I: Fundamentals

Use-Case Analysis. Architecture Oriented Analysis. R. Kuehl/J. Scott Hawker p. 1 R I T. Software Engineering

17.11 Bean Rules persistent

Security Engineering for Software

1. Introduction to Object Oriented Software Development

Clean Classes. Christopher Simpkins Chris Simpkins (Georgia Tech) CS 2340 Objects and Design CS / 11

Architectural Design. Topics covered. Architectural Design. Software architecture. Recall the design process

McCa!"s Triangle of Quality

Design. Eric McCreath

CS112 Lecture: Defining Instantiable Classes

Introduction to UML. Danang Wahyu utomo

Appendix A - Glossary(of OO software term s)

Agile vs Fragile. Susmit Bhattacharya, Solution Architect, Asia Pacific. - The need for Automation in Agile Tricentis GmbH. All Rights Reserved.

Object Oriented Analysis is popular approach that sees a system from the viewpoint of the objects themselves as they function and interact

SE310 Analysis and Design of Software Systems

Lecture 16: (Architecture IV)

Object-Oriented Design and Modeling Using the UML

CS487 Midterm Exam Summer 2005

Abstraction. Design fundamentals in OO Systems. Fundamental Software Development Principles

Accessibility. EEC 521: Software Engineering. Classes and Objects. Inheritance. Classes and Objects (OO Analysis)

Principles of OO Design

ArchiMate 2.0. Structural Concepts Behavioral Concepts Informational Concepts. Business. Application. Technology

Classes and Objects. Object Orientated Analysis and Design. Benjamin Kenwright

S T R U C T U R A L M O D E L I N G ( M O D E L I N G A S Y S T E M ' S L O G I C A L S T R U C T U R E U S I N G C L A S S E S A N D C L A S S D I A

GRASP: Patterns for. chapter18

Agile Model-Driven Development with UML 2.0 SCOTT W. AM BLER. Foreword by Randy Miller UNIFIED 1420 MODELING LANGUAGE. gile 1.

CSE 403 Lecture 8. UML Class Diagrams. Thanks to Marty Stepp, Michael Ernst, and other past instructors of CSE 403

SE 2730 Final Review

Chapter 3 System Models

All the subjective part of 2011 papers solved complete reference numbers

COURSE 2 DESIGN PATTERNS

Object-Oriented Design

Software Design Fundamentals. CSCE Lecture 11-09/27/2016

CS 2340 Objects and Design

Chapter 10. Object-Oriented Analysis and Modeling Using the UML. McGraw-Hill/Irwin

Object-Oriented Design

Chapter 10 Object-Oriented Design Principles

Expanding Our Horizons. CSCI 4448/5448: Object-Oriented Analysis & Design Lecture 9 09/25/2011

CaseComplete Roadmap

The Software Design Process. CSCE 315 Programming Studio, Fall 2017 Tanzir Ahmed

The ATCP Modeling Framework

Sub- PPL Unit-I Class-SE Comp

A Collaborative User-centered Approach to Fine-tune Geospatial

Objectives Pre-Test Questions Introduction Collaboration Diagrams Flow of Events and Special Requirements...

Introduction to Software Engineering: Analysis

Object-Oriented Software Engineering Practical Software Development using UML and Java

Basic Structural Modeling. Copyright Joey Paquet,

Software Engineering Design & Construction Dr. Michael Eichberg Fachgebiet Softwaretechnik Technische Universität Darmstadt

Chapter 7: Software Engineering. Copyright 2015 Pearson Education, Inc.

Transcription:

CS 2340 Objects and Design Software Design Christopher Simpkins chris.simpkins@gatech.edu Chris Simpkins (Georgia Tech) CS 2340 Objects and Design Software Design 1 / 6

Design Design (noun) A plan or protocol for carrying out or accomplishing something. Webster s Dictionary Engineering design (verb): A systematic, intelligent process in which designers generate, evaluate and specify designs for devices, systems, or processes whose form(s) and function(s) acheive clients objectives and users needs while satisfying a specified set of constraints. Dym and Little, quoted in Carlos Otero, Software Engineering Design Chris Simpkins (Georgia Tech) CS 2340 Objects and Design Software Design 2 / 6

Fundamental Design Principles Otero Modularization Abstraction Encapsulation Coupling and Cohesion Separation of interface and implementation Suficiency and completeness Chris Simpkins (Georgia Tech) CS 2340 Objects and Design Software Design 3 / 6

Object Design Wirfs-Brock Design driven by roles and responsibilities Write story about system, identify themes and abstractions, identify candidate roles/classes that support themes When candidates identified, model reponsibilities and collaborations Exploratory design with CRC cards (candidates, responsibilities, collaborations) Object roles often fit into these steriotypes: Informatoin holder knows and provides information Structurer maintains relationships between objects and information about those relationships Service provider performs work and, in general, offers computing services Coordinator reacts to events by delegating tasks to others Controller makes decisions and closely directs others actions Interfacer transofrms information and requests between idstinct parts of the system Chris Simpkins (Georgia Tech) CS 2340 Objects and Design Software Design 4 / 6

Software Development is not Engineering Reeves Software development is not engineering (at least not in the traditional sense). In traditional engineering: Engineers (design team) create detailed designs Designs are given to manufacturing teams to build If design is complete, no further input from design team is necessary Building can be very expensive Bugs in hardware design even more expensive: e.g., if design error in a car is not caught early, thousands of cars can be sold with defects resulting in deaths and recalls, bridges can collapse, etc. Feedback cycle very long and expensive, leading to traditional engineering s fetish with detailed documentation Chris Simpkins (Georgia Tech) CS 2340 Objects and Design Software Design 5 / 6

The Code is the Design Reeves Fundamental principle of software design: The code is the design. Jack Reeves, 1992 In software development: Source code is given to a compiler and linker, which builds the runnable software very quickly and inexpensively Tight feedback loop Easy to generate complex designs Testing and debugging is part of the design process Software design is about managing complexity. Chris Simpkins (Georgia Tech) CS 2340 Objects and Design Software Design 6 / 6

Agile Design Martin Fundamental principle of agile design: The code is the design. Jack Reeves, 1992 Design Smells Rigidity system is too hard to change becuase change in one place forces changes in many other places Fragility changes break things that are conceptually unrelated Immobility too hard to resuse components in other systems Viscosity hard to do it right, easy to do it wrong Needless Complexity infrastructure with no direct benefit Needless Repetition repeated structures that could be unified under a single abstraction Opacity hard to read and understand Design smells avoided or fixed by applying design principles like SRP, OCP... Chris Simpkins (Georgia Tech) CS 2340 Objects and Design Software Design 7 / 6

Levels of Design High-level: system architecture Stand-alone Client-server N-tier Service-oriented architecture Detailed Design Classes and methods Data interchange formats (XML schema, JSON) Entity-relationship models, database schema Chris Simpkins (Georgia Tech) CS 2340 Objects and Design Software Design 8 / 6

Unified Modeling Langauge (UML) A standardized diagrammatic language for communicating OO designs in a language-independent way. Very rich, but for now focus on: use cases, domain model (classes and associations), packages, and sequence digrams. Chris Simpkins (Georgia Tech) CS 2340 Objects and Design Software Design 9 / 6

Use Cases A use case describes some user s interaction with the system. Most use cases contain: an actor, here simply User, a use case, here Create new todo, and (optionally) a system boundary, here tomcat-todo. Chris Simpkins (Georgia Tech) CS 2340 Objects and Design Software Design 10 / 6

Class Diagrams Class diagrams contain a class name, here Todo, instance variables, here title and task. Note that types are given after names, as in : String. The - means private. methods. The + means public. ( # means protected, but we have no protected members in this example.) Chris Simpkins (Georgia Tech) CS 2340 Objects and Design Software Design 11 / 6

Associations TodoDb is italicized, meaning it is abstract. The «interface» further means that it is an interface. TodoDbHashMapImpl is a subtype of TodoDb. TodoDbHashMapImpl is composed of a HashMap<K,V>. HashMap is a paramterized type with type parameters K and V. TodoDb aggregates Todo objects. Chris Simpkins (Georgia Tech) CS 2340 Objects and Design Software Design 12 / 6

Packages The tab shows the package name. The main box lists classes and interfaces using the same +, -, and # visibility modifiers used for members in class diagrams. An alternative form is to simply put the package name in the main box and not list the members of the package. Chris Simpkins (Georgia Tech) CS 2340 Objects and Design Software Design 13 / 6

Sequence Diagrams The top rectangles represent objects (instances of types/classes). Time progresses vertically downward. The dashed lines represent object lifetimes. The narrow vertical boxes represent operations of the objects (here, only create on the tododb object). Arrows are messages or method calls and returns. Chris Simpkins (Georgia Tech) CS 2340 Objects and Design Software Design 14 / 6

Closing Thoughts Design is an art born of empirical science and intuitive experience Practical experience and formal studies of software systems have produced design principles and guidelines Design involves tradeoffs balancing constraints means prioritizing And a final word about design documentation: if Jack Reeves is right (and I think he is), then The code is the design, produced by the design team, The compiler and linker are the manufacturing team, and Compilers and linkers don t use design documents. Design documents are for other "designers" to help them understand the code Punch line: design documents are like comments they make up for lack of expressivity in the code. They re a necessary evil at best, not the "point" of design. Chris Simpkins (Georgia Tech) CS 2340 Objects and Design Software Design 15 / 6