670 likes | 1.3k Views
Building Blocks of UML. by Sreedhar .P. Language Syntax Notation Semantics. Method what to do how to do it why to do it. Modeling Language - Method. Coad/Yourdon. Objectory. Shlaer/Mellor. OMT. Fusion. UML categories. Things. Relationships. Diagrams. UML Things. Structural
E N D
Building Blocks of UML by Sreedhar .P Building Blocks of UML
Language Syntax Notation Semantics Method what to do how to do it why to do it Modeling Language - Method Coad/Yourdon Objectory Shlaer/Mellor OMT Fusion Building Blocks of UML
UML categories Things Relationships Diagrams Building Blocks of UML
UML Things Structural Behavioral Groups Annotational Building Blocks of UML
Structural Things • Nouns of the UML models • Mostly the static parts of a model, representing elements that are either conceptual or physical Building Blocks of UML
UML Things Structural Behavioral Groups Annotational Classes Interfaces Collaborations Use Classes Components Nodes Building Blocks of UML
Class • Description of set of object that share the same attributes, operations, relationships and semantics Window Origin Size Open() Close() Move() Display() Building Blocks of UML
Interface interfaces • Collection of operations that specify a service of a class or component. IThesaurus ISpell IUnknown Wordsmith.dll Building Blocks of UML component
Collaboration • Defines an interaction and is a society of roles and other elements that work together to provide some cooperative behavior that is bigger that the sum of all the elements. Chain of responsibility Building Blocks of UML
Use case • Description of a set of sequence actions that a systems performs that yields an observable result of value to a particular actor Place Order Building Blocks of UML
Component • A physical and replaceable part of the system that conforms to and provide the realization of a set of interfaces. • Typically represents the physical package of otherwise logical elements, such as classes, interfaces and collaborations. Orderform.java Building Blocks of UML
Node • Physical element that exists at run time and presents a computational resource server Building Blocks of UML
Interaction State machine UML Things Structural Behavioral Groups Annotational Building Blocks of UML
Behavioral Things • Dynamic parts of UML models • Represent behavior over time and space Building Blocks of UML
Interaction • Behavior that comprises a set of messages exchanged among objects within a particular context to accomplish a specific purpose display Building Blocks of UML
State Machine • Behavior that specifies the sequences of states an object Waiting Building Blocks of UML
UML Things Structural Behavioral Groups Annotational Package Building Blocks of UML
Package • General-purpose mechanism for organizing elements into groups. • Unlike components, which exist at run time, a package is purely conceptual Business rules Building Blocks of UML
UML Things Structural Behavioral Groups Annotational Building Blocks of UML
Annotational • Explanatory parts Return copy of self Building Blocks of UML
UML Relationships Dependency Generalization Association Aggregation Building Blocks of UML
UML Diagrams Object Statechart Collaboration Class Sequence Activity Use Case Component Deployment Building Blocks of UML
Diagrams • Class - Set of classes, interfaces and collaborations and their relationships • Object – represents static snapshots of instances of things found in class diagrams • Use case – set of use cases and actors • Interaction – shows an interaction consisting of a set of objects and their relationships (sequence and collaboration are isomorphic) • State chart – shows a state machine • Activity – special kind of statechart that shows the flow from activity to activity within a system • Component – organization and dependencies among a set of components • Deployment – configuration of run-time processing nodes and the components that live on them Building Blocks of UML
Rules of the UML • A well-formed model is one that is semantically self-consistent and in harmony with all its related models. • The UML has semantic rules for Names What you can call things, relationships, and diagrams Scope The context that gives specific meaning to a name Visibility How those names can be seen and used by others Integrity How things properly and consistently relate to one another Execution What it means to run or simulate a dynamic model Building Blocks of UML
Common Mechanisms in the UML • A building is made simpler and more harmonious by the conformance to a pattern of common features. • It is made simpler by the presence of four common mechanisms that apply consistently throughout the language. 1. Specifications 2. Adornments 3. Common divisions 4. Extensibility mechanisms Building Blocks of UML
Specification • The UML is more than just a graphical language. Rather, behind every part of its graphical notation there is a specification that provides a textual statement of the syntax and semantics of that building block. • The UML's specifications provide a semantic backplane that contains all the parts of all the models of a system, each part related to one another in a consistent fashion. • The UML's diagrams are thus simply visual projections into that backplane, each diagram revealing a specific interesting aspect of the system. Building Blocks of UML
Adornments • Most elements in the UML have a unique and direct graphical notation that provides a visual representation of the most important aspects of the element. • A class's specification may include other details, such as whether it is abstract or the visibility of its attributes and operations. • Many of these details can be rendered as graphical or textual adornments to the class's basic rectangular notation. Every element in the UML's notation starts with a basic symbol, to which can be added a variety of adornments specific to that symbol. Building Blocks of UML
Common Divisions • In modeling object-oriented systems, the world often gets divided in at least a couple of ways. • First, there is the division of class and object. A class is an abstraction; an object is one concrete manifestation of that abstraction. Classes And Objects Building Blocks of UML
Conti.. • Second, there is the separation of interface and implementation. • An interface declares a contract, and an implementation represents one concrete realization of that contract, responsible for faithfully carrying out the interface's complete semantics. Figure: Interfaces And Implementations Building Blocks of UML
Extensibility Mechanisms • The UML is opened-ended, making it possible for you to extend the language in controlled ways. • The UML's extensibility mechanisms include · Stereotypes · Tagged values · Constraints Figure : Extensibility Mechanisms Building Blocks of UML
Extensibility Mechanisms • A stereotype extends the vocabulary of the UML, allowing you to create new kinds of building blocks that are derived from existing ones but that are specific to your problem. • A tagged value extends the properties of a UML building block, allowing you to create new information in that element's specification. • A constraint extends the semantics of a UML building block, allowing you to add new rules or modify existing ones. Building Blocks of UML