Review Software Engineering October, 7, Adrian Iftene

Similar documents
Ingegneria del Software Corso di Laurea in Informatica per il Management. Design Patterns part 1

Design Patterns. An introduction

Using Design Patterns in Java Application Development

Design Patterns. Manuel Mastrofini. Systems Engineering and Web Services. University of Rome Tor Vergata June 2011

Produced by. Design Patterns. MSc in Communications Software. Eamonn de Leastar

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

Design Patterns. Gunnar Gotshalks A4-1

Object Oriented Methods with UML. Introduction to Design Patterns- Lecture 8

Design Pattern. CMPSC 487 Lecture 10 Topics: Design Patterns: Elements of Reusable Object-Oriented Software (Gamma, et al.)

Idioms and Design Patterns. Martin Skogevall IDE, Mälardalen University

EPL 603 TOPICS IN SOFTWARE ENGINEERING. Lab 6: Design Patterns

Object-oriented Software Design Patterns

DESIGN PATTERN - INTERVIEW QUESTIONS

SDC Design patterns GoF

Design Patterns. Observations. Electrical Engineering Patterns. Mechanical Engineering Patterns

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

Ingegneria del Software Corso di Laurea in Informatica per il Management. Design Patterns part 1

Applying the Observer Design Pattern

Software Design Patterns. Background 1. Background 2. Jonathan I. Maletic, Ph.D.

Produced by. Design Patterns. MSc in Communications Software. Eamonn de Leastar

be used for more than one use case (for instance, for use cases Create User and Delete User, one can have one UserController, instead of two separate

Trusted Components. Reuse, Contracts and Patterns. Prof. Dr. Bertrand Meyer Dr. Karine Arnout

Software Design COSC 4353/6353 D R. R A J S I N G H

Design Patterns. Hausi A. Müller University of Victoria. Software Architecture Course Spring 2000

APPLYING DESIGN PATTERNS TO SCA IMPLEMENTATIONS

Applying Some Gang of Four Design Patterns CSSE 574: Session 5, Part 3

Object-Oriented Design

Topics in Object-Oriented Design Patterns

Applying the Decorator Design Pattern

MVC. Model-View-Controller. Design Patterns. Certain programs reuse the same basic structure or set of ideas

Tuesday, October 4. Announcements

Socket attaches to a Ratchet. 2) Bridge Decouple an abstraction from its implementation so that the two can vary independently.

The Strategy Pattern Design Principle: Design Principle: Design Principle:

Requirements and Design Overview

CS/CE 2336 Computer Science II

Object-Oriented Design

Applying the Factory Method Design Pattern

The Design Patterns Matrix From Analysis to Implementation

Object Oriented Paradigm

The GoF Design Patterns Reference

A Rapid Overview of UML

Design patterns. Jef De Smedt Beta VZW

Facade and Adapter. Comp-303 : Programming Techniques Lecture 19. Alexandre Denault Computer Science McGill University Winter 2004

Design Pattern What is a Design Pattern? Design Pattern Elements. Almas Ansari Page 1

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

Introduction to Software Engineering: Object Design I Reuse & Patterns

A Reconnaissance on Design Patterns

What is Design Patterns?

Object-Oriented Oriented Programming

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

Slide 1. Design Patterns. Prof. Mirco Tribastone, Ph.D

OODP Session 4. Web Page: Visiting Hours: Tuesday 17:00 to 19:00

SOFTWARE ENGINEERING SOFTWARE DESIGN. Saulius Ragaišis.

1 Software Architecture

Software Engineering I (02161)

Design Patterns. Dr. Rania Khairy. Software Engineering and Development Tool

Applying Design Patterns to accelerate development of reusable, configurable and portable UVCs. Accellera Systems Initiative 1

Design Patterns #3. Reid Holmes. Material and some slide content from: - GoF Design Patterns Book - Head First Design Patterns

CSCI Object Oriented Design: Frameworks and Design Patterns George Blankenship. Frameworks and Design George Blankenship 1

3 Product Management Anti-Patterns by Thomas Schranz

Design Patterns: Structural and Behavioural

Overview of Patterns: Introduction

UNIT I Introduction to Design Patterns

Application Architectures, Design Patterns

Summary of the course lectures

Brief Note on Design Pattern

Lecture 17: Patterns Potpourri. Copyright W. Howden 1

SYLLABUS CHAPTER - 1 [SOFTWARE REUSE SUCCESS FACTORS] Reuse Driven Software Engineering is a Business

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

Software Reengineering Refactoring To Patterns. Martin Pinzger Delft University of Technology

Design patterns. OOD Lecture 6

Extensibility Design Patterns From The Initial Stage of Application Life-Cycle

Lecture 20: Design Patterns II

6.3 Patterns. Definition: Design Patterns

Introduction and History

Topics. Software Process. Agile. Requirements. Basic Design. Modular Design. Design Patterns. Testing. Quality. Refactoring.

Design Patterns. CSC207 Fall 2017

Lectures 24 and 25 Introduction to Architectural Styles and Design Patterns

UNIT I Introduction to Design Patterns

An Introduction to Patterns

Software Design And Modeling BE 2015 (w. e. f Academic Year )

Applying Design Patterns to SCA Implementations

CS251 Software Engineering Lectures 18: Intro to DP

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

INSTITUTE OF AERONAUTICAL ENGINEERING

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

Coordination Patterns

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

Design patterns. Valentina Presutti courtesy of Paolo Ciancarini

CSCI 253. Overview. The Elements of a Design Pattern. George Blankenship 1. Object Oriented Design: Iterator Pattern George Blankenship

Software Engineering Prof. Rushikesh K.Joshi IIT Bombay Lecture-15 Design Patterns

Design Patterns. SE3A04 Tutorial. Jason Jaskolka

What is Design Patterns?

2.1 Design Patterns and Architecture (continued)

Reuse at Design Level: Design Patterns

CHAPTER 6: CREATIONAL DESIGN PATTERNS

Design Patterns. "Gang of Four"* Design Patterns. "Gang of Four" Design Patterns. Design Pattern. CS 247: Software Engineering Principles

An Introduction to Patterns

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

CS 247: Software Engineering Principles. Design Patterns

Transcription:

Review Software Engineering October, 7, 2013 Adrian Iftene adiftene@info.uaic.ro

Software engineering Basics Definition Development models Development activities Requirement analysis Modeling (UML Diagrams) Design patterns (GRASP, GOF) Quality assurance Deployment Maintenance Programs quality Copyright

Software engineering Development models Requirements analysis Modeling (UML diagrams) Design patterns Testing and debugging Maintenance Software metrics Project management Author rights 3

Keywords from definition: Development of large applications Working teams (Manager, Team/Group leader, SEs) Engineering principles Safe and efficient programs Running, maintenance, withdrawal Software engineer Project management: team coordination, communication, planning, budget 4

How do the activities indicated by phases of program development Examples of development models: Ad-hoc The Cascade (with feedback) Prototyping Spiral RUP (Rational Unified Process) (Inception, Elaboration, Construction, Transition) XP (Extreme Programming) Agile Lean Scrum V-model 5

It is an engineering discipline that deals with all aspects of program development Proposed to adopt a systematic and organized approach to software development process Proposes using appropriate techniques and tools having regard to problem to be solved restrictions resources available 6

Requirements analysis Architectural design Detailed design Implementation Integration Validation Verification Maintenance 7

Determine what the customer wants the program to do The aim is to record requirements in a clearer and more accurate manner Problems Communication Negotiation Advising clients Who? Project Manager, Program Manager or Business Analyst Why? 8

Arhitectural The program is divided into simplest modules or components that can be individually addressed Detailed Modules are designed to the smallest details UML Diagrams Use-Case, classes, interactions, sequence, collaboration, states, activities, packages Reverse & Forward Engineering 9

10

11

Activity 12

state 13

Sequence 14

Collaboration 15

Implementation Detailed design is translated into a programming language This is done modular on components and using design patterns Integration models Big bang Incremental 16

Design patterns capture solutions that have developed and evolved over time (GOF - Gang- Of-Four (because of the four authors who wrote it), Design Patterns: Elements of Reusable Object-Oriented Software) In software engineering (or computer science), a design pattern is a general repeatable solution to a commonly occurring problem in software design The design patterns are language-independent strategies for solving common object-oriented design problems 17

Elements: 1. Pattern name 2. Problem (when, context, list of conditions) 3. Solution (elements, relationships, responsibilities) 4. Consequences (results, understanding, evaluation) 5. Intent, also known as, motivation, applicability, structure, participants, implementation, known uses 18

GRASP GOF Creational patterns Structural patterns Behavioral patterns Fundamental, Partitioning, GUI, Organizational Coding, Optimization Coding, Robustness Coding, Testing, Transactions, Distributed Architecture, Distributed Computing, Temporal, Database, Concurrency patterns 19

GRASP - General Responsibility Assignement Software Patterns (Principles) It helps to allocate responsibilities to classes and objects in the most elegant way possible Exemples of principles used in GRASP: Information Expert (or Expert), Creator, High Cohesion, Low Couplig, Controller Polymorphism, Pure Fabrication, Indirection, Protected Variations 20

Problem: given a certain behavior (operation), which class should be assigned? Solution: Assign a responsibility class that has the information necessary to fulfill those responsibilities A good allocation operations lead to systems that are: Easy to understand, easy to extend, reuse, robust 21

Measure of the degree of dependence of a class of other classes Types of Dependence: is connected to, has knowledge, based on A class that has low coupling (reduced) does not depend on "many" other classes, where "more" is context dependent Problems caused by coupling: hard to change, difficult to understand in isolation, difficult to reuse View: class diagrams and collaboration diagrams 22

Cohesion is a measure of how strong are focused responsibilities of a class A class whose responsibilities are very closely related and do not have a lot has great cohesion Problems caused by low cohesion: hard to understand, hard to reuse, hard to maintain sensitive, such classes are always subject to change 23

Abstract Factory groups object factories that have a common theme (PC-Server-Workstation) Builder constructs complex objects by separating construction and representation (fast food menu) Factory Method creates objects without specifying the exact class to create (Hello <>, Open/New options) Prototype creates objects by cloning an existing object (editor for music scores, Cloneable/clone) Singleton restricts object creation for a class to only one instance (Logger system) Not in GOF book: Lazy initialization, Object pool, Multiton, Resource acquisition is initialization 24

Adapter allows classes with incompatible interfaces to work together (Wrapper, Plug-socket) Bridge decouples an abstraction from its implementation (Shapes-OS) Composite composes zero-or-more similar objects (compositions, container, pictures, employees) Decorator dynamically adds/overrides behavior (Christmas tree) Facade provides a simplified interface (compiler, glass-building, JDBC, store keeper) Flyweight use sharing to reduce the cost (MS Word - characters formatting) Proxy provides a placeholder (surrogate) (MS Word images, ATM) 25

Chain of responsibility delegates commands to a chain (contextual Help, multi level filter) Command creates objects which encapsulate actions and parameters (restaurant waiter) Interpreter implements a specialized language Iterator accesses the elements sequentially Mediator allows loose coupling between classes (control tower) Memento provides the ability to restore an object to its previous state 26

Observer allows to observer objects to see an event (Excel graphs) State allows an object to alter its behavior when its internal state changes (TCPConnection) Strategy allows one of a family of algorithms to be selected on-the-fly at runtime (+-* context) Template defines an algorithm as an abstract class, allowing its subclasses to provide concrete behavior (Game: initialize, makeplay, ) Visitor separates an algorithm from an object structure Not in GOF book: Null Object, Specification 27

With more than 20 design patterns to choose from, it might be hard to find the one that addresses a particular design problem Approaches to finding the design pattern that's right for your problem: 1. Consider how design patterns solve design problems 2. Scan Intent sections 3. Study relationships between patterns 4. Study patterns of like purpose (comparison) 5. Examine a cause of redesign 6. Consider what should be variable in your design 28

1. Read the pattern once through for an overview 2. Go back and study the Structure, Participants, and Collaborations sections 3. Look at the Sample Code section to see a concrete example 4. Choose names for pattern participants that are meaningful in the application context 5. Define the classes 6. Define application-specific names for operations in the pattern 7. Implement the operations to carry out the responsibilities and collaborations in the pattern 29

Validation: ensure that the program meets user requirements Building the right product? Verification: ensuring that the software is stable and working properly from the point of view of developers Build the product right? Unit testing 30

Refers to planned and systematic production processes that provide confidence in a product's suitability for its intended purpose. A set of activities intended to ensure that products satisfy customer requirements QA cannot absolutely guarantee the production of quality products, unfortunately, but makes this more likely Two key principles characterize QA: "fit for purpose" - the product should be suitable for the intended purpose, and "right first time" - mistakes should be eliminated 31

Quality Time Price 32

ISO 9000 is a family of standards for quality management systems Some of the requirements in ISO 9001 (from ISO 9000 family) include a set of procedures; monitoring processes; keeping adequate records; checking output for defects; regularly reviewing individual processes; facilitating continual improvement 33

When? Aims? Problems: communication, incomplete requirements, design Bug: Effects, Prevention, Life cycle Professional testing? Unit, Acceptance, Regression Manual & Automation testing Usability, security Internationalization & localization

After delivery Mistakes are discovered and must be repaired There may be changes in specifications There may be new requirements Training those who will use the product Maintenance = managing these types of problems 35

Concepts Safety Efficiency Maintenance Usability Basic Metrics KLOC: Kilo Lines Of Code (thousand lines of code) Effort, PM: Person - Month (Man - month) Copyright 36

Web page of SE course Adrian Iftene (2009-2012) http://thor.info.uaic.ro/~adiftene/scoala/2012/ip/ Web page of Ovidiu Gheorghieş (worked with Adriana G.) http://thor.info.uaic.ro/~ogh/ip/ Ian Sommerville: Software Engineering, Addison Wesley, 2001 Craig Larman: Applying UML and Patterns, Addisson Wesley, 2002 Erich Gamma, Richard Helm, Ralph Johnson, John Vissides: Design Patterns, Elements of Reusable Object-Oriented Software, Addisson Wesley, 1998 Internet