System Models, Patterns and Software Architectures 14 February.

Slides:



Advertisements
Similar presentations
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Advertisements

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Object-Oriented Application Development Using VB.NET 1 Chapter 5 Object-Oriented Analysis and Design.
Chapter 7 – Object-Oriented Design
Object-Oriented Analysis and Design
8 September Your Architecture First level diagram: how components fit together.
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
18 October Team Meetings  All team meetings for this week are cancelled (If you WANT to meet, I will)  Beginning next week, demo required at EVERY.
Object Oriented System Development with VB .NET
Design Patterns CS is not simply about programming
Application architectures
Patterns Design 13 February.
Design 15 February. Software Engineering: Elaborated Steps Concept (contract, intro on web site) Requirements (use cases, requirements) Architecture Design.
Course Instructor: Aisha Azeem
(from Diane Pozefsky). Requirements to Product 1. You understand what you want to build 2. Model the real world in software 3. Choose an architecture.
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
18 September Requirements to Product 1. You understand what you want to build 2. Model the real world in software 3. Choose an architecture to.
Application architectures
The chapter will address the following questions:
Chapter 10 Architectural Design
The Design Discipline.
Lecture 9 Architectures and Frameworks
1 CMPT 275 High Level Design Phase Architecture. Janice Regan, Objectives of Design  The design phase takes the results of the requirements analysis.
An Introduction to Software Architecture
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 07. Review Architectural Representation – Using UML – Using ADL.
26 February Humpty Dumpty Presentations Software Architecture (cont)
4/2/03I-1 © 2001 T. Horton CS 494 Object-Oriented Analysis & Design Software Architecture and Design Readings: Ambler, Chap. 7 (Sections to start.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Unified Modeling Language, Version 2.0
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 27. Review UML dynamic view – State Diagrams.
Diane Pozefsky. Requirements to Product 1. You understand what you want to build 2. Model the real world in software 3. Choose an architecture to do it:
1 Software Design Overview Reference: Software Engineering, by Ian Sommerville, Ch. 12 & 13.
Architectural Design Yonsei University 2 nd Semester, 2014 Sanghyun Park.
Systems Analysis and Design in a Changing World, 3rd Edition
Design Patterns CSCI 5801: Software Engineering. Design Patterns.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
Design Principle & Patterns by A.Surasit Samaisut Copyrights : All Rights Reserved.
UML as a Specification Language for Embedded Systems. By, Mir Ahmed Ali, Asst. Professor, ECM department, SNIST. By, Prof. Narsiah sir, Director of School.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
Unified Modeling Language. Object Oriented Methods ► What are object-oriented (OO) methods?  OO methods provide a set of techniques for analyzing, decomposing,
1 CMPT 275 High Level Design Phase Modularization.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Systems Analysis and Design in a Changing World, Fourth Edition
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
1 Unified Modeling Language, Version 2.0 Chapter 2.
ANU comp2110 Software Design lecture 8 COMP2110 Software Design in 2004 lecture 8 Software Architecture 1 of 2 (design, lecture 3 of 6) Goal of this small.
Object-Oriented Application Development Using VB.NET 1 Chapter 5 Object-Oriented Analysis and Design.
UML Course Instructor: Rizwana Noor. Overview  Modeling  What is UML?  Why UML?  UML Diagrams  Use Case  Components  Relationships  Notations.
ANU comp2110 Software Design lecture 10 COMP2110 Software Design in 2004 lecture 10 Software Architecture 2 of 2 design lecture 5 of 6 Goal of this small.
CS223: Software Engineering
Diagrams. Typically, we view the static parts of a system using one of the four following diagrams. 1. Class diagram 2. Object diagram 3. Component diagram.
Basic Characteristics of Object-Oriented Systems
Application architectures Advisor : Dr. Moneer Al_Mekhlafi By : Ahmed AbdAllah Al_Homaidi.
Design Patterns CSCE 315 – Programming Studio Spring 2013.
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
Professorial kvetches
The Movement To Objects
Chapter ? Quality Assessment
Systems Analysis and Design With UML 2
Unified Modeling Language
COMP2110 Software Design in 2004 lecture 09 High level design
DESIGNING YOUR SYSTEM.
Software Design Lecture : 15.
An Introduction to Software Architecture
Chapter 6: Architectural Design
Presentation transcript:

System Models, Patterns and Software Architectures 14 February

USER INTERFACES JUST YESTERDAY…

What Would You Enter? Please enter the serial number from the box 7FD-XXX-XXX-XXX-XXX On the box is 7FD

SYSTEM MODELS

Modeling Based on abstraction Looking only at relevant information Hiding details Create multiple views As orthogonal as possible Each view has information that is unique Each view has information that appears in other views Common information is consistent How many views?

Modeling an airplane

Exercise: Modeling a House What views would you model? Do they meet the criteria?

Example of a System Model Three views Functional: what is done Data: entity relationships Dynamic: state transitions Why these three? Duplicative? Missing?

Models and Diagrams

Modeling Languages and Processes Language: syntax, usually graphical, used to express design Process: steps to take to create a design Many processes, not a lot of agreement General consensus has built around UML as a language We’ll look at UML later in the semester Unified Process built around UML

Functional Models: Software Architecture

Patterns Do you know the source and history? Briefly look at the context

What is a Pattern? A solution to a problem in a context A structured way of representing design information in prose and diagrams A way of communicating design information from an expert to a novice Requirement: shows when and how to apply

Origin of Patterns Came from architecture Christopher Alexander, late 70s The Timeless Way of Building Describes Common architectural motifs How they come together to form a cohesive, livable environment Patterns from town planning to decorative detail

Architectural Example: Door Placement If room has two doors and people move through it, keep both doors at one end of the room

Alexander’s Patterns Entries have five parts: Name: A short familiar, descriptive name or phrase, usually more indicative of the solution than of the problem or context. Example: One or more pictures, diagrams, and/or descriptions that illustrate prototypical application. Context: Delineation of situations under which the pattern applies. Problem: A description of the relevant forces and constraints, and how they interact. Solution: Static relationships and dynamic rules describing how to construct artifacts in accord with the pattern, often listing several variants. What do you need to change for software?

Properties of Patterns Independent, specific, and formulated precisely enough to make clear when they apply (encapsulation) Describes how to build a realization (generativity) Identifies a solution space containing an invariant that minimizes conflict among constraints (equilibrium) Represent abstractions of empirical experience and everyday knowledge (abstraction) May be extended down to arbitrarily fine levels of detail. Like fractals, patterns have no top or bottom (openness) Hierarchically related. Coarse grained patterns are layered on top of, relate, and constrain fine grained ones (composibility) What do you need to change for software?

Design Patterns All the same benefits are true in software Cunningham and Beck recognized in late 80s Community formed in early 90s The Book: Gamma, Helm, Johnson and Vlissides, Design Patterns: Elements of Reusable Object-Oriented Software Define 23 patterns Three categories: Structural – ways to represent ensembles of information Creational – creating complex objects Behavioral – capturing the behavior of object

Patterns at All Levels: Look at them at the Highest Level

Progression Machine code Assemblers High Level Languages Abstract Data Types (queues, stacks) Objects Patterns Software Architectures

Software Architecture What is an architecture? External view What does that mean for software? The highest level design Often treated as top level of system design not consistent

Software Architecture Goals Extensibility: adding new features Tradeoff of generality and time How might it be extended? Changeability: requirements changes Simplicity: ease of understanding and implementing Efficiency: speed and size

Key Characteristics Cohesion degree to which communication takes place within the module Coupling degree to which communication takes place between modules Min-max problem: minimize coupling while maximizing cohesion

Examples Role-playing game Decompose into 4 modules: environment, game control, participants and artifacts High cohesion and coupling When two characters meet, all 4 modules are involved Personal finance application Decompose into user activities: accounts, bill playing, loans, investments Low cohesion and high coupling Accounts are pretty independent Loan payment would involve the first 3 modules

Categorizing Software Architectures Categorizing Software Architectures (Shaw and Garlan) Model-View Controller Data flows Viewed as data flowing among processes Independent components Components operating in parallel and communicating occasionally Virtual machines Treats an application as a program written in a special- purpose language Repository Application built around data Layered architectures Packages of function with a strong hierarchical uses relationship

Why Categorize? Recognize patterns Reuse designs Learn from other similar applications Reuse classes Simplify communication

Examples of Use (real quotes) … is based on the client-server model and uses remote procedure calls... Abstraction layering and system decomposition provide the appearance of system uniformity to clients … The architecture encourages a client server model … We have chosen a distributed, object-oriented approach The easiest way … is to pipeline the execution …

SOME WELL-KNOWN ARCHITECTURES

Model-View-Controller Originally designed for SmallTalk Early OO language (1970’s) Steve Burbeck, 1987 First paper

Data Flow Design Data flowing among processes Two categories: Pipes and filters Filters: processes Pipes: input streams Batch sequential Pipe and filter where input streams are batches of data

Pipe and Filter filter pipe Filters: processes Pipes: input streams

Example of Batch Sequential Collect mortgage funds Account balances Mortgage pool Unsecured pool Collect unsecured funds Pipe: batch input Processes Pipe and filter where input streams are batches of data

Independent Components Components operating in parallel and communicating occasionally Three types Client-server Browser-web server most familiar example Separate systems with narrow interface Sometimes expanded to three tiers (why?) Façade pattern (single unified interface) Parallel communicating processes Several processes executing at the same time Typically modeled with sequence diagrams Observer pattern (one-to-many dependencies) Event systems Set of components waiting for input Example: word processor waiting for user input State transition diagrams State pattern (alter behavior depending on state)

Client-Server and Facade «not exposed» P «not exposed» Façade «exposed» Client 1 2 «not exposed» Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission. Key concept: limit exposed interface Browser-web server most familiar example: Separate systems with narrow interface

Parallel Communicating Processes Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission. Customer: customer n withdraw Customer: customer n+1 Session: session k Session: session m deposit create Account: customer n+1 saving Account: customer n checking create retrieve 3 types of processes, 2 instances of each Duration of process processes actions sequence diagram

Observer Design Pattern Gamma et al Source notify() Observer update() ConcreteSubject state ConcreteObserver observerState update() Client of this system n Request others be notified Notify all observers Determines if change needed Single source of data with a number of clients that need to be updated

Event Systems and State Transition Diagrams Set of components waiting for input

Virtual machines Treats an application as a program written in a special language Payoff is that the interpreter code is the basis for multiple applications Two types Interpreters Rule-based systems

Repository A system built around data Two types Databases Hypertext systems

A Typical Repository System Database DBMS GUI Analysis process 1 Analysis process n …... Control Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Iterator pattern void setToFirst(); points to first element void increment(); causes the iterator to point to its next element C getcurrentElement(); return the element pointed to by the iterator boolean isDone(); true if all elements processed

Hypertext: Basis of the Web Motivated by Vannevar Bush in 1945Vannevar Bush “As We May Think” (Atlantic Monthly)As We May Think Theoretical machine, "memex," to enhance human memory by allowing the user to store and retrieve documents linked by associations Invented by Ted Nelson in the 1960sTed Nelson Popularized with HTML (Tim Berners-Lee)Tim Berners-Lee

Ted Nelson "If computers are the wave of the future, displays are the surfboards." Xanadu: 1974 "give you a screen in your home from which you can see into the world's hypertext libraries... offer high-performance computer graphics and text services at a price anyone can afford... allow you to send and receive written messages... [and] make you a part of a new electronic literature and art, where you can get all your questions answered...“ Computer Lib/Dream Machines

Layered Architecture Role-playing game layer Characters LayoutRolePlayingGame Encounter Characters Encounter Environment Encounter Game Application layer 3D engine layer «uses» Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission. Coherent collection of software artifacts, typically a package of classes

Recap Model-View-Controller Data flow systems Pipes and filters Batch sequential Independent components Client-server Parallel communicating processes Event systems Virtual machines Interpreters Rule-based systems Repositories Databases Hypertext systems Layered architectures