Presentation is loading. Please wait.

Presentation is loading. Please wait.

UML Class Diagrams and Caché CAMTA Meeting – 1 st December 2011 John Murray Senior Product Engineer.

Similar presentations


Presentation on theme: "UML Class Diagrams and Caché CAMTA Meeting – 1 st December 2011 John Murray Senior Product Engineer."— Presentation transcript:

1 UML Class Diagrams and Caché CAMTA Meeting – 1 st December 2011 John Murray Senior Product Engineer

2 UML – Unified Modeling Language Graphical language Uses include expressing… requirements architecture design …of… systems software

3 UML Diagrams At least 13 different official types of diagram in UML version 2 Can be grouped (classified) as: Structural Diagrams Showing what’s in the system Behavioural Diagrams Showing how the system behaves as it runs Interaction Diagrams A sub-class of behavioural diagrams Focus of this session is the Class Diagram A kind of structural diagram Use Class Diagrams to visualize the Caché classes that make up an application Applies equally well to Ensemble

4 What Class Diagrams Convey The class hierarchy, i.e. superclasses and subclasses What instances of the classes record – Attributes (properties) What the classes (or instances of them) can do – Operations (methods, queries, indices) How instances of the classes interact with one another – Associations (relationships, object-value properties) Encapsulation Which attributes/operations are implemented where in the class hierarchy Visibility of attributes/operations (e.g. Public, Private) Navigation of the class model Up the class hierarchy Across the associations

5 Umlanji – Obtaining Class Diagrams from Caché Add-in to Studio Exports structural definitions from the classes within the selected package(s) Plus definitions of all related classes (e.g. library superclasses, datatype classes) Implementation detail (e.g. method code) omitted Export format is XMI – XML Metadata Interchange Load the Umlanji-generated XMI into a UML modelling tool, e.g. ArgoUML Enterprise Architect Poseidon Create class diagrams using the UML tool

6 Classes Abstract class name displayed in italics Generalization points to immediate superclass(es) with hollow arrowhead Stereotypes convey extra information about class

7 Stereotypes for Classes > Subclass of %Library.Persistent > Subclass of %Library.SerialObject > Subclass of %Stream.Object > Class is used to define an SQL View with a ViewQuery keyword value > Class marked as Hidden in the class dictionary > Class specifies the NoExtent keyword Cannot instantiate a persistent extent

8 Attributes One for each non-inherited property that is not object-valued Visibility – Public or Private (“+” or “-” prefix on name) If property is Calculated, UML tool may add a “/” prefix to name If a collection, multiplicity is shown as “0..*” If a list-type collection, attribute marked as “ordered” Optionally, Umlanji also creates a UML attribute for: Object-valued property (non-inherited) Relationship (non-inherited)

9 Stereotypes for Attributes and Associations Attributes > A multidimensional property > Property is (part of) the Primary Key of the SQL Table for this class > Property is (part of) a Foreign Key into the SQL Table of another class > Property is both a PK and an FK Associations >

10 Operations Methods Visibility – Public or Private (+ or - prefix on name) Scope – Classmethod (underlined) or not Final? Abstract? – name in italics Method Parameters in, out or inout; e.g. (paramIn, *paramOut, &paramInOut) Return Type Queries As methods, but never Abstract and scope is always Class Indices As methods, but always Final, never Abstract, and scope is always Class

11 Stereotypes for Operations Operations that are Queries > Operations that are Indices >

12 Associations – Links Between Classes Object-valued property appears as a one-way- navigable association from the class where the property is defined to the class of which the property value is an instance Relationship property appears as a two-way- navigable association between the class where the property is defined and the related class Parent/child relationships are displayed as Compositions (solid black diamond at the Parent end) Foreign key appears as a one-way-navigable association to the target class

13 Stereotypes for Associations Associations > Association is a foreign key to a primary key index on another class > Association is a foreign key to an index on another class

14 Tagged Values The values of parameters of a Caché class/property/index/query are represented in the model as Tagged Values Other Tagged Values documentation Documentation text of a class/property/method etc. derived Set “true” if property is Calculated Adds a “/” prefix to the name if UML tool supports this transient Set “true” if property is Transient Default Attached to a method parameter that has a default value defined

15 For More Information About Umlanji http://www.georgejames.com


Download ppt "UML Class Diagrams and Caché CAMTA Meeting – 1 st December 2011 John Murray Senior Product Engineer."

Similar presentations


Ads by Google