UML Metrics Semrug presentation from RIIS LLC. Agenda Introduction Who are we The need for Metrics What’s in your Style Guide Automating the process Conclusion.

Slides:



Advertisements
Similar presentations
A Brief Introduction. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
Advertisements

Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 04. Other.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
Systems Analysis and Design in a Changing World, Fourth Edition
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
IMS1805 Systems Analysis Topic 3: Doing Analysis (continued from previous weeks)
Component and Deployment Diagrams
C++ Training Datascope Lawrence D’Antonio Lecture 11 UML.
© Copyright Eliyahu Brutman Programming Techniques Course.
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
Objectives Explain the purpose and objectives of object- oriented design Develop design class diagrams Develop interaction diagrams based on the principles.
An Introduction to Rational Rose Real-Time
Object-Oriented Analysis and Design
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
MDC Open Information Model West Virginia University CS486 Presentation Feb 18, 2000 Lijian Liu (OIM:
The Design Discipline.
Systems Analysis and Design in a Changing World, Fifth Edition
UML Unified Markup Language Ziya Karakaya Atılım University, Computer Engineering
Systems Analysis and Design in a Changing World, Fifth Edition
The Software Design Metrics tool for the UML™ Last updated: 18-Feb-2011.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
Prepared by: Sanaz Helmi Hoda Akbari Zahra Ahmadi Sharif University of Tech. Summer 2006 An Introduction to.
12 Systems Analysis and Design in a Changing World, Fifth Edition.
1 On to Object Design Chapter 14 Applying UML and Patterns.
1 ITEC 3010 “Systems Analysis and Design, I” LECTURE 10: Use Case Realizations [Prof. Peter Khaiter]
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
 A software application is like a city  Modeling = Architecture  OOP = Civil Engineering  UML Classes = Blueprints of Buildings  UML is a common.
IBM Software Group ® Overview of SA and RSA Integration John Jessup June 1, 2012 Slides from Kevin Cornell December 2008 Have been reused in this presentation.
Systems Analysis and Design in a Changing World, 3rd Edition
Actors and Use Case Diagrams Month Day, Year. Agenda Training Plan Overview Review Detailing Requirements with Requisite Pro Concepts Setting Up XDE Integration.
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
Modeling Component-based Software Systems with UML 2.0 George T. Edwards Jaiganesh Balasubramanian Arvind S. Krishna Vanderbilt University Nashville, TN.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 03. Classes,
TAL7011 – Lecture 4 UML for Architecture Modeling.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
Design Jon Walker. More UML ● What is UML again?
Design Model Lecture p6 T120B pavasario sem.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
OMT Modeling 1. Object Model : presented by the object model and the data dictionary. 2. Dynamic Model: presented by the state diagrams and event flow.
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
® IBM Software Group © 2009 IBM Corporation Essentials of Modeling with the IBM Rational Software Architect, V7.5 Module 15: Traceability and Static Analysis.
Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A.
Chapter 3: Introducing the UML
CSC 520 – Advanced Object Oriented Programming, Fall, 2010 Thursday, October 14 Week 7, UML Diagrams
UML Course Instructor: Rizwana Noor. Overview  Modeling  What is UML?  Why UML?  UML Diagrams  Use Case  Components  Relationships  Notations.
Communication Diagrams Lecture 8. Introduction  Interaction Diagrams are used to model system dynamics  How do objects change state?  How do objects.
1 SYS366 Week 2 - Lecture 2 Visual Modeling & UML.
Introduction to UML and Rational Rose UML - Unified Modeling Language Rational Rose 98 - a GUI tool to systematically develop software through the following.
11. Chapter 11: The Object-Oriented Approach to Design: Use Case Realization Systems Analysis and Design in a Changing World, Fourth Edition.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 14 Slide 1 Object-Oriented Design.
UML (Unified Modeling Language)
1 IS 0020 Program Design and Software Tools Unified Modeling Language Lecture 13 April 13, 2005.
1 Advanced DataBases Unified Modelling Language An Introduction and Use Case Lecture 2 Susan Curtis.
Method – Notation 8 Hours.
CHAPTER
UML(Unified Modeling Language)
UML Diagrams By Daniel Damaris Novarianto S..
The Movement To Objects
Object-Oriented Analysis and Design
Chapter 11 Object-Oriented Design
Unified Modeling Language
Introduction to Unified Modeling Language (UML)
UML Diagrams Jung Woo.
The Object Oriented Approach to Design
Software Metrics SAD ::: Fall 2015 Sabbir Muhammad Saleh.
PPT6: Object-oriented design
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Presentation transcript:

UML Metrics Semrug presentation from RIIS LLC

Agenda Introduction Who are we The need for Metrics What’s in your Style Guide Automating the process Conclusion

RIIS LLC Based in Royal Oak Founded in 1998 –Software development –Rational tools Rational Skill set –ReqPro, Clearcase, ClearQuest, Rose etc. –Extending Rational Suite through Tool Customization Why the interest in UML –Client driven –Process improvement Why the interest in Metrics…

Why the interest in Metrics Improve quality of the models –Easier to understand –More accurate Improve overall productivity –Better models, one less round of questions Moving to a global development environment –Offshore –3rd Party modelers –Enterprise modeling with multiple teams Hidden UML secret –Just like any development ……large scale modeling tends to falls apart

Why the interest (cont’d) SQL and Java –Coding standards –Code reviews Aims and Objectives –Codify what makes good code –Provide consistency –Make it easier for new developers to understand code Now do the same for UML –UML is a language

Today’s UML Models No consistency –Too much detail –Or maybe too little detail Difficult to teach new modelers UML code reviews –Very Subjective –Time consuming –Need tools to automate

Frequently occurring UML Errors (Bolloju & Leung)

So what’s in your style guide? Nothing cast in stone –What works best for you –Define company wide conventions General Rules –Consistent naming conventions –Consistent use of UML diagrams –What diagrams should your modelers be using –Consistent arrangement of diagrams –More….

Style Guide (cont’d) What are your company specific rules –Define how your people should be modeling –What makes a good model depends upon the purpose of the model Decide what style of UML works for your organization –XP Quickstart, throwaway UML –Martin Shoemaker’s UML in 5 steps Iterative but not detailed –CMMI Final UML model matches the developed application Including any change controls etc. –MDA Are you generating code and round-tripping

Style Guide (cont’d) If a model is used to discuss and explore the high-level functionality of a system –If the equivalent code would be equally clear, you’re modeling too scrupulously (setProperties) –Activity diagrams should be preferred, sequence diagrams should be avoided If a model is used to document a system (e.g. for government work) –Object and class relationships become more important –Sequence and collaboration diagrams become more relevant Find a UML model that works for you and use it as a metric template

Choose your Metrics List of UML Metrics (from SDMetrics) –Pick and choose what you need –Or create your own

Metrics – Use Cases number of actors and use cases number use cases per actor number times use cases reused number state diagrams related with particular actor number of associations the use case participates in number of extension points of the use case number of use cases which this one includes number of use cases which include this one number of use cases which extend this one number of use cases which this one extends using standardized noun and verb list

Metrics – Class Diagrams number of attributes in the class (number variables in a class) number of operations in a class (Weighted Method Complexity) number of operations with a name starting with 'set'. (setters and getters) nesting level of the class (for inner classes). number of interfaces the class implements number of children of the class number of descendents of the class number of ancestors of the class depth of the class in the inheritance hierarchy class to leaf depth number of inherited attributes

Metrics – Class Diagrams (cont’d) number of elements on which this class depends number of elements that depend on this class. number of associated elements in the same scope (namespace) as the class number of associated elements in the same scope branch as the class number of associated elements not in the same scope branch as the class number of times the class is externally used as attribute type number of attributes in the class having another class or interface as their type number of times the class is externally used as parameter type number of parameters in the class having another class or interface as their type. number of connectors owned by the class number of instance specification where the class is a classifier number of lifelines that represent a property of which this class is the type number of messages sent number of messages received number of messages sent to instances of the same class number of times the class appears on a diagram

Metrics – Interface number of operations in the interface number of times the interface is used as attribute type number of times the interface is used as parameter type number of parameters in the interface having an interface or class as their type number of elements the interface has an association with number of elements directly implementing the interface number of elements implementing a descendent of the interface number of ancestors of the interface number of descendents of the interface

Metrics - Packages number of classes in the package number of classes in the package, its subpackages, and so on number of operations in the classes of the package number of interfaces in the package number of relationships between classes and interfaces in the package average number of internal relationships per class/interface number of elements outside this package that depend on classes or interfaces in this package number of elements outside this package that classes or interfaces in this package depend on ratio of abstract classes and interfaces in the package to the total number of interfaces and classes in the package distance from the main sequence Nesting level of the package in the package hierarchy classes and interfaces of a package, and their dependencies, form a graph. This metric counts the number of connected components of that graph number of UML dependencies where the package is the client. number of UML dependencies where the package is the supplier number of packages on which classes and interfaces of this package depend number of messages sent to instances of classes outside the package number of messages received by classifier instances of classes outside the package number of messages sent between classifier instances of classes in the package number of times the package appears on a diagram

Metrics – State Machine number of transitions in the state machine number of transitions with an effect in the state machine number of transitions with a guard in the state machine number of triggers of the transitions of the state machine number of states in the state machine number of activities defined for the states of the state machine

Metrics – Activity Diagrams number of actions of the activity number of object nodes of the activity number of pins on nodes of the activity number of control nodes of the activity number of activity partitions in the activity number of activity groups or regions of the activity number of control flows of the activity number of object flows of the activity number of guards defined on object and control flows of the activity number of exception handlers of the activity

Metrics – Component number of operations of the component number of subcomponents of the component number of packages of the component number of classes of the component number of interfaces of the component number of artifacts of which this component is a manifestation number of connectors owned by the component number of interfaces the component provides number of interfaces the component requires number of outgoing UML dependencies number of incoming UML dependencies number of associated elements via outgoing associations number of associated elements via incoming associations number of times the component appears on a diagram

Metrics – Diagram type of diagram total number of design elements on the diagram number of classes on the diagram number of interfaces on the diagram number of packages on the diagram number of associations on the diagram number of generalizations on the diagram number of UML dependencies and UML usage dependencies on the diagram number of interface realizations on the diagram number of instance specifications on the diagram number of lifelines on the diagram number of connectors on the diagram number of messages on the diagram number of actors on the diagram number of use cases on the diagram number of extension points on the diagram number of use case extensions on the diagram number of use case includes on the diagram

Automating Metric Capture So many metrics, big need for automation Existing tools –OSMAT –Cool Uml –SDMetrics Other Approaches –Rational API –Decompile the ptl –XSLT over exported XMI files RIIS tools –Read into database –Query any metrics you want –Perform global updates –Write out to file

Class Metrics (OSMAT) Total number of classes Total number of inheritance relationships Total number of uses relationships Total number of realize relationships Total number of operation/methods Total number of parameters Total number of class attributes Total number of associations Total number of roles

Class Metrics (OSMAT) Fault-proneness metrics –Weighted method per class (explain) –Number of children per class –Depth of inheritance tree –Coupling between object classes –Response for class –Lack of cohesion in methods

OSMAT output Metrics UML Models File1File2File3File4File5 Basic Total No of Class Total No of Inheritance Relationship Total No of Uses Relationship Total No of Realize Relationship Total No of Operation(Method) Total No of Parameter Total No of Class Attribute Total No of Association Total No of Role

Class Metrics ‘Cool UML’ Design metrics: –Maximum length from the node to the root of the tree –Average operations per class Size metrics: –Number of operations per class –Number of attributes per class –Total number of classes –Total number of operations –Total number of attributes Complexity metrics: –Number of immediate children per class –Number of sub-classes that inherits directly or indirectly –Number of super classes –Total number of edges in the inheritance hierarchy

Metric Display Save metrics in data warehouse –Dimension and Fact tables Weekly or daily scheduled job creates metrics Display using –Rational Project Console –Business Objects Dashboard –RIIS Application Dev Dashboard

References The Elements of UML(TM) 2.0 Style by Scott W. Ambler Anything by Martin Fowler Writing Effective Use Cases by Alistair Coburn

Conclusion Turning subjective into objective Automate the process Improve the quality of your metrics Improve the link between requirements and code by building better models Use only as much formalism, advanced tactics, and ceremony as your situation requires and your audience is able to take (MAT). Questions Contact Details