High-level Design. What is software architecture?



Similar documents
Software Engineering

Advanced Analysis and Design

KWIC Exercise. 6/18/ , Spencer Rugaber 1

Software Architecture. New wine in old bottles? (i.e., software architecture global design?, architect designer)

Architecture. Reda Bendraou

Chap 1. Introduction to Software Architecture

Software design (Cont.)

The Role of the Software Architect

An Introduction to Software Architecture

Software Development Process

Object Oriented Design

Best-Practice Software Engineering: Software Processes to Support Project Success. Dietmar Winkler

Information Systems Analysis and Design CSC John Mylopoulos. Software Architectures Information Systems Analysis and Design CSC340

Web Application Architectures

Announcements. SE 1: Software Requirements Specification and Analysis. Review: Use Case Descriptions

Applying 4+1 View Architecture with UML 2. White Paper

Managing Variability in Software Architectures 1 Felix Bachmann*

Software Life-Cycle Management

Service Oriented Architecture (SOA) An Introduction

Domain Modeling. Domain Modeling

Tool Support for Software Variability Management and Product Derivation in Software Product Lines

A Comparison of Service-oriented, Resource-oriented, and Object-oriented Architecture Styles

Vragen. Architecture presentations in practice. Some terms (from IEEE standard)

Service Oriented Architecture

Software Quality Factors OOA, OOD, and OOP Object-oriented techniques enhance key external and internal software quality factors, e.g., 1. External (v

Architecture Design & Sequence Diagram. Week 7

RUP Design. Purpose of Analysis & Design. Analysis & Design Workflow. Define Candidate Architecture. Create Initial Architecture Sketch

Systems Integration: Co C mp m onent- t bas a e s d s o s ftw ft a w r a e r e ngin i eeri r n i g

Decomposition into Parts. Software Engineering, Lecture 4. Data and Function Cohesion. Allocation of Functions and Data. Component Interfaces

Object-oriented design methodologies

Web Services Software Architecture

IV. Software Lifecycles

Use Cases. Reference: Craig Larman, Applying UML and Patterns, Ch. 6

Scenario-based Requirements Engineering and User-Interface Design

The Service Revolution software engineering without programming languages

Software Architecture Document

Contents. Introduction and System Engineering 1. Introduction 2. Software Process and Methodology 16. System Engineering 53

In this Lecture you will Learn: Systems Development Methodologies. Why Methodology? Why Methodology?

A Case Study in the Design of a Restaurant Management System

To introduce software process models To describe three generic process models and when they may be used

Software Project Management and UML

Introduction to Web Services

Service Oriented Architecture

[1] [2]

Software Development in the Large!

Engineering Design. Software. Theory and Practice. Carlos E. Otero. CRC Press. Taylor & Francis Croup. Taylor St Francis Croup, an Informa business

Communication Diagrams

Karunya University Dept. of Information Technology

Business-Driven Software Engineering Lecture 3 Foundations of Processes

Aerospace Software Engineering

Time Monitoring Tool Software Development Plan. Version <1.1>

A Software Engineering Approach For GIS Developing

COSC 3351 Software Design. Recap for the first quiz. Edgar Gabriel. Spring For the 1 st Quiz

SOFT 437. Software Performance Analysis. Ch 5:Web Applications and Other Distributed Systems

Generating Enterprise Applications from Models

Requirements / Use Case Specification

Clarifying a vision on certification of MDA tools

Software Requirement Specification

Data Modeling Basics

Designing an Enterprise Application Framework for Service-Oriented Architecture 1

CS 5150 So(ware Engineering System Architecture

Gadget: A Tool for Extracting the Dynamic Structure of Java Programs

Object-Oriented Systems Analysis and Design

Design methods. List of possible design methods. Functional decomposition. Data flow design. Functional decomposition. Data Flow Design (SA/SD)

Guiding Principles for Modeling and Designing Reusable Services

Software Analysis Visualization

XXI. Object-Oriented Database Design

Enterprise Architecture: Practical Guide to Logical Architecture

How to Make a Domain Model. Tutorial

Software Engineering. Software Processes. Based on Software Engineering, 7 th Edition by Ian Sommerville

The Software Process. The Unified Process (Cont.) The Unified Process (Cont.)

An Aspect-Oriented Product Line Framework to Support the Development of Software Product Lines of Web Applications

Chapter 10. Practical Database Design Methodology. The Role of Information Systems in Organizations. Practical Database Design Methodology

Umbrello UML Modeller Handbook

Acknowledgement. Software Engineering. CS 3141: Team Software Project Introduction

Case Study: Inception Phase. L. ch. 3-5

What do you think? Definitions of Quality

Protocols and Architecture. Protocol Architecture.

Construction Principles and Design Patterns. Flyweight, Bridge, Builder

Plan-Driven Methodologies

Principles of Software Construction: Objects, Design, and Concurrency. Domain Modeling and Specifying System Behavior. toad

A Comparison of Service-oriented, Resource-oriented, and Object-oriented Architecture Styles

(BA122) Software Engineer s Workshop (SEW)

Requirements Analysis Concepts & Principles. Instructor: Dr. Jerry Gao

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

Sequence Diagrams. Massimo Felici. Massimo Felici Sequence Diagrams c

From Control Loops to Software

What is a life cycle model?

MiniDraw Introducing a framework... and a few patterns

Data Analysis 1. SET08104 Database Systems. Napier University

Instructional Design Framework CSE: Unit 1 Lesson 1

Software Architecture. Schahram Dustdar Distributed Systems Group TU Wien

Organizational Requirements Engineering

Software Architecture Document

Fourth generation techniques (4GT)

KWIC Implemented with Pipe Filter Architectural Style

Masters of Science in Software & Information Systems

Transcription:

High-level Design Software Architecture What is it? Examples of common architectures Parnas KWIK index example of information hiding Model view controller in high level layered design 1 What is software architecture? The architecture of a system is comprehensive framework that describes its form and structure -- its components and how they fit together Jerrold Grochow, Pressman, Ch 10 Describes overall shape & structure of system How components are integrated into cohesive whole Their externally visible properties Their relationships Goal: choose architecture to reduce risks in SW construction & meet requirements 2 1

SW Architectural Styles Architecture composed of Set of components Set of connectors between them Communication, co-ordination, co-operation Constraints on integration Semantic models for understanding the overall properties from analysis of component known properties Architecture patterns for common organizational structures 3 filter Source: Adapted from Shaw & Garlan 1996, p21-2. See also van Vliet, 1999 Pp266-7 and p279 filter filter Pipe & Filter filter filter filter Examples: UNI s, compilers, signal processors Pros: Filters oblivious of their neighbors, can be built in parallel System behavior is compositional Cons: Hard to handle errors Often need encoding/decoding of input/output 4 2

Examples: Pros: Cons: Source: Adapted from Shaw & Garlan 1996, p23-4. See also van Vliet, 1999 Pp264-5 and p278 Event-based Architecture listen for event broadcast medium announce event GUIs, Breakpoint debuggers Anonymous handlers of events Supports re-use and evolution, new s easy to add Components have no control over order of execution listen for event 5 Data-centric Architecture Examples: Pros: Cons: Source: Adapted from Shaw & Garlan 1996, p26-7. See also van Vliet, 1999, p280 blackboard (shared data) Databases, programming environments Promotes integrability (ease of changing/adding clients) Reduces need to replicate complex data Blackboard can become a bottleneck 6 3

control parameters Process Control Architecture Examples: Pros: Cons: Source: Adapted from Shaw & Garlan 1996, p27-31. manipulated controller variables input variables Control systems (e.g., airplanes, spacecraft, industrial production lines, power stations Handles real-time, reactive systems Separates control policy from controlled process Hard to specify timing constraints or responses to disturbances process actuators sensors controlled variables 7 object Source: Adapted from Shaw & Garlan 1996, p22-3. OO Architecture method invocation method invocation object Examples: Abstract datatypes and object broker systems (e.g., CORBA) Pros: Offers data hiding Problems expressed as set of interacting s Cons: Objects need to know with whom they need to interact (more later on patterns) object object method invocation method invocation object 8 4

Source: Adapted from Shaw & Garlan 1996, p25. See also van Vliet, 1999, p281. Layered Architecture users application layer utilities kernel kernal Examples: Pros: Operating systems, Communication protocols, E- commerce applications Supports increasing levels of abstraction during design Supports re-use and enhancement Can have standard layer interfaces 9 D. Parnas, On the criteria to be used in decomposing systems into modules, CACM 1971. Key Principle: Information Hiding Design modules to hide design decisions Problem To accommodate possible change Module as a responsibility assignment, not a subprogram KWIC = Key Word In Context Task is to build a contextualized index for the text; Input is a set of lines of text; Output is the set of all circular shifts of all lines, in alphabetical order Two Designs Shared data model Data abstraction model 10 5

KWIK Index - Shared Data Master control Raw text input circular shift alphabetizer output Formatted output Text[ ] LineBegin[ ] Word index for shifted titles[ ] Alphabetized index[ ] Control-flow based design Every module knows internal representation of data and addressing mechanism! Good for adding another functionality 11 KWIK Index - Shared Data Master control Raw text input circular shift alphabetizer output Formatted output Text[ ] LineBegin[ ] Word index for shifted titles[ ] Alphabetized index[ ] Possible changes 1. Input format 2. Decision to store index in-core 3. Packing of chars in words 4. Use indexed notation or write out shifts 12 6

Raw text KWIK Index - Information hiding input setchar getchar Based on hiding design decisions from other modules Easier to change #words #line Line storage setup Master control getchar Circular shifter #lines sort ith Alphabetizer output #4 only affects the circular shifter here Formatted output 13 D. Parnas, Designing software for ease of extension and contraction, IEEE Trans on SE, March 1979 Design for Extension & Contraction Idea of tailoring SW for specific apps family of programs w common aspects Idea (like a VM): Identify minimal subset of reqs needed to be useful Use information hiding Don t think of components as processing steps Think about uses (not invokes) relation Pgm A uses pgm B if sometimes the correct functioning of pgm A requires availability of a correct implementation of pgm B 14 7

Uses Relation Think about uses relation Level 0 programs use no other Level k programs use at least 1 program at level (k-1) but none at higher level Then each level is a testable, usable subset of the system A should be allowed to use B if A is simpler thereby B is not more complex than A and doesn t use A (want acyclic relation) There is a useful subset of the system containing B but not A There s no useful subset of the system containing A but not B 15 Layered Architecture Logical architecture Large-scale organization of SW classes into packages (i.e., namespaces), subsystems and layers Layer - coarse-grained grouping of classes having responsibility for a major aspect of system Strict - layer only calls layer directly below it Relaxed - layer can call any layer below it Responsibilities of objects in a layer are strongly related to each other UML package diagrams show logical architecture (LAR Ch 13.1) Coupling between packages shown by UML dependency line, A B 16 8

Three Common Layers User interface Application logic and domain objects E.g., Sale Focus of OOA/D: Domain layer classes may represent domain model conceptual classes Technical services E.g., interfacing with database, error logging Layer can be partitioned into horizontal slices E.g., tech services: security & reporting 17 Payment amount Example 1 Pays-for 1 Sale date time Domain model Payment amount:money getbalance(): Money 1 pays-for 1 Sale date: Date starttime: Time gettotal(): Money Domain layer, Design model 18 9

Domain Layer in UP Model Domain High cohesion layers POS Inventory Tax Tech services Persistence Security Separation of concerns partitions 19 Model-View Separation Principle 1. Do not connect non-ui objects directly to UI objects Sale object should not refer to a Java Swing JFrame object Do not put application logic in UI object methods UI objects initialize UI elements; receive UI events (e.g., mouse click); delegate requests for application logic to non-ui objects Messages from UI to domain layer will be messages in corresponding sequence diagram 20 10

cashier system makenewsale() enteritem(id, quant) description, total endsale() Example UI Swing cashier ProcessSale Frame makenewsale() enteritem() endsale() Domain Register makenewsale() enteritem() makenewsale() enteritem() endsale() 21 Object-Oriented Design Objects, with attributes and operations Classes define the blueprint for objects Objects are instances of classes Messages between objects Object x sends message to object y to activate one of m s operations Operation in design -> method in code Message in design -> method call in code 22 11

Flavor of OO Design/Code Many small methods, many calls Distributed control: processing is split among many participants Distributed vs. centralized control Centralized is easier to understand In OO: chasing around the objects, trying to find the program Distributed is more flexible Reduces the impact of change 23 Example: Total of a Sale w/ Discount Centralized Sale asks each SalesLineItem for its quantity and ProductSpecifiation Sale asks each ProductSpecification for the price Sale computes total:=sum(quantity*price) Sale asks Customer object for discount info Sale calculates discounted price using discount info 24 12

Distributed Example, cont. Sale asks each SalesLineItem to compute its subtotal Sale computes total := sum(subtotals) Sale gives the total to the Customer object and asks it to compute the discounted price More delegation of responsibility, less coupling 25 Core Principles of OO Design Identify the responsibilities that are needed to satisfy the requirements Assign these responsibilities to objects Add the appropriate operations (i.e., methods) Design the interactions among objects Add the appropriate messages (i.e., calls) t:=gettotal() :Sale 1*: st:=getsubtotal() * :SalesLineItem :ProductSpecification 1.1: p:=getprice() 26 13

Artifact Use-Case Model Supplem. Spec Domain Model Design Model Implem. Model UP Artifacts Incep Elab Const Trans Requirements analysis: Use-Case Model + Supplementary Specification Domain analysis: Domain Model Design: Design Model Coding: Implementation Model 27 Relationships Among Models Use Case Model Domain Model Design Model Code 28 14

Design in the Unified Process At the end of elaboration Almost all requirements are clarified High-risk design aspects are stabilized Construction: iterative design and coding for the remaining requirements Interaction diagrams: sequence diagrams, communication diagrams Design class diagrams 29 15