CS 307: Software Engineering. Lecture 10: Software Design and Architecture

Similar documents
Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 9: Architecting and Designing Software

Lethbridge/Laganière 2005 Chapter 9: Architecting and designing software 6

CS 307: Software Engineering. Lecture 9: Software Design (Coupling), Modeling Interactions and Behavior

XVIII. Software Architectures

Software Architecture

XIX. Software Architectures

Lecture 19 Engineering Design Resolution: Generating and Evaluating Architectures

Practical issues. Software system engineering (2IW60) Practical issues. Software Engineering topics. Examination:

Checklist for Requirements Specification Reviews

System Design. Acknowledge: Atlee and Pfleeger (Software Engineering: Theory and Practice)

Software Requirements Specification. <Project> for. Version 1.0 approved. Prepared by <author(s)> <Organization> <Date created>

CS211 Lecture: Design Quality; Cohesion and Coupling; Packages

Security Engineering for Software

ADVANCED SOFTWARE DESIGN LECTURE 4 SOFTWARE ARCHITECTURE

Software Architecture. Definition of Software Architecture. The importance of software architecture. Contents of a good architectural model

Marking Guidelines for MVK Projects. MVK12. Version 6.2 (PPD, URD, RURD, ADD and software demo)

Introduction to Architecture. Introduction to Architecture 1

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

Interface (API) Design

In this Lecture you will Learn: System Design. System Architecture. System Architecture

Verification and Validation

Memory Safety (cont d) Software Security

COMP 6471 Software Design Methodologies

Design Concepts and Principles

Sample Exam. Advanced Test Automation - Engineer

CAS 703 Software Design

System Design. Design: HOW to implement a system

Architectural Styles I

CSE 435: Software Engineering. System Design

Architecture and Design Evolution

Architectural Design

The Road Map. SE203b: OO Design for Software Engineers. W8: OO Design Approach

Software Development Chapter 1

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

Sub- PPL Unit-I Class-SE Comp

Darshan Institute of Engineering & Technology for Diploma Studies

Systems-Level Architecture. A Re-Introduction Arch. Reintro CSC Level of Design. Divide into two levels:

System Design. Design Issues. System Design. System Design. Design: HOW to implement a system. Strategic vs. Local Design Decisions.

Architectural Design. Architectural Design. Software Architecture. Architectural Models

Design: HOW to implement a system

Lecture 16: (Architecture IV)

Software Requirements Specification. <Project> for. Version 1.0 approved. Prepared by <author> <organization> <date created>

SYMANTEC: SECURITY ADVISORY SERVICES. Symantec Security Advisory Services The World Leader in Information Security

Chapter 6 Architectural Design. Lecture 1. Chapter 6 Architectural design

Model-View-Controller Patterns and Frameworks. MVC Context

Software Engineering

Chapter 6 Architectural Design. Chapter 6 Architectural design

Object-Oriented Design

Introduction to Software Engineering

Software Engineering Testing and Debugging Testing

Corso di Progettazione di Applicazioni Web e Mobile

Object Oriented Programming

Engr. M. Fahad Khan Lecturer Software Engineering Department University Of Engineering & Technology Taxila

CSSE 374: Logical Architecture. Shawn Bohner Office: Moench Room F212 Phone: (812)

Design Patterns Design patterns advantages:

Chapter 2 Distributed Information Systems Architecture

Software Architecture

Lecture 1. Chapter 6 Architectural design

Marking Guidelines for MVK Projects. MVK11. Version 6.2 (PPD, URD, ADD, revised URD+ADD, and software demo)

Topics in Object-Oriented Design Patterns

Universal Model Framework -- An Introduction

15-498: Distributed Systems Project #1: Design and Implementation of a RMI Facility for Java

A tutorial report for SENG Agent Based Software Engineering. Course Instructor: Dr. Behrouz H. Far. XML Tutorial.

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

Northeastern University - Seattle. Computer and Information Sciences

Lectures 24 and 25 Introduction to Architectural Styles and Design Patterns

Architectural Styles II

Architectural Styles I

Design Engineering. Overview

Refresher: Lifecycle models. Lecture 22: Moving into Design. Analysis vs. Design. Refresher: different worlds. Analysis vs. Design.

Specifying and Prototyping

The Analysis and Design of the Object-oriented System Li Xin 1, a

Splitting the pattern into the model (this stores and manipulates the data and executes all business rules).

Seminar report Software reuse

Evolutionary Architecture and Design

CS 520 Theory and Practice of Software Engineering Fall 2018

SOFTWARE REQUIREMENTS ENGINEERING LECTURE # 7 TEAM SKILL 2: UNDERSTANDING USER AND STAKEHOLDER NEEDS REQUIREMENT ELICITATION TECHNIQUES-IV

Software Engineering Fall 2015 (CSC 4350/6350) TR. 5:30 pm 7:15 pm. Rao Casturi 11/10/2015

Chapter Outline. Chapter 2 Distributed Information Systems Architecture. Distributed transactions (quick refresh) Layers of an information system

Administrivia. Wednesday: Requirements and Specification. CS169 Lecture 4. We assign teams and you start on Monday. Determining Stakeholders and Needs

XVIII. Software Architectures

An Introduction to Software Architecture By David Garlan & Mary Shaw 94

Software Architectures

Why testing and analysis. Software Testing. A framework for software testing. Outline. Software Qualities. Dependability Properties

Software Engineering Fall 2014

Product Quality Engineering. RIT Software Engineering

Architecture CSE 403. Fallingwater by Frank Lloyd Wright

MSO Lecture Design by Contract"

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

User interface design. Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 16 Slide 1

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

TA hours and labs start today. First lab is out and due next Wednesday, 1/31. Getting started lab is also out

RED HAT ENTERPRISE LINUX. STANDARDIZE & SAVE.

ECE519 Advanced Operating Systems

Chapter 8: Class and Method Design

Migration to Service Oriented Architecture Using Web Services Whitepaper

The Open Group SOA Ontology Technical Standard. Clive Hatton

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING CS SOFTWARE ENGINEERING

EINDHOVEN UNIVERSITY OF TECHNOLOGY

Sample Exam. Advanced Test Automation Engineer

Transcription:

CS 307: Software Engineering Lecture 10: Software Design and Architecture Prof. Jeff Turkstra 2017 Dr. Jeffrey A. Turkstra 1

Announcements Discuss your product backlog in person or via email by Today Office hours today end at 12:45pm Git Tutorial Session Tonight at 7pm HAAS G040 Design document due Monday, February 6 2017 Dr. Jeffrey A. Turkstra 2

Lecture 10 Design-related quality Software design Design principles Software architecture Architectural patterns Design document 2017 Dr. Jeffrey A. Turkstra 3

Design specification quality Understandable by all concerned parties Unambiguous one interpretation for each requirement Complete nothing overlooked Verifiable compliance can be checked. Will know when done Consistent no conflicting requirements 2017 Dr. Jeffrey A. Turkstra 4

Modifiable change control is in place, and we can change it Traceable we can find things easily 2017 Dr. Jeffrey A. Turkstra 5

Developer quality issues Testable we can test it Maintainable we can repair it or port it Enhanceable we can easily enhance its value Correct it has zero know defects Robust fail-safe in the users operational environment 2017 Dr. Jeffrey A. Turkstra 6

Reliable long MTBF and short MTTR. Quick recovery time Installable easy to install in user s environment Liability safety and security risks are acceptable Manufacturable we can reproduce it Marketable we can sell it 2017 Dr. Jeffrey A. Turkstra 7

User quality issues Affordable they are willing to pay for it Valuable something they want and/or need Correct satisfies expectations, zero defects as used Usable easy to use in user s environment with a low work load 2017 Dr. Jeffrey A. Turkstra 8

Learnable effort is worth the time and cost. Good documentation and online help is available Robust tolerant of user errors Safety causes no harm Security protects user s property rights Serviceable quality help available and affordable Tailorable can adapt to user s needs 2017 Dr. Jeffrey A. Turkstra 9

What is design?...the process of applying various techniques and principles for the purpose of defining a process or a system in sufficient detail to permit its physical realization E.S. Taylor 2017 Dr. Jeffrey A. Turkstra 10

Designs Describe how to implement functional requirements given constraints imposed by Quality Platform Process Budget etc 2017 Dr. Jeffrey A. Turkstra 11

Design issues Sub-problems of the overall design Often have several alternative solutions (options( options) Design decision chooses among these options The best option Trade-off analysis 2017 Dr. Jeffrey A. Turkstra 12

Making decisions Leverage knowledge of Requirements Design so far Available technology Design principles and best practices Past experience 2017 Dr. Jeffrey A. Turkstra 13

Design space Set of possible designs that solve a given problem 2017 Dr. Jeffrey A. Turkstra 14

Component Any piece of software or hardware that has a clear role May be isolated Can swap with another component providing equivalent functionality Often designed to be reusable 2017 Dr. Jeffrey A. Turkstra 15

Module Type of component E.g., methods, classes, and packages in Java 2017 Dr. Jeffrey A. Turkstra 16

System A logical entity,, having a set of definable responsibilities or objectives Consists of hardware, software, or both Specification implemented by a collection of components Continues to exist even if components are changed or replaced 2017 Dr. Jeffrey A. Turkstra 17

Subsystem System that is part of a larger system Usually with a defined interface 2017 Dr. Jeffrey A. Turkstra 18

Top-down Design Start with high level structure Gradually work down to detailed decisions and low-level constructs Bottom-up Make decisions about reusable low-level components Decide how to put them together to create high-level constructs 2017 Dr. Jeffrey A. Turkstra 19

Why not both? Mix of top-down and bottom-up approaches are normally used Top-down design, bottom-up implementation 2017 Dr. Jeffrey A. Turkstra 20

Aspects of design Architecture Division into subsystems and components Their connections Interactions Interfaces Class design Various features of classes User interface design Algorithm design 2017 Dr. Jeffrey A. Turkstra 21

Good Design Reduces cost and increases quality Conforms to requirements Accelerates (helps) development Satisfies qualities e.g., Usability Efficiency Reliability Maintainability Reusability 2017 Dr. Jeffrey A. Turkstra 22

Design principles Divide and conquer Increase cohesion Reduce coupling Maximize abstraction Increase reusability Reuse other designs and code Design for flexibility 2017 Dr. Jeffrey A. Turkstra 23

Divide and conquer It is easier to deal with a series of smaller things than something big all at once Separate people can work on each part Individual software engineers can specialize Individual components are smaller and easier to understand Components can be replaced or modified without impacting other system parts 2017 Dr. Jeffrey A. Turkstra 24

Dividing Distributed system clients and servers Subsystems Packages Classes Methods 2017 Dr. Jeffrey A. Turkstra 25

Increase cohesion Keep things together that are related Keep unrelated things out System as a whole is easier to understand Easier to change Types of cohesion: functional, communicational or informational, procedural, temporal, logical, coincidental 2017 Dr. Jeffrey A. Turkstra 26

Reduce coupling Coupling occurs when modules have interdependence Changes in one place require changes elsewhere Harder to see how a component works Types of coupling: data, stamp, control, external, common, content 2017 Dr. Jeffrey A. Turkstra 27

Maximize abstraction Ensure your designs allow you to hide or defer consideration of details Reduces complexity Good abstraction information hiding Permits one to understand the essence of a subsystem without knowing its details 2017 Dr. Jeffrey A. Turkstra 28

Increase reusability Design components so they can be used again in other contexts Generalize Simplify 2017 Dr. Jeffrey A. Turkstra 29

Reuse Complementary to design for reusability Reusing designs or code allows you to take advantage of the investment you and others have made in reusable components 2017 Dr. Jeffrey A. Turkstra 30

Flexibility Actively anticipate changes that a design may undergo in the future, and prepare for them Reduce coupling, increase cohesion Create abstractions Do not hard-code anything Use reusable code and make code reusable 2017 Dr. Jeffrey A. Turkstra 31

Anticipate obsolescence Plan for changes in technology and environment so the software can continue to run Avoid using early releases of technology Avoid software libraries that are specific to an environment Avoid undocumented features 2017 Dr. Jeffrey A. Turkstra 32

Avoid software and hardware from companies that are less likely to provide long-term support Use standard languages and technologies that are supported by multiple vendors 2017 Dr. Jeffrey A. Turkstra 33

Portability Make sure that the software can run on as many platforms as needed Avoid using facilities that are specific to a particular environment E.g., a library only available in Microsoft Windows 2017 Dr. Jeffrey A. Turkstra 34

Testability Take steps to make testing easier Design a program to automatically test the software More later Ensure all functionality can be driven by an external program, bypassing the GUI In Java, can create a main() method in each class to exercise other methods 2017 Dr. Jeffrey A. Turkstra 35

Defensive design Never trust how others will use a component that you are designing Handle all cases where other code might attempt to use your component inappropriately Check and validate all inputs to your component 2017 Dr. Jeffrey A. Turkstra 36

Design by contract Defensive design in a systematic way Each method has a contract with callers that asserts: What preconditions are true on entry What postconditions are true on exit What invariants exist during execution 2017 Dr. Jeffrey A. Turkstra 37

Making good design decisions List and describe alternatives for a design decision List advantages and disadvantages of each Consider your objectives and priorities Choose the alternative that best meets your objectives 2017 Dr. Jeffrey A. Turkstra 38

Software Architecture Set of structures that can be used to reason about a system Comprises software elements, relations among them, and properties of both * some slides based on material developed by CS student Joe Koncel 2017 Dr. Jeffrey A. Turkstra 39

Architectural decisions Choices about fundamental system structure core of design Determines overall efficiency, reusability, and maintainability of system Expensive to change once implemented 2017 Dr. Jeffrey A. Turkstra 40

Importance Enables everyone to better understand the system Allows people to work on individual pieces in isolation Prepares for extension of the system Facilitates reuse and reusability 2017 Dr. Jeffrey A. Turkstra 41

Good architectural models Contain a logical breakdown of subsystems Separation of concerns Document interfaces between subsystems Capture dynamics of component interactions Outline shared data Are quality-driven 2017 Dr. Jeffrey A. Turkstra 42

Stability Architectural models should be stable Ensure maintainability and reliability Stable means features and components can be added or changed without impacting the overall architecture 2017 Dr. Jeffrey A. Turkstra 43

Developing an architectural model Start by sketching an outline of the architecture Based on principal requirements and use cases Determine the main components Apply architectural patterns when appropriate 2017 Dr. Jeffrey A. Turkstra 44

Refine the architecture Decide how data and functionality will be distributed among the components Identify main ways components interact and their interfaces Decide if a framework exists that can be re-used Consider each use case and adjust the architecture to make it realizable 2017 Dr. Jeffrey A. Turkstra 45

Architectural patterns Like software design patterns, there are software architecture patterns Called architectural patterns or styles Each pattern has A context A problem A solution 2017 Dr. Jeffrey A. Turkstra 46

Multi-Layer pattern Problem system components need to be built and tested independently Solution define layers (groupings of cohesive modules) and a unidirectional allowed-to-use relation among the layers Often illustrated with stacked boxes representing layers on top of each other 2017 Dr. Jeffrey A. Turkstra 47

Separate layer for UI Layers below UI provide application functions Determined by use cases Bottom layers provide general services Network communication Database access etc 2017 Dr. Jeffrey A. Turkstra 48

Example 2017 Dr. Jeffrey A. Turkstra 49

What about those design principles? Divide and conquer Increase cohesion Reduce coupling Maximize abstraction Increase reusability Reuse Flexibility Anticipate obsolescence Portability Testability Defensive design 2017 Dr. Jeffrey A. Turkstra 50

Client-server architecture Problem large number of distributed clients need access to shared resources or services Solution client components initiate interactions with server components, invoking services as needed and waiting on results 2017 Dr. Jeffrey A. Turkstra 51

Example 2017 Dr. Jeffrey A. Turkstra 52

Design principles? Divide and conquer Increase cohesion Reduce coupling Maximize abstraction Increase reusability Reuse Flexibility Anticipate obsolescence Portability Testability Defensive design 2017 Dr. Jeffrey A. Turkstra 53

Transaction-processing pattern Problem system must read and handle series of inputs that change stored data Solution dispatcher component that decides how to handle each transaction (input), calling a procedure or messaging a component 2017 Dr. Jeffrey A. Turkstra 54

2017 Dr. Jeffrey A. Turkstra 55

Design principles? Divide and conquer Increase cohesion Reduce coupling Maximize abstraction Increase reusability Reuse Flexibility Anticipate obsolescence Portability Testability Defensive design 2017 Dr. Jeffrey A. Turkstra 56

Pipe-and-filter Stream of data is passed through a series of processes Each transforms it in some way Data is constantly fed into the pipeline Processes work concurrently Architecture is flexible Almost all components could be removed Components are easily replaced New components easily added Easy to reorder 2017 Dr. Jeffrey A. Turkstra 57

2017 Dr. Jeffrey A. Turkstra 58

Design principles? Divide and conquer Increase cohesion Reduce coupling Maximize abstraction Increase reusability Reuse Flexibility Anticipate obsolescence Portability Testability Defensive design 2017 Dr. Jeffrey A. Turkstra 59

Model-View-Controller (MVC) Problem UI needs frequent modification without impacting system s functionality Solution break system into three components model, view, and controller controller mediates between the model and the view 2017 Dr. Jeffrey A. Turkstra 60

MVC Model contains underlying classes Instances are viewed and manipulated View contains objects that render the appearance (UI) of data from the model Controller contains objects that control and handle user s interaction with the view and the model 2017 Dr. Jeffrey A. Turkstra 61

2017 Dr. Jeffrey A. Turkstra 62

MVC on the WWW View component generates HTML Displayed by browser Controller interprets HTTP POSTs s from the browser Model is the underlying system Manages the information 2017 Dr. Jeffrey A. Turkstra 63

Design principles? Divide and conquer Increase cohesion Reduce coupling Maximize abstraction Increase reusability Reuse Flexibility Anticipate obsolescence Portability Testability Defensive design 2017 Dr. Jeffrey A. Turkstra 64

Service-oriented Problem service consumers must be able to use/access a number of service providers Without understanding the implementation Solution cooperating peers that request service from and provide services to one another across a network Called web services on the Internet 2017 Dr. Jeffrey A. Turkstra 65

2017 Dr. Jeffrey A. Turkstra 66

Design principles? Divide and conquer Increase cohesion Reduce coupling Maximize abstraction Increase reusability Reuse Flexibility Anticipate obsolescence Portability Testability Defensive design 2017 Dr. Jeffrey A. Turkstra 67

Good design documents Aid in making better designs Force you to be explicit Consider important issues before implementation Allow people to review the design and improve it Are a means of communication Between those implementing the design Those who need to modify the design Those who need to interface with the system 2017 Dr. Jeffrey A. Turkstra 68

Our design document Purpose briefly explain the system you are designing Design outline Outline your design decisions (e.g., client-server model) Identify system components Describe their purpose Describe interactions Include at least one UML diagram showing high-level system structure 2017 Dr. Jeffrey A. Turkstra 69

Design issues Spend a lot of time thinking about design issues One or two is not sufficient for full credit Each design issue should have: Descriptive title Potential solutions Justification for your choice May be divided into two subsections Functional Issues and Non-Functional Issues 2017 Dr. Jeffrey A. Turkstra 70

Design details Class-level design of the system Read: class diagrams Be as detailed as practical Describe classes and interactions between the classes Use sequence diagrams to show system activities Include activity (or state diagrams) Include UI mockups 2017 Dr. Jeffrey A. Turkstra 71

Avoid Documenting information that is readily obvious to a skilled programmer or designer Writing details that would make better code comments Writing details that can be extracted automatically from code E.g., list of public methods 2017 Dr. Jeffrey A. Turkstra 72

Questions? 2017 Dr. Jeffrey A. Turkstra 73