Y2 eProjects Session 4 – Advanced Topics. Objectives  Dynamic Models  Design Patterns (Optional)  Software testing (for S4) ACCP i7.1\Sem3_4\eProject\T4.

Slides:



Advertisements
Similar presentations
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Advertisements

 Recent researches show that predicative programming can be used to specify OO concepts including classes, objects, interfaces, methods, single and multiple.
Design Patterns Introduction What is a Design Pattern? Why were they developed? Why should we use them? How important are they?
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
Plab – Tirgul 12 Design Patterns
Introduction To System Analysis and Design
© 2005 Prentice Hall8-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Unified Modeling (Part I) Overview of UML & Modeling
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
ECE 355 Design Patterns Tutorial Part 2 (based on slides by Ali Razavi) Presented by Igor Ivković
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
SE-565 Software System Requirements More UML Diagrams.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Unified Modeling Language
Design Patterns Trends and Case Study John Hurst June 2005.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
Software Design Refinement Using Design Patterns Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
05 - Patterns Intro.CSC4071 Design Patterns Designing good and reusable OO software is hard. –Mix of specific + general –Impossible to get it right the.
Case Studies on Design Patterns Design Refinements Examples.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
Unified Modeling Language, Version 2.0
Introduction To System Analysis and Design
ISP666 MVC & Design Patterns. Outline Review Event Programming Model Model-View-Controller Revisit Simple Calculator Break Design Patterns Exercise.
Patterns in programming 1. What are patterns? “A design pattern is a general, reusable solution to a commonly occurring problem in software. A design.
 How are you going to collaborate?  How are you going to divide up work?  How are you going to make sure that changes work with other people’s code?
Object-Oriented Design Principles and Patterns. © 2005, James R. Vallino2 How Do You Design? What principles guide you when you create a design? What.
Behavioral Design Patterns Morteza Yousefi University Of Science & Technology Of Mazandaran 1of 27Behavioral Design Patterns.
ניתוח מערכות מידע 1 Unified Modeling Language (UML) § § The Unified Modeling Language (UML) is the industry-standard language for: Specifying, Visualizing,
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
CS 210 Adapter Pattern October 19 th, Adapters in real life Page 236 – Head First Design Patterns.
TAL7011 – Lecture 4 UML for Architecture Modeling.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
ECE450S – Software Engineering II
Design Jon Walker. More UML ● What is UML again?
Patterns in programming1. 2 What are patterns? Answers to common design problems. A language used by developers –To discuss answers to design problems.
Design Patterns CSIS 3701: Advanced Object Oriented Programming.
CS 4233 Review Feb February Review2 Outline  Previous Business – My.wpi.edu contains all grades to date for course – Review and contact.
05/26/2004www.indyjug.net1 Indy Java User’s Group May Knowledge Services, Inc.
DESIGN PATTERNS COMMONLY USED PATTERNS What is a design pattern ? Defining certain rules to tackle a particular kind of problem in software development.
Software Design Patterns Curtsy: Fahad Hassan (TxLabs)
12 Chapter 12: Advanced Topics in Object-Oriented Design Systems Analysis and Design in a Changing World, 3 rd Edition.
Design Patterns: Elements of Reusable Object- Orientated Software Gamma, Helm, Johnson, Vlissides Presented By: David Williams.
Design Patterns. 1 Paradigm4 Concepts 9 Principles23 Patterns.
Design Patterns Introduction
1 Unified Modeling Language, Version 2.0 Chapter 2.
Example to motivate discussion We have two lists (of menu items) one implemented using ArrayList and another using Arrays. How does one work with these.
Proxy Pattern defined The Proxy Pattern provides a surrogate or placeholder for another object to control access to it by creating a representative object.
Watching the movie the hard way…. Page 256 – Head First Design Patterns.
CS 210 Proxy Pattern Nov 16 th, RMI – A quick review A simple, easy to understand tutorial is located here:
StarBuzz Coffee Recipe Boil some water Brew coffee in boiling water Pour coffee in cup Add sugar and milk Tea Recipe Boil some water Steep tea in boiling.
An object's behavior depends on its current state. Operations have large, multipart conditional statements that depend on the object's state.
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
Basic Characteristics of Object-Oriented Systems
1 An Overview of UML. 2 The Unified Modeling Language UML is a graphical language used by software engineers to model software systems during development.
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
Appendix 3 Object-Oriented Analysis and Design
Design Patterns: MORE Examples
MPCS – Advanced java Programming
Sequence Diagrams.
Unified Modeling Language
Sequence Diagrams.
Presented by Igor Ivković
IMAT5205 Systems Analysis and Design
Software Analysis.
Informatics 122 Software Design II
Presented by Igor Ivković
Presentation transcript:

Y2 eProjects Session 4 – Advanced Topics

Objectives  Dynamic Models  Design Patterns (Optional)  Software testing (for S4) ACCP i7.1\Sem3_4\eProject\T4 2

Dynamic Models ACCP i7.1\Sem3_4\eProject\T4 Dynamic Models Use Cases State Machine Sequence Diagram Collaboration Diagram

Message and Message Notations  Message is drawn as a line with an arrow between sender and receiver of the message. The arrowhead indicates the type of the message sent OOAD with UML / Session 7 / 4 of 25

State Diagram OOAD with UML / Session 7 / 5 of 25  State diagrams are one set of diagrams which helps to draw the dynamics of a system  The state of an object at any point in time is the condition of the object at that instant  State of the object is defined by all the attributes of the object and the links maintained by it

State and Transition  The process of change in state is called state transition  Transitions are typically the result of the invocation of an operation that causes an important change in state  An action is something, in the case of a class it is an operation, which is invoked by/on the entity being modeled

Sub-state vs. composite state  The state of an object can have sub-states in it  A sub state is a part of the composite state  Sub States can be concurrent or sequential OOAD with UML / Session 7 / 7 of 25

OOAD with UML / Session 7 / 8 of 25 Sub-state vs. composite state (cont’d)

State diagram example OOAD with UML / Session 7 / 9 of 25

Sequence Diagram time objects A sequence diagram represents interactions between objects over the time

Recursion  Repetition of the same activity again and again until a condition is met  While showing recursion the event arrow comes back to the same object from where it started OOAD with UML / Session 7 / 11 of 25

Collaboration Diagrams  Collaboration Diagrams describes object interaction with primary focus on events not the order of interactions ( as in Sequence Diagrams)  Objects are shown using the Class icon  Sequence in Collaboration Diagram is shown by numbering the messages  Collaboration Diagrams are useful for understanding all the effects on a given object and for procedural design

Collaboration Diagram example

Usage of dynamic models  Use Sequence and\or Collaboration Diagrams: For clarifying object behaviors within a single use case Showing collaborations among the objects  Use state diagrams to look at the behavior object across use cases  For multi-threading, use activity diagrams

Design Patterns (Optional)  Design Patterns are common ways of structuring programs typically deal with a small number of classes, but can be of any size provide a communication framework in which ideas can be discussed at a high level can specify how objects are created, how they interact, or how they are structured ACCP i7.1\Sem3_4\eProject\T4

What are design patterns?  They are common ways of structuring programs typically deal with a small number of classes, but can be of any size provide a communication framework in which ideas can be discussed at a high level can specify how objects are created, how they interact, or how they are structured  Why Patterns? Reuse solutions Vocabulary for development Better software

Design Pattern Example Singleton Ensure a class only has one instance, and provide a global point of access to it.

Design Pattern Example Strategy Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it

Design Pattern Example Facade JDBC API DatabaseFacade Client uses Connection Statement ResultSet DatabaseMetadata ResultSetMetadata Driver … … 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.

Design Pattern Example Data Access Object Alur et al.

Design Principles  Programming to interfaces not implementations  Favor composition over inheritance  Encapsulate what varies  Strive for loosely coupled between objects that interact  Classes should OPEN for extension and CLOSE for modification  Depends on abstraction, not concrete classes  Don't call us, we'll call you  A class should have only one reason to change ACCP i7.1\Sem3_4\eProject\T4

Best Practices  Use dynamic models to clarify main and\or complicated class relationship\algorithms, not for ‘obvious’ one  Stick to design principles for better design  Use Design Patterns ACCP i7.1\Sem3_4\eProject\T4

Software testing (for S4) ACCP i7.1\Sem3_4\eProject\T4

References and Readings  E. Gamma, R. Helm, R. Johnson, & J. Vlissides. Design Patterns: Elements of Object-Oriented Software, Addison-Wesley,  D. Alur, J. Crupi and D. Malks, Core J2EE Patterns: Best Practices and Design Strategies, 2 nd Edition, 2003  Fowler M. & Scott K., 1999, UML Distilled, Addison Wesley  Aptech India, OOAD Course, ACCP 2003 Curriculum ACCP i7.1\Sem3_4\eProject\T4