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

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

Logical Architecture & Design Preliminaries

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

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

Domain Model and Domain Modeling

BDSA08 Advanced Architecture

COMP 6471 Software Design Methodologies

Assigning Responsibilities (Patterns of Responsibility Assignment Principles: GRASP)

Software Design and Analysis CSCI 2040

Information Expert (or Expert)

COMP 6471 Software Design Methodologies

Responsibilities. Using several specific design principles to guide OO design decisions.

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

On to Object-oriented Design

GRASP: Patterns for. chapter18

Architectural Models. Section Outline. What is an architectural design? Architecture Types. Example Logical Architecture. Example Deployment Diagram

OO Design2. Design Artifacts

ADVANCED SOFTWARE DESIGN LECTURE 4 SOFTWARE ARCHITECTURE

Object-Oriented Design

ADVANCED SOFTWARE DESIGN LECTURE 7 GRASP

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

17. GRASP: Designing Objects with Responsibilities

On to Object-oriented Design

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

Object-Oriented Design

What is a Model? Copyright hebley & Associates

Assigning Responsibilities by Larman

GRASP Design Patterns A.A. 2018/2019

Last Time: Object Design. Comp435 Object-Oriented Design. Last Time: Responsibilities. Last Time: Creator. Last Time: The 9 GRASP Patterns

Constantinos Constantinides Computer Science and Software Engineering Concordia University Montreal, Canada

Software Service Engineering

CTIS 359 Principles of Software Engineering SOFTWARE DESIGN OO(A)D

References: Applying UML and patterns Craig Larman

Software Modeling & Analysis

Modeling Dynamic Behavior

SOFTWARE DESIGN COSC 4353 / Dr. Raj Singh

OBJECT ORIENTED DESIGN with the Unified Process. Use Case Realization

Modeling Dynamic Behavior

Principles of Software Construction: Objects, Design and Concurrency. Object-Oriented Design: Assigning Responsibilities.

XVIII. Software Architectures

Operations Contracts and Preliminaries on Design

INTERNAL ASSESSMENT TEST III Answer Schema

Principles of Software Construction: Objects, Design, and Concurrency. Assigning Responsibilities to Objects. toad. Jonathan Aldrich Charlie Garrod

System Sequence Diagrams. Based on Craig Larman, Chapter 10 and Anuradha Dharani s notes

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

2 GRASP Patterns and basic OO Design. Roel Wuyts OASS

XIX. Software Architectures

Architectural Blueprint

Chapter 1: Principles of Programming and Software Engineering

ADVANCED SOFTWARE DESIGN LECTURE 4 GRASP. Dave Clarke

Patterns and Testing

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

Software Engineering Design & Construction

Domain Modeling- 2. Generalization

Review of Basic Software Design Concepts. Fethi Rabhi SENG 2021

Object-Oriented Design

Object-Oriented Systems Analysis and Design Using UML

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

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

02291: System Integration

BDSA Introduction to OOAD. Jakob E. Bardram

Topic : Object Oriented Design Principles

Domain Modeling. CSSE 574: Week 1, Part 3. Steve Chenoweth Phone: Office (812) Cell (937)

Software Design and Analysis CSCI 2040

Lecture 13 Introduction to Software Architecture

Chapter 1: Programming Principles

Object-Oriented Design

Week 9 Implementation

Designing Component-Based Architectures with Rational Rose RealTime

OBJECT ORIENTED DESIGN with the Unified Process. Use Case Realization

GRASP ing at the First 5 Patterns Principles CSSE 574: Session 3, Part 4

A Model-Based Development Method for Device Drivers

Introduction - SENG 330. Object-Oriented Analysis and Design

SE203b: OO Design for Software Engineers. Office: TEB349, Ext

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

VEL TECH HIGH TECH Dr. RANGARAJAN Dr. SAKUNTHALA ENGINEERING COLLEGE UNIT 1 UML DIAGRAMS

An Introduction to Object-Oriented Analysis and Design and the Unified Process Applying UML and Patterns, 3 rd ed. Craig Larman, pp.

21) Functional and Modular Design

Quality-Driven Architecture Design Method

Software Architecture and Design I

Mapping Designs to Code

Software Engineering (CSC 4350/6350) Rao Casturi

Introduction to UML. Danang Wahyu utomo

Chapter 8: Class and Method Design

WHAT IS SOFTWARE ARCHITECTURE?

Credit where Credit is Due. Goals for this Lecture. Introduction to Design

Principles of Software Construction: Objects, Design and Concurrency. Just enough UML. toad

OBJECT ORIENTED ANALYSIS AND DESIGN SYLLABUS

Software Engineering Design & Construction

21) Functional and Modular Design

BCS Higher Education Qualifications. Diploma in IT. Object Oriented Programming Syllabus

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

MechEng SE3 Lecture 7 Domain Modelling

COMP 6471 Software Design Methodologies

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

LABORATORY 1 REVISION

Presenter: Dong hyun Park

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

Introduction to Software Engineering 10. Software Architecture

Design Engineering. Overview

Transcription:

Introduction to Software Engineering (2+1 SWS) Winter Term 2009 / 2010 Dr. Michael Eichberg Vertretungsprofessur Software Engineering Department of Computer Science Technische Universität Darmstadt

What do we know already? Retroperspective 2 Use Cases Domain Modeling System Sequence Diagrams Repetition

Dr. Michael Eichberg Fachgebiet Software Engineering Department of Computer Science Technische Universität Darmstadt Introduction to Software Engineering Logical Architecture and UML Package Diagrams The following slides make extensive use of material from: Applying UML and Patterns, 3rd Edition; Craig Larman; Prentice Hall

Software Architecture 4 The Unified Modeling Language User Guide An architecture is the set of significant decisions about the organization of a software system, the selection of the structural elements and their interfaces by which the system is composed, together with their behavior as specified in the collaborations among those elements, the composition of these structural and behavioral elements into progressively larger subsystems, and the architectural style that guides this organization - these elements and their interfaces, their collaborations, and their composition. structure + behavior G. Booch, J. Rumbaugh and I. Jacobsen; Addison-Wesley 1999

Software Architecture 5 Patterns Oriented Software Architecture A software architecture is a description of the subsystems and components of a software system and the relationships between them. structure Subsystems and components are typically specified in different views to show the relevant functional and non-functional properties of a software system. The software architecture of a system is an artifact. it s a document multiple views Buschmann et al.; Wiley 1996

Software Architecture 6 Patterns Oriented Software Architecture A view represents a partial aspect of a software architecture that shows specific properties of a software system. multiple views - Conceptual architecture: components, connectors - Module architecture: subsystems, modules, exports, imports, - Code architecture: files, directories, libraries, - Execution architecture: tasks, threads, processes Buschmann et al.; Wiley 1996

www.softwarearchitectureportal.org Software Architecture 7

The logical architecture is the large scale organization of the software classes into packages, subsystems and layers. Logical Architecture 8 The logical architecture is unrelated to the deployment of the software elements (That s why we call it logical architecture.) The prime input is the supplementary specification

The logical architecture is the large scale organization of the software classes into packages, subsystems and layers. Logical Architecture 9 The supplementary specification contains the specification of system-wide quality attributes (~ non-functional properties) hardware and software constraints other design and implementation constraints (e.g. the used programming language) operational concerns (e.g. how to handle errors) (other information not necessarily relevant w.r.t. the logical architecture)

The logical architecture is the large scale organization of the software classes into packages, subsystems and layers. Logical Architecture 10 Requirements... Supplementary Speci!cation Glossary Design UI package diagrams of the logical architecture Domain Tech Services

A layer is a very coarse-grained grouping of: classes, packages, or subsystems that has a cohesive responsibility for a major aspect of the system. Layered Architectures 11 Usually higher layers are allowed to depend on / to use lower layers but not vice versa Strict layered architecture: a layer is only allowed to depend on its immediate lower layer; often used in case of network protocol stacks. Examples layers: User Interface Application Logic and Domain Objects Usually implements the business logic. Technical Services Examples: database access, error logging,... Layer 4 Layer 3 Layer 2 Layer 1 x

A layered architecture can be applied for systems with a mix of low-level and high-level issues, where the high-level ones rely on the low-level ones. Layered Architectures 12 Forces that need to be balanced: late source code changes should not ripple through the system interfaces should be stable Layer 4 Layer 3 Layer 2 Layer 1 parts of the system should be exchangeable similar responsibilities should be grouped to help understandability and maintainability complex components need further decomposition crossing component boundaries may impede performance work has to be subdivided along clear boundaries

How to implement a layered architecture? Layered Architectures 13 Define the abstraction criterion The goal is to group tasks into layers; this criterion is often the conceptual distance from the platform. Determine the number of abstraction levels according to your abstraction criterion Name the layers and assign tasks to each of them a lower level is a helper to a higher level Specify the services layers have to be kept strictly separate from each other (no component may spread over more than one layer). Refine the layering.. (reconsider the previous steps)

How to implement a layered architecture? Layered Architectures 14 Specify an interface for each layer Consider if you want to apply a white-box or a black-box approach (the layer s interface does not reveal the layer s structure or working); prefer the latter. Structure individual layers Design an error-handling strategy (A rule of thumb: handle errors in the lowest layer possible.)

Layered Architectures 15 Every software problem, can be solved by introducing an extra layer of indirection. Layer n+1 Layer 3 Layer 2 Layer 1

Layered Architectures 16 Every performance problem can be solved by removing a layer of indirection. Layer n+1 Layer 3 Layer 2 Layer 1

Visualizing the Logical Architecture Using the UML Package Diagram Notation. Logical Architecture and Package Diagram Notation 17 A package can contain anything: classes, other packages, use cases; a package is a collection of elements that share the same namespace It is a more general concept than, e.g., a Java package. Packages can be nested Packages represent namespaces E.g. the fully-qualified name (in UML) of a Java class Date that belongs to a package util which is nested in java is: java::util::date Dependencies are shown using the standard UML dependency line

The UML supports different approach to show package nesting. Logical Architecture and Package Diagram Notation 18 1. Alternative UI Domain Swing Sales Web Here, the UI package has a dependency on the Sales package.

The UML supports different approach to show package nesting. Logical Architecture and Package Diagram Notation 19 2. Alternative UI::Swing Domain::Sales UI::Web

The UML supports different approach to show package nesting. Logical Architecture and Package Diagram Notation 20 3. Alternative UI Domain Swing Sales Web

Example UML Package Diagram for the POS System Logical Architecture and Package Diagram Notation 21 UI Swing Web Vertical Layers Domain Sales Payments Taxes Technical Services Persistence Logging RulesEngine Horizontal Partitions

Example UML Package Diagram for the POS System UI Domain Note, Java does not have Swing Sales Technical Services Persistence Payments Logical Architecture and Package Diagram Notation Web nested packages! Taxes Elements belonging to a parent package are not automatically accessible by elements belonging Logging RulesEngine to a child package. 22

Example UML Package Diagram for the POS System UI Logical Architecture and Package Diagram Notation 23 Swing Web Domain Note, Scala does have nested Sales packages! Payments Taxes Technical Services Persistence Logging RulesEngine

Importing elements from different packages. Logical Architecture and Package Diagram Notation 24 UI Domain «access» Swing Sales Web «access» models an import with private visibility.

Importing elements from different packages. Logical Architecture and Package Diagram Notation 25 UI Domain «import» Swing Sales Web «import» models an import with public visibility; i.e. the imported elements are transitively visible.

Some Advantages of Using Layers Logical Architecture and Package Diagram Notation 26 Source code changes (in higher layers) do not ripple throughout the system E.g. if the business logic is not implemented as part of the UI layer it is easier to provide an additional user interface. Reuse of the lower layers is facilitated Coupling and cohesion are improved Development of teams is aided because of the logical segmentation Repetition

Logical Architecture and Package Diagram Notation 27 General Guideline The responsibilities of the objects in a layer should be strongly related.

The Model-View Separation Principle Here, model means the domain layer objects and view relates to the UI objects. Logical Architecture 28 The model (domain objects) should not have direct knowledge of view Objects.

The Model-View Separation Principle Here, model means the domain layer objects and view relates to the UI objects. Logical Architecture 29 The model (domain objects) should not have direct knowledge of view Objects. This means: 1. Do not connect or couple non-ui objects directly to UI objects. 2. Do not put application logic in the UI object methods. UI objects only initialize UI elements, receive UI events (e.g. mouse click) and delegate requests.

The Model-View Separation Principle - Motivation Here, model means the domain layer objects and view relates to the UI objects. Logical Architecture 30 To support cohesive model definitions that focus on the domain process To separate the development of the model and user interface layers To allow new views to be easily connected to an existing layer without affecting the domain layer To allow multiple simultaneous views To support porting the model layer to another user interface framework

Connection between SSDs and Layers Logical Architecture 31 :Cashier Process Sale Scenario :System makenewsale enteritem(itemid, quantity) UI Swing... ProcessSaleFrame makenewsale() enteritem()... description, price, total endsale total with taxes Domain makenewsale() enteritem()... :Cashier makepayment (amount)... Register change due, receipt makenewsale()... The system operations handled by the system in an SSD represent the operation calls on the Application or Domain Layer from the UI Layer

Domain Model and Domain Layer Logical Architecture 32 Domain Model Payment amount Sale date time Inspiration Payment amount: Money getbalance():money Sale date: Date starttime: Time gettotal(): Money Domain Layer