Short Introduction to Design Patterns

Similar documents
Design with Reuse. Building software from reusable components. Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 14 Slide 1

Design Patterns. Advanced Software Paradigms (A. Bellaachia) 1

Project Management. Lecture 3. Software Engineering CUGS. Spring 2012 (slides made by David Broman) Kristian Sandahl

Software Quality Management

Aerospace Software Engineering

Software Quality Management II

Architecture. Reda Bendraou

Secure Socket Layer/ Transport Layer Security (SSL/TLS)

CHAPTER 4: PATTERNS AND STYLES IN SOFTWARE ARCHITECTURE

Patterns in. Lecture 2 GoF Design Patterns Creational. Sharif University of Technology. Department of Computer Engineering

Architectural Patterns: From Mud to Structure

Web Application Architectures

Quiz Examination in Software Engineering Theory

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

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

Network Security Essentials Chapter 5

Designing Event-Controlled Continuous Processing Systems Class 325

How To Use The Command Pattern In Java.Com (Programming) To Create A Program That Is Atomic And Is Not A Command Pattern (Programmer)

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

How To Develop Software

Outline. Definitions. Course schedule

Software Engineering. Software Engineering. Software Costs

CRYPTOGRAPHY AS A SERVICE

WebSphere DataPower Release FIPS and NIST SP a support.

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

Component-based Development Process and Component Lifecycle Ivica Crnkovic 1, Stig Larsson 2, Michel Chaudron 3

Security Policy for Oracle Advanced Security Option Cryptographic Module

Service-Oriented Architecture and Software Engineering

A study on Security Level Management Model Description

ENTERPRISE ARCHITECTUE OFFICE

IPsec Details 1 / 43. IPsec Details

Object-oriented design methodologies

Software Engineering

Approach of Unit testing with the help of JUnit

Dr. Pat Mirenda. Software Design Specification Document

Safeguarding Data Using Encryption. Matthew Scholl & Andrew Regenscheid Computer Security Division, ITL, NIST

Requirements engineering

Fourth generation techniques (4GT)

Introduction and Overview

Introduction of Information Security Research Division

CDC UNIFIED PROCESS PRACTICES GUIDE

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Achieving business agility and cost optimization by reducing IT complexity. The value of adding ESB enrichment to your existing messaging solution

Service Oriented Architecture

How To Understand The Dependency Inversion Principle (Dip)

Network Security. Mobin Javed. October 5, 2011

A methodology for secure software design

Test Automation Framework

FIPS Security Policy. for Motorola, Inc. Motorola Wireless Fusion on Windows CE Cryptographic Module

Patterns in Software Engineering

Cloud Data Protection for the Masses

Software Development: The Waterfall Model

Quotes from Object-Oriented Software Construction

Process Models and Metrics

In: Proceedings of RECPAD th Portuguese Conference on Pattern Recognition June 27th- 28th, 2002 Aveiro, Portugal

secure intelligence collection and assessment system Your business technologists. Powering progress

Quality Management. Lecture 12 Software quality management

E-learning and Student Management System: toward an integrated and consistent learning process

Software development life cycle. Software Engineering - II ITNP92 - Object Oriented Software Design. Requirements. Requirements. Dr Andrea Bracciali

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

Cleaning Encrypted Traffic

Aspect-Oriented Programming

Business-Driven Software Engineering Lecture 3 Foundations of Processes

AC REUSABLE SOFTWARE COMPONENTS

KWIC Exercise. 6/18/ , Spencer Rugaber 1

An Official Capacity. 28 : in.sight. Coca-Cola Hellenic in Athens, Greece (Stirixis Group)

Classical Software Life Cycle Models

The Benefits of Component Object- Based SCADA and Supervisory System Application Development

CS330 Design Patterns - Midterm 1 - Fall 2015

Computer System Management: Hosting Servers, Miscellaneous

Developing SOA solutions using IBM SOA Foundation

Public Key Cryptography in Practice. c Eli Biham - May 3, Public Key Cryptography in Practice (13)

Secure Sockets Layer

4. Multiagent Sys stems Design. Part 2: The PROMETHEUS methodology.

BUSINESS ARCHITECTURE AND BPM ALIGNMENT

RARP: Reverse Address Resolution Protocol

Software Architecture Professional Certificate

Black Box Software Testing Fall 2005 Overview for Students

Chapter 8 Approaches to System Development

Lecture 7: Privacy and Security in Mobile Computing. Cristian Borcea Department of Computer Science NJIT

Software Design. Design (I) Software Design Data Design. Relationships between the Analysis Model and the Design Model

Design Patterns. Design patterns are known solutions for common problems. Design patterns give us a system of names and ideas for common problems.

Masters of Science in Software & Information Systems

Encryption, Data Integrity, Digital Certificates, and SSL. Developed by. Jerry Scott. SSL Primer-1-1

Measurement and Analysis Introduction of ISO7816 (Smart Card)

Business Rule Standards -- Interoperability and Portability

ATV Data Link Simulator: A Development based on a CCSDS Layers Framework

A CLOUD SECURITY APPROACH FOR DATA AT REST USING FPE

MVC Architecture Driven Design and Implementation of Java Framework for Developing Desktop Application

Points of View. CxO s point of view. Developer s point of view. Attacker s point of view

Transcription:

Short Introduction to Design Patterns Lecture 7 Software Engineering CUGS Slides by David Broman and Kristian Sandahl Department of Computer and Information Science Linköping University, Sweden kristian.sandahl@ida.liu.se

A Software Life-cycle Model Which part will we talk about today? Maintenance 2 Requirements Validate Requirements, Verify Specification Acceptance Test (Release testing) System Design (Architecture, High-level Design) Verify System Design System Testing (Integration testing of modules) Module Design (Program Design, Detailed Design) Verify Module Design Verify Implementation Module Testing (Integration testing of units) Implementation of Units (classes, procedures, functions) Unit testing Project Management, Software Quality Assurance (SQA), Supporting Tools, Education

Christopher Alexander

TAPESTRY OF LIGHT AND DARK Create alternating areas of light and dark throughout the building, in such a way that people naturally walk toward the light, whenever they are going to important places: seats, entrances, stairs, passages, places of special beauty, and make other areas darker, to increase the contrast.

Software Design Patterns A Design Pattern is a standard solution for a standard design problem in a certain context. Goal: reuse design information

Example: Facade

Example: Facade Facade

How to describe design patterns?

Facade Intent Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use. Motivation Structuring a system into subsystems helps reduce complexity. A common design goal is to minimize the communication and dependencies between subsystems. example

Facade Applicability Use the Facade pattern when: you want to provide a simple interface to a complex subsystem. This makes subsystems more reusable and easier to customize. there are many dependencies between clients and the implementation classes of an abstraction. Introduce a facade to decouple the subsystem from other subsystems, thereby promoting subsystem independence and portability. you want to layer your subsystems. Use a facade to define an entry point to each subsystem level.

Facade Consequences The Facade pattern offers the following benefits: 1. It shields clients from subsystem components, thereby reducing the number of objects that clients deal with and making subsystem easier to use. 2. It promotes weak coupling between subsystem and its clients. Weak coupling lets you vary the components of the subsystem without affecting its clients. 3. It doesn't prevent applications from using subsystem classes if they need to.

Facade Structure Participants Collaborations Implementation Sample Code Known Uses Related Patterns

Observer 50% 50% 40% 30% 20% 10% 0% a b c 40% 30% 20% 10% 0% a b c a = 10% b = 30% c = 40%

Observer Applicability When an abstraction has two aspects, one dependent on the other. When a change to one object requires changing others. When an object should be able to notify other objects without making assumptions about who these objects are.

Observer, structure Subject attach(observer) detach(observer) notify() * Observer update() ConcreteSubject subjectstate getstate() setstate() ConcreteObserver observerstate update()

Observer, collaborations

Observer, consequences Abstract coupling between Subject and Observer Support for broadcast communication Unexpected updates

Strategy 19 Name: Strategy Also known as: Policy Problem: Need to use different variants of the same algorithm in a class Different algorithms will be appropriate at different time. It is hard to add new algorithms and to change existing ones. Example: Input (Plain Text) Cryptographic Module Algorithms: DES AES Intent (from GoF): Output (cipher text) 3DES "Define a family of algorithms, encapsulate each one and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it." RC5

Strategy 20 Structure: Reference to a strategy type Abstract Context +contextinterface() -strategy * Strategy +algorithminterface() In example: e.g. class EncryptAlg In example: Part of crypto module. Holds data, keys etc. ConcreteStrategyA +algorithminterface() ConcreteStrategyB +algorithminterface() ConcreteStrategyC +algorithminterface() In Example: Implements e.g. algorithm AES E.g. AlgDES E.g. AlgRC5