A Rapid Overview of UML

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

Design Patterns. An introduction

DESIGN PATTERN - INTERVIEW QUESTIONS

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

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

CS/CE 2336 Computer Science II

Object Design II: Design Patterns

Using Design Patterns in Java Application Development

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

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

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

Tuesday, October 4. Announcements

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

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

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

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

CS251 Software Engineering Lectures 18: Intro to DP

Introduction to Software Engineering: Object Design I Reuse & Patterns

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

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

Design Patterns. Gunnar Gotshalks A4-1

What is Design Patterns?

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

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

Review Software Engineering October, 7, Adrian Iftene

Software Engineering I (02161)

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

APPLYING DESIGN PATTERNS TO SCA IMPLEMENTATIONS

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

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

Object-oriented Software Design Patterns

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

Applying the Observer Design Pattern

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

Applying Design Patterns to SCA Implementations

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

Lectures 24 and 25 Introduction to Architectural Styles and Design Patterns

Topics in Object-Oriented Design Patterns

A Reconnaissance on Design Patterns

Applying the Decorator Design Pattern

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

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

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

SDC Design patterns GoF

Patterns. Erich Gamma Richard Helm Ralph Johnson John Vlissides

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

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

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

A few important patterns and their connections

Plan. A few important patterns and their connections. Singleton. Singleton: class diagram. Singleton Factory method Facade

CPSC 310 Software Engineering. Lecture 11. Design Patterns

An Introduction to Patterns

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

A Primer on Design Patterns

Information systems modelling UML and service description languages

Object Oriented Paradigm

Software Engineering I (02161)

What is Design Patterns?

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

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

Lecture 20: Design Patterns II

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

CSC207H: Software Design Lecture 6

Design patterns. OOD Lecture 6

Overview of Patterns: Introduction

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

Applying the Factory Method Design Pattern

The GoF Design Patterns Reference

Plan. Design principles: laughing in the face of change. What kind of change? What are we trying to achieve?

A Metric of the Relative Abstraction Level of Software Patterns

A Metric for Measuring the Abstraction Level of Design Patterns

Foundations of Software Engineering Design Patterns -- Introduction

Application Architectures, Design Patterns

UNIT I Introduction to Design Patterns

1 Software Architecture

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

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

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

UP Requirements. Software Design - Dr Eitan Hadar (c) Activities of greater emphasis in this book. UP Workflows. Business Modeling.

Chapter 2, lecture 2 Modeling with UML

LECTURE NOTES ON DESIGN PATTERNS MCA III YEAR, V SEMESTER (JNTUA-R09)

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

Software Engineering I (02161)

Lecture 17: Patterns Potpourri. Copyright W. Howden 1

6.3 Patterns. Definition: Design Patterns

Introduction and History

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

WS01/02 - Design Pattern and Software Architecture

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

What is Design Patterns?

3 Product Management Anti-Patterns by Thomas Schranz

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

C++ for System Developers with Design Pattern

SOFTWARE ENGINEERING SOFTWARE DESIGN. Saulius Ragaišis.

Object-Oriented Design

Ownership in Design Patterns. Master's Thesis Final Presentation Stefan Nägeli

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

Chapter 2, Modeling with UML, Part 2

Design Patterns Reid Holmes

Design patterns. Valentina Presutti courtesy of Paolo Ciancarini

Transcription:

A Rapid Overview of UML The Unified dmodeling Language (UML) Emerged in the mid 90s as the de facto standard for softwareengineering engineering design Use case diagram depicts user interaction with system Class (or object) diagram depicts static structure Sequence diagram and state diagram depicts the dynamic behavior of the system Learning these diagrams covers about 90% of needs Software Tools Violet, very easy to use and free (http://sourceforge.net/projects/violet/) Microsoft Visio Pro, much more complete but steeper learning curve, free only for limited time trials

Actors (h (the stick figures) Use Case Diagram Can be people, as shown here Can be other external entities, such as another computer or a GPS satellite Not part of the system itself Use Cases (ovals) Major components of system Name indicates general purpose Detailed behavior given in the associated scenario (see next slide) Interactions (lines) Indicates which h use cases each actor interacts with ih

Associated Scenarios Each oval (use case) has an associated scenario Components are List of actors Entry conditions Flow of events (often more detailed than example shown at the right) Exit conditions Special requirements or exceptions Use case name: AllocateResources Participating Actors: Dispatcher Entry Condition The Resource Allocator has selected an available resource. The resource is currently not allocated Flow of Events The Resource Allocator selects an Emergency Incident. The Resource is committed to the Emergency Incident. Exit Condition The use case terminates when the resource is committed. The selected Resource is now unavailable to any other Emergency Incidents or Resource Requests. Special Requirements The Field Supervisor is responsible for managing the Resources

Graphical notation tti The tabbed outer frame is the package Each rectangle has a name (required), instance variables orfields (optional), and methods (optional) Underlined methods are static Parameter lists may or may not be shown Return type shown to the right Notes are dog eared rectangles Class Diagram

Class Relationships Closed, hollow arrowhead dindicates subclasses (an is a relationship) Italicized methods are abstract A diamond indicates a part of relationship A plain arrow is an association May have multiplicity, such as 0..1 shown, * means zero or more Associations may be named Names at the end of an association indicate a role (not shown here) Dashed arrows are used for exceptions or for a dependency that is not an object reference

The interface box <<interface>> above name Interfaces Same three parts: name, fields (can only be constants in Java), and methods Interfaces can have inheritance as shown by StartPressDriver and ShellDriver The lollypop notation shows when a class implements an interface, such as HskMachineManager2 implementing Cloneable

Object Diagram An object diagram deals with instances of objects An instance is shown by underlining the name The format is <name>:<class> such as c being an instance of a Chemical Object diagrams are not as widely used as class diagrams

Sequence Diagram Passenger ChangeProcessor CoinIdentifier Display CoinDrop * insertchange(coin) Iteration lookupcoin(coin) price displayprice(owedamount) Condition [owedamount<0] returnchange(-owedamount) Notation Actor is shown to the left; classes are at the top of columns Time progresses from top to bottom; rectangles are the lifetime for an interaction some objects can return information, such as price above * indicates iteration, [.] indicates condition

Behavior of a single object What object is modeled as shown at the right? iht? State Diagram The rounded rectangles are states; an object may remain in a state indefinitely The arrows represent transitions between states; they happen very quickly Notice that if something takes time, such as opening, it is shown as a state and not a transition

Techniques for Finding Objects Requirements Analysis Start with Use Cases. Identify participating objects Textual analysis of flow of events (find nouns, verbs,...) Extract application domain objects by interviewing client (application domain knowledge) Find objects by using general knowledge System Design Subsystem decomposition Try to identify layers and partitions Object Design Find additional objects by applying implementation domain knowledge

Another Source for Finding Objects : Design Patterns What are Design Patterns? A design pattern describes a problem which occurs over and over again in a software development environment Then it describes the core of the solution to that problem, in such a way that you can use the this solution many times over, without ever doing it the same twice Design patterns are more general than generics

Design Patterns encourage reusable Designs A facade pattern should be used by all subsystems in a software system. The facade willdelegate requests to the appropriate components within the subsystem. Most of the time the façade does not need to be changed, when the component is changed. Adapters should be used to interface to existing components. For example, a smart card software system should provide an adapter for a particular smart card reader and other hardware that it controls and queries. Bridges should be used to interface to a set of objects where the full set is not completely known at design time. when the subsystem must be extended later after the system has been deployed and client programs are in the field.

Design pattern A design pattern is a template solution to a recurring design problem Look before re inventing the wheel just one more time reusable designknowledge Higher level than classes or data structures (link lists,binary trees...) Lower level than application frameworks an example of modifiable design Learning to design starts by studying other designs

Why are modifiable designs important? A modifiable design enables an iterative and incremental development cycle concurrent development risk management flexibility to change to minimize the introduction of new problems when fixing old ones to deliver morefunctionality after initial delivery

What makes a design modifiable? Low coupling and high cohesion Clear dependencies Explicit assumptions How do design patterns help? They are generalized from existing systems They provide a shared vocabulary to designers They provide examples of modifiable designs Abstract classes Delegation

Historical Development of Design Patterns Design patterns emerged in the 1990s In 1987, Kent Beck and Ward Cunningham began experimenting i with ihthe idea of applying li patterns to programming Thebook Design Patterns: Elements of Reusable Object Oriented Software by Erich Gamma; Richard Helm, Ralph Johnson, and djohn Vlissides was aspublished in 1994 This is referred to as the Gang of Four (GoF) book and has become a classic in computer science Expansion of Patterns The GoF book describes 23 patterns Over 100 patterns are now described in the literature; many new patterns involve concurrency

Pattern Organization of design patterns in the Gang of Four textbook Structural Behavioral Creational Pattern Pattern Pattern Composite Iterator Singleton Decorator Adapter Bridge Command Observer Template Abstract Factory Builder Factory Method Façade Proxy Flyweight Strategy Prototype Visitor Chain of Responsibility Interpreter Mediator Memento State

Organization in Our Textbook Our textbook authors have decided to organize these patterns into five subgroups This organization is non standard, everyone else uses the GoF organization

Design Patterns and Frameworks Frameworks are reusable abstractions of code wrapped in a well defined API Examples in Java are the Collections framework Or the AWT/Swing framework for GUI design Characteristics in a framework the overall program's flow of control is not dictated t d by the caller, but tby the framework A framework has a default behavior A framework can be extended by the user usually by selectively overriding methods with user code Many frameworksuse design patterns (e.g. iterators are used with collections)

Summary Design patterns are partial solutions to common problems such as separating an interface from a number of alternate implementations ti wrapping around a set of legacy classes protecting a caller from changes associated with specific platforms. A design pattern is composed of a small number of classes use delegation and inheritance provide a robust and modifiable solution. These classes can be adapted and refined for the specific system under construction. Customization of the system Reuse of existing solutions