Programming Language Constructs as Basis for Software Architectures. Stefan Resmerita, WS2015

Similar documents
Programming Language Constructs as Basis for Software Architectures

UML Primer. -Elango Sundaram

An Introduction To Object Modeling System Concept for Object Modeling The Overall View Components of UML Diagram

Object Oriented System Development

CISC 322 Software Architecture

Object-Oriented Systems Development: Using the Unified Modeling Language

Course 3 7 March

Representing System Architecture

Software Service Engineering

Lecture #2 on Object-Oriented Modeling

CHAPTER 1. Topic: UML Overview. CHAPTER 1: Topic 1. Topic: UML Overview

References: Jacquie Barker,Beginning Java Objects; Martin Fowler,UML Distilled, 9/25/ UML

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

i219 Software Design Methodology 1. Overview of software design methodology Kazuhiro Ogata (JAIST) Outline of lecture

administrivia today UML start design patterns Tuesday, September 28, 2010

Object-Oriented Analysis Techniques Coad s OOA Technique Short History Terminological Comparison Postscript and Remarks

Chapter 4. Sahaj Computer Solutions Object Oriented Systems Development 1

SOFTWARE DESIGN COSC 4353 / Dr. Raj Singh

Introduction to Software Engineering. 5. Modeling Objects and Classes

UNIT-I Introduction of Object Oriented Modeling

System Analysis and Design

References: Jacquie Barker,Beginning Java Objects; Martin Fowler,UML Distilled, 1/13/ UML

1 OBJECT-ORIENTED ANALYSIS

Object-Oriented Software Development Goal and Scope

Unified Modeling Language

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

OO Analysis and Design with UML 2 and UP

INTERACTION ARCHITECTURAL MODELING. Lecture 9 Interaction Architectureal Modeling

02291: System Integration

OO Requirements to OO design. Csaba Veres Alan M. Davis (1995), Colorado

Software Development Methodologies

SHRI ANGALAMMAN COLLEGE OF ENGINEERING & TECHNOLOGY (An ISO 9001:2008 Certified Institution) SIRUGANOOR,TRICHY

Research Review on Basic Principles of Unified Modelling Language

OBJECT-ORIENTED MODELING AND DESIGN. Introduction

Software Development Methodologies

Object-Oriented Introduction

2 UML for OOAD. 2.1 What is UML? 2.2 Classes in UML 2.3 Relations in UML 2.4 Static and Dynamic Design with UML. UML for OOAD Stefan Kluth 1

02291: System Integration

Software Development. Modular Design and Algorithm Analysis

Introduction. Chapter 1. What Is Visual Modeling? The Triangle for Success. The Role of Notation. History of the UML. The Role of Process

Inheritance. EEC 521: Software Engineering. Dealing with Change. Polymorphism. Software Design. Changing requirements Code needs to be flexible

UML & OO FUNDAMENTALS CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 3 08/30/2011

UML diagrams. Software artifacts include: SRS, SDS, test cases, source code, technical/user manual, software architecture, etc.

3.0 Object-Oriented Modeling Using UML

TTool Training. I. Introduction to UML

Session 8: UML The Unified Modeling (or the Unstructured Muddling) language?

Information systems modelling UML and service description languages

Proposal of a Supporting Method for Diagrams Generation with the Transformation Rules in UML

Lecture Notes UML UNIT-II. Subject: OOAD Semester: 8TH Course No: CSE-802

Systems Analysis & Design

Software Engineering from a

UNIT I. 3. Write a short notes on process view of 4+1 architecture. 4. Why is object-oriented approach superior to procedural approach?

What is UML / why. UML is graphical and notational representation for software system requirements analysis and design. (Software Engineering )

Object-Oriented Analysis and Design Using UML

A STUDY OF OBJECT ORIENTED ANALYSIS AND DESIGN

2D1358 Object Oriented Program Construction in C++ Exercises & Labs. Course Registration / Accounts. Course Literature

Plan. Modelling and design. What is a model? Note on spelling

UML big picture. Perdita Stevens. School of Informatics University of Edinburgh

Object-Oriented Analysis and Design

Methods for requirements engineering

Object Oriented Modeling

MSc programme (induction week) Department of Informatics INTRODUCTION TO UML

CHAPTER 1. Objects, UML, and Java

Practical Model-Driven Development with the IBM Software Development Platform

Introduction to Software Engineering. 5. Modeling Objects and Classes

Software Engineering - I An Introduction to Software Construction Techniques for Industrial Strength Software

INTRODUCTION TO UNIFIED MODELING MODEL (UML) & DFD. Slides by: Shree Jaswal

REVIEW OF THE BASIC CHARACTERISTICS OF OBJECT ORIENTATION

UML & OO Fundamentals. CSCI 4448/5448: Object-Oriented Analysis & Design Lecture 3 09/04/2012

UML Modeling I. Instructor: Yongjie Zheng September 3, CS 490MT/5555 Software Methods and Tools

Object-Oriented Programming. Objects. Objects. Objects

L02.1 Introduction... 2

Research Article A Design Pattern Approach to Improve the Structure and Implementation of the Decorator Design Pattern

History of object-oriented approaches

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

Patterns for polymorphic operations

Topic 13 Object-oriented Analysis

Software Engineering Lab Manual

Unit Wise Questions. Unit-1 Concepts

Ingegneria del Software Corso di Laurea in Informatica per il Management. Introduction to UML

Object Oriented Software Engineering Ivar Jacobson

Reuse at Design Level: Design Patterns

Introduction... ix. Chapter 1: Exploring Fundamental Programming Concepts... 1

Modelling with Classes. CITS1220 Software Engineering

Zhifu Pei CSCI5448 Spring 2011 Prof. Kenneth M. Anderson

Object-Oriented Design

OBJECT ORIENTED ANALYSIS AND DESIGN

PRINCIPLES OF SOFTWARE BIM209DESIGN AND DEVELOPMENT 00. WELCOME TO OBJECTVILLE. Speaking the Language of OO

Model Driven Development Unified Modeling Language (UML)

CMSC 132: Object-Oriented Programming II

On behalf of ASE crew, I welcome you onboard. We will cover this journey in roughly 50 minutes.

Module Outline. What is Object-Oriented? Some Possible Definitions. Why Object-oriented? Fundamentals of Object Orientation

CSE 308. UML Overview Use Case Diagrams. Reference. Class diagrams. Session 6 UML Intro/Use cases. Robert Kelly, B. Bruegge,

Vragen. Intra-modular complexity measures. The uses relation. System structure: inter-module complexity

Design and UML Class Diagrams

James Newkirk

1. Software Systems Complexity, OO Paradigm, UML

CS2353 OBJECT ORIENTED ANALYSIS AND DESIGN UNIT- I

Goals of Lecture. Lecture 27: OO Design Patterns. Pattern Resources. Design Patterns. Cover OO Design Patterns. Pattern Languages of Programming

ACRONYMS AND GLOSSARY

Transcription:

Programming Language Constructs as Basis for Software Architectures 1

From individual parts to components In the 50s: Machine/Assembler programs: bound to specific hardware In the 60s-70s: Higher programming languages (such as Pascal, C) Instructions can be combined into functions/procedures Individual parts In the 80s and 90s: Functions/procedures are combined into Modules (Modula, Oberon, C++, Java, C#) Software components In the 2000s: Cross-cutting modularity (AspectJ) 2

Simple Interface Example: A File handler component Read file Write file... Hidden implementation details: -Access to hard disc -Splitting up file contents, etc. 3

Architecture-Patterns Software-Patterns 4

The Timeless Way of Building Christopher Alexander, Professor of Architecture, Univ. of California, Berkeley: Books published in 1979: The Timeless Way of Building A Pattern Language (253 Patterns) Quality without a name Discovered by the Software community in 1991 5

Example: Windows Overlooking Life 6

Examples of Software Patterns 7

How can software PlugIn-Architectures be created? Described in Architecture manuals (1995): E. Gamma, R. Helm, R. Johnson, J. Vlissides: Design Patterns: Elements of Reusable Software W. Pree: Design Patterns for Object-Oriented Software Development 8

What are PlugIn-Architectures? Modern cooking machine: plugging in various tools makes it a mixer, a mincer, a blender New automobile models resemble older ones in their core: chassis, transmission, engine pallet. 9

Software Examples Dedicated software: Hotel reservation system Car rental system Ski rental system Motorcycle rental system etc. PlugIn-Architecture: Reservation system (of rental property) 10

Dedicated Software Dependence between components is hard-coded Hotel room Coupling with another component requires changes Car 11

Pattern: PlugIn-Architectures require the definition of Plugs Plug Rental property Plug-compatible Components 12

Dynamic binding of calls makes changes in the source code unnecessary m1() m1() m1() call m1 13

The Rental property Plug Defines general, abstract characteristics: isfree(period) reserve(period) estimatedprice(period) etc. 14

Software Techniques Quo vadis? 15

Cost intensive maintenance of software, which is 20-30 years old Engineering approaches are established at least in sub - domains such as safety critical systems 16

The simple, mechanical view is hardly scalable Biological systems model Internet growth by a factor of 100 million Development process: Analisys Design Implementation 17

Modeling, Design, Analysis* Modeling is the process of gaining a deeper understanding of a system through imitation. Models specify what a system does. Design is the structured creation of artifacts. It specifies how a system does what it does. This includes optimization. Analysis is the process of gaining a deeper understanding of a system through dissection. It specifies why a system does what it does (or fails to do what a model says it should do). 18 *Lee & Seshia

Basics of Object-Oriented Modeling Analysis and Design with UML Software Engineering Winter 2015

Tools for OO Analysis and Design 20

OO expectations Improved modularity Improved reusability Potential for reusable software architectures (= generic complex components) has not been fully investigated so far Support for OO modeling is important 21

What can be expected from OOAD Tools (I) Great designs come from great designers, not from great tools. Tools help bad designers create ghastly designs much more quickly. (1994) Grady Booch 22

What can be expected from OOAD Tools (II) OOAD tools can perform: Providing and editing diagrams based on various OO notations Checking of consistency and constraints Does an object have the called method? Are the invariants (e.g. single instance, etc.) satisfied?... Completness evaluation Are all the Methods/Classes used?... 23

Conventional (SA/SD) versus OO tools (I) The main differences regard two aspects: (1) Software Architecture Conventional tools are based on a separation between data and functions OO tools are based on the grouping of data and functions into meaningful closed objects 24

Conventional (SA/SD) versus OO tools (II) (2) Semantic possibilities Relationships in the conventional ER One-to-one (1:1) has_a, is_a One-to-many (1:m) owns, contains, is_contained_in Many-to-many (m:n) consists_of 25

Conventional (SA/SD) versus OO tools (III) OO modeling needed more comprehensive means of expression Class/Object relations and dependencies Inheritance Association Has_a (by value, by reference) Uses_a (by value, by reference) Class attributes Is_abstract, is_metaclass Is_parameterized Access rights 26

OO Techniques at the beginning of the 90s OOD / Rational Rose Grady Booch Object Modeling Technique (OMT) James Rumbaugh et al. OO Software Engineering (OOSE) Ivar Jacobson et al. OO Analysis (OOA) Peter Coad und Ed. Yourdon Responsibility-Driven Design (RDD) Rebecca Wirfs-Brock et al. OO System Analysis (OOSA) Sally Shlaer and Steve Mellor... 27

Example for Booch notation N 28

Example of OMT notation Employee Mailer DesktopItem EmployeeGroup... Folder... Mailbox 29

Common features of OOAD methods (I) They aim to represent the physical world without artificial transformations as a software system Application of the same concepts in all phases of software development The border between Analysis and Design became more blurred Moreover, very vague usage guidelines were indicated 30

Common features of OOAD methods (II) OOAD methods permit the modeling of the following aspects of a system: Static aspects The Class/Object model stands in the foreground Higher abstraction levels are represented by Subsystems Dynamic aspects Interaction diagram State diagram Use case diagram 31

Differences between OOAD methods The differences between the methods used to lie mostly in the notation The notations were to a large extent language independent => Standardization need was obvious All of the OO methodologies have much in common and should be contrasted more with non-oo methodologies than with each other. James Rumbaugh (1991) 32

UML influences The Unified Modeling Language contains various aspects and notations from different methods Booch Harel (State Charts) Rumbaugh (Notation) Jacobson (Use Cases) Wirfs-Brock (Responsibilities) Shlaer-Mellor (Object Life Cycles) Meyer (Pre- und Post-Conditions) 33

The UML standard The first draft (version 0.8) was published in 1995 Various adjustments and the inclusion of Ivar Jacobson led to version 0.9 in 1996 Version 1.0 (an then 1.1) was submitted to the Object Management Group (OMG) in 1997 as basis for standardisation Version 1.3 came out in 1999 Version 1.4.2 became an international standard in 2005 Current OMG standard: version 2.5 34

The Unified Modeling Language (I) What is the UML? Language Communication Exchange of ideas Graphical modeling language Drawings, words and rules for representing aspects of software systems 35

The Unified Modeling Language (II) What is UML not? No method Specifies how models are made but not which and when This is a task of the software development process Method = Process + Modeling Language 36

The Unified Modeling Language (III) Why is UML needed? Model as specification Model as visualization Model for analysis Model for design Forward and reverse engineering System documentation 37

The Unified Modeling Language (IV) Models Projections of systems on certain aspects Used for understanding Used for specification 38

OO concepts UML representation Objects, Classes, Messages/Methods Inheritance, Polymorphism, Dynamic Binding Abstract Classes, Abstract Coupling 39

OO versus Procedural (I) Procedural: Separation between data and procedures 40

OO versus Procedural (II) Object-oriented: Data and procedures form a logical unit an Object 41

Objects(I) An object is a representation of A physical entity E.g. Person, Car, etc. A logical entity E.g. Chemical process, mathematical formula, etc. 42

Objects (II) The main characteristics of an object are: Its identity Its state Its behavior 43

Objects (III) State The state of an object consists of its static attributes and their dynamic values Values can be primitive: int, double, boolean Values can be references to other objects, or they can be other objects 44

Objects(IV) Example Drinks machine 1) Ready 2) Busy 3) Ready Pay Remove drink Attributes values Paid: boolean Cans: number of cans 45

Objects(V) The behavior of an object is specified by its methods (=operations) In principle, methods are conceptually equivalent to procedures/functions: Methods = Name + Parameters + Return values 46

Objects(VI) Example Rectangle Name of the operation: setcolor Parameter: name of the color (e.g. Red) Return values: none Calling an operation of an object is reffered to as sending a message to the object 47

Objects(VII) Identity The identity of an object is the characteristic that differentiates the object from all the other objects Two objects can be different even if their attributes, values and methods coincide 48

Object Orientation Classification Object grouping Polymorphism Static and dynamic types Dynamic binding Inheritance Type hierarchy 49

Classification Class A class represents a set of objects that have the same structure and the same behavior A class is a template from which objects can be instantiated 50

Classification Example Class Person Attributes: Name: String Age: int Operations: eat, sleep,... Object of type Person: Oliver Attributes: Name: Oliver Age: 24 51

Class as a template/type (I) Comparison with C struct{ int day, month, year; } date; date d1, d2; All are accessible There is no method 52

Class as a template/type (II) A class indicates which type an object has, i.e., which messages understands and which attributes it has. A class consists of A unique name Attributes and their types Methods/Operations 53

Classes in UML (I) UML notation for a class: Structure Example 54

Classes in UML (II) Notation for attributes: A only the attribute name : C only the attribute class A : C attribute name and class A : C = D attribute default value timewhenstarted A : Date : C timewhenstarted : Date A : C timewhenstarted : Date = 1.1.1999 A : C = D timewhenstarted = 1.1.1999 A = D 55

Classes in UML (III) Notation for Methods/Operations: m() m(arguments): R only the method name method name, arguments type of returning parameter Example: printinvoice() m() printinvoice(itemno: int): bool m(arguments): R 56

Classes in UML (IV) Adornments (decorations) : additional graphical elements (represented by triangles in the Booch method) Methods and attributes have attached graphic symbols to express access rights: public, private, protected Example: +sleep(hours:int) Standalone adornment: Note 57

Example: access rights Unnecessary complexity, since there is no dependency between x and y Better alternative 58

Classes in Java public class Person{ String name; int age;... Class name Attributes public int getage(){ return age; } public void setage(int theage){ age = theage; } } Operations 59

Using classes in Java Classes are used in Java to specify the type of variables and to instantiate objects Keyword: new Example: Person manager = new Person( Martin ); Declaration of variable manager Instantiation of an object of class Person with name Martin 60

Example: Hotel reservation What can be modeled as classes in a hotel reservation system? What attributes will the classes have? What operations? Which instances (objects) of these classes will there be? What sorts of relations will take place between the objects/classes? 61