SlideShare uma empresa Scribd logo
1 de 96
Baixar para ler offline
UML advanced

 Paolo Ciancarini
Agenda
•  Advanced diagrams in UML
  –  Packages
  –  Components
  –  Deployment
  –  Other diagrams
•  Extension rules of UML
•  Stereotypes
•  Profiles
UML 2.0


              Superstructure                  Diagram Interchange
Defines user-level constructs to specify
structure and behavior of systems
(e.g., class diagrams, sequence diagrams)




              Infrastructure                         OCL

Defines basic constructs to specify UML and
to customize it for specific domains
(e.g., real-time)



                                                                    3
UML2: advanced structure diagrams




              Profile
             diagram
New syntax for diagrams
Modularity
•  A complex software system can only be
   designed starting from simpler
   subsystems, or modules, or components
•  Module: unit of compilation; eg. a Java
   package
•  Component: (functional, stateless) unit at
   runtime; eg. a new peer connected to a
   p2p system
Discuss
•  The programming languages you know
   which modularity mechanisms do they
   offer?
Grouping Things: Packages
•    Useful to organize elements into groups
•    Purely conceptual; only exists at development time
•    Can be nested
•    Variations of packages are: frameworks, models, &
     subsystems




                                     University Administration
        Course Manager
                                                     Student Admission
                                  Course Manager
                                                     -Student
                                                     +Department
Package
•  Module; collects logically coherent elements
•  Defines a namespace where each element
   has a unique name


                  Java graphics
Package containing classes
 VehicleParts




                              1..2
                                        Engine

            Car
                              3..*
                                        Wheel




The classes Engine and Wheel are included in the
package VehicleParts
Package notations

                     Types

Types
                      Shape   Point




             Types




Shape        Point
Equivalent representations
A package diagram
User Interface               Business logic




            AWT                      Database
Metamodel packages (from 2.1.1)
Dependencies

“A dependency exists between two elements if
changes to the definition of one element may
cause changes to the other.”

“A dependency between two packages exists if
any dependency exists between any two classes
in the packages.”


                          Martin Fowler
Dependencies among packages and classes
Minimizing Coupling
•  When a class changes, all classes which
   depend upon it generally need to be changed
   or recompiled
•  More independent, more robust to changes




  Uncoupled     Loosely Coupled   Highly Coupled
Encouraging Cohesion
•  Group types (interface and classes) which fulfill a
   similar purpose, service or function
•  Internal package coupling, or relational cohesion can
   be quantified
   –  RC = NumberOfInternalRelations/ NumberOfTypes
   –  The bigger of RC, the higher cohesion
   –  Most useful for packages containing some implementation
      classes
Package diagram
•  Packages can be nested inside other packages
•  Packages can be used to add details to Use
   cases
•  Package diagrams are often used to show the
   contents of components, which are often
   packages in the Java sense
Packages inside Use Cases
Relations between packages
•    Package dependency
•    Package import
•    Package merge
•    Profile application
Package A imports package B

                 the importing
                 namespace A adds the
                 names of the members
                 of the other package B
                 to its own namespace
A         B
Package A merges with
         package B


               A                            B

It is similar to Generalization: the source package A adds the
characteristics of the target B to its own characteristics resulting in an
element that combines the characteristics of both.
This mechanism should be used when elements defined in different
packages have the same name and represent the same concept.
It is used to provide different definitions of a given concept for different
purposes, starting from a common base definition.
Example (from UML Superstructure, sect 7.1)
   Constructs                          Primitive types

                     <<imports>>




<<merge>>


            Kernel                 <<merge>>
Merge in the UML metamodel
Example
Profile application
Profile diagram
•  A profile diagram is
   a special package
   diagram including
   stereotypes and
   tagged values
•  Used to describe a
   domain or a
   reference
   architecture
Example: RUP as a profile




           A fragment of the descriptive stereotypes
Note on sub-systems
•  A subsystem is labeled with a
   <<subsystem>> stereotype
•  In UML1 a subsystem is both a
   classifier and a package: a unit of
   behavior
•  In UML2 a subsystem is a
   component
Package vs Sub-system
•  Packages are a general purpose mechanism
   for grouping elements
   –  E.g. java.util package is not a subsystem
•  Subsystems have clearly defined
   responsibilities, behavior, and interfaces that
   do work
Exercise
Describe using UML packages the structure and
dependencies of some Java libraries you know
Example: Java packages
 Packages include:
     –  java.applet
     –  java.awt
     –  java.io
     –  java.math

 import java.io.*;
 import java.awt.*;




package statement in Java to organise classes
into packages
Organizing Classes Into Packages

Package         Purpose                        Sample Class
java.lang       Language Support               Math
java.util       Utilities                      Random
java.io         Input and Output               PrintScreen
Java.awt        Abstract Windowing Toolkit     Color
Java.applet     Applets                        Applet
Java.net        Networking                     Socket
Java.sql        Database Access                ResultSet
Java.swing      Swing user interface           JButton
Org.omg.CORBA   Common Object Request Broker   IntHolder
                Architecture
Example: MOF 2.0 structure

                                  Core
                           <<import>>            PrimitiveTypes        <<import>>


                                  Basic          <<import>>            Constructs


                        <<merge>>                                            <<merge>>
                                                    <<import>>

                  <<merge>>                  <<merge>>
                                    EMOF                          CMOF       <<merge>>
             Common                         <<merge>>                                     CMOFReflection
                      <<merge>>      <<merge>>                          <<merge>>
<<import>>
                                                         Identifiers
                                                                                    CMOFExtension
                  Extension         Reflection


                                                                                                    36
Logical architecture
•  Logical architecture is the large-scale
   organization of the software classes into
   packages (or namespaces), subsystems,
   and layers.
•  Logical - because there is no decision
   about how these elements are deployed
   across different operating system
   processes or across physical computers in
   a network (deployment architecture)
Logical Architecture and Layers

•  Logical architecture: the large-scale
   organization of software classes into
   packages, subsystems, and layers.
  –  “Logical” because no decisions about
     deployment are implied
•  Layer: a very coarse-grained grouping of
   classes, packages, or subsystems that
   has cohesive responsibility for a major
   aspect of the system
Layered Architectures

•  Typical layers in an OO system:
  –  User Interface
  –  Application Logic and Domain Objects
  –  Technical Services
     •  Application-independent, reusable across systems.
•  Relationships between layers:
  –  Strict layered architecture: a layer only calls
     upon services of the layer directly below it.
  –  Relaxed layered architecture: a higher layer
     calls upon several lower layers.
Layers shown with package diagram
Components




The task of the software development team is to engineer the illusion of
simplicity [Booch]
Components and connectors

                                   connector
           component                                             component
                       interface                    interface


                 attributes                                             attributes
                                       attributes



                                   http over tcp-ip
           browser                                               webserver
Example:
                       Cookies enabled                get/post


                 Es. layout                                             Es. maxload
                                           Es. https
Components in sw architectures
•  A component is a binary unit of independent deployment
   –  well separated from other components
   –  can be deployed independently
•  A component is a unit of third-party composition
   –  is composable
   –  comes with clear specifications of what it requires and provides
   –  interacts with its environment through well-defined interfaces
•  A component has no persistent state
   –  temporary state set only through well-defined interfaces
   –  substituible by a functionally equivalent component


                                                 [Szyperski]
Components in UML2
•  A component is a modular unit with well-defined
   interfaces that is replaceable within its environment
•  Intuition: autonomous behavior unit within a system
    –  Has one or more provided or required interfaces
    –  A component is encapsulated: its internals are hidden
       and inaccessible; possibly cohesive
    –  Its dependencies are designed such that it can be
       treated as independently as possible
Example: a component in UML2
Component diagram
•  Component diagrams show the
   organization and dependencies among
   software components
•  Component types:
  •    Documents (eg. source code)
  •    Object code (binary file, static or dynamic libraries)
  •    Executable program
Component diagram
•  Captures the physical structure of the implementation
•  Shows dependencies




                                             Dependency




                                                      47
Component diagrams
•  Drawing a component is very similar to drawing a
   class. In fact, a component is a specialized
   version of the class concept
•  A component is drawn as a rectangle with optional
   compartments stacked vertically
•  The component stereotype icon is a rectangle with
   two smaller rectangles protruding on its left side
   (was the UML 1.4 notation for a component)
Component diagram: example
Component diagram: example
Component diagram: example
Example
Component elements
•  A component can have
  –  Interfaces
     An interface represents a declaration of a set of
     operations and obligations
  –  Usage dependencies
     A usage dependency is relationship which one element
     requires another element for its full implementation
  –  Ports
     A port represents an interaction point between a component
     and its environment
  –  Connectors
     •  A connector connects two components
     •  Can also connect the external contract of a component to its
        internal structure
Ports
•  Using ports in component diagrams allows for a service
   or behavior to be specified to its environment as well as a
   service or behavior that a component requires.
•  Ports may specify inputs and outputs as they can operate
   bi-directionally



The example details a
component with a port for
online services along with two
provided interfaces “order
entry” and “tracking” as well as
a required interface “payment”
Equivalent representations for ports




Using class stereotype   Using lollipop stereotype
Dependencies and ports




•  When showing a component's relationship with other
   components, the lollipop and socket notation must also
   include a dependency arrow
•  Note that the dependency arrow comes out of the consuming
   (requiring) socket and its arrow head connects with the
   provider's lollipop
Connectors
Typical connectors are:
  –  Assembly
  –  Delegate
  –  Associate
  –  Generalize
  –  Realize
Assembly connector
•  The assembly connector bridges a component’s
   required interface (Component1) with the
   provided interface of another component
   (Component2)
•  This allows a component to provide the services
   that another component requires
Delegate connector
•  The delegate connector defines the internal assembly of a
   component's external ports and interfaces
•  It links the external contract of a component (specified by its ports)
   to the internal realization of that behavior by the component's parts
•  It represents the forwarding of signals (operation requests and
   events): a signal that arrives at a port that has a delegation
   connector to a part or to another port will be passed on to that
   target for handling
Components in UML1
•  In UML 1.1, a component represented
   implementation items, such as files and
   executables
•  This conflicted with the more common use
   of the term component," which refers to
   things such as COM components
•  Over time and across successive releases
   of UML, the original meaning of
   components was mostly lost
Components in UML1
Components in UML2
Components in UML2
•  in UML 2, components are autonomous, encapsulated
   units within a system or subsystem that provide one or
   more interfaces
•  components are design units that represent things that
   will typically be implemented using replaceable"
   modules.
•  unlike UML 1.x, components are now strictly logical,
   design-time constructs
•  The idea is that we can easily reuse and/or substitute a
   different component implementation in our designs
   because a component encapsulates behavior and
   implements specified interfaces
Artifacts
•  The physical items called components in UML1.x are
   called "artifacts" in UML 2
•  An artifact is a physical unit, such as a file, executable,
   script, database, etc.
•  Only artifacts live on physical nodes; classes and
   components do not have "location"
•  However, an artifact may manifest components and other
   classifiers (i.e., classes)
•  A single component could be manifested by multiple
   artifacts, which could be on the same or different nodes,
   so a single component could indirectly be implemented
   on multiple nodes
Difference between package and
           component diagrams
•  Components (or subsystems, in UML2) are similar
   to package diagrams, as they define boundaries
   used to group elements into logical structures
•  The difference between package and component
   diagrams is that the latter offer a semantically
   richer grouping mechanism
•  In a component diagram all model elements are
   private, whereas a package diagram only displays
   public items
Remember
•  A Package Diagram is used to organize
   the model
•  A Component Diagram is used to organize
   the solution
•  Packages are a tool for configuration
   management and version control
•  Components are a tool for representing
   the solution logic
Exercise

Describe the runtime structure of components of a
system you know, and compare it with its package
structure
Deployment diagram
•  A deployment diagram models the run-time architecture
   of a system. It shows the configuration of the hardware
   elements (nodes) and shows how software components
   are mapped onto those nodes
•  A node is shown as a three-dimensional box shape
Deployment diagram
•  Captures the topology of a system




                                       A piece of
                                       hardware




                  (TCP/IP)
Deployment diagram with components
Deployment diagrams
Example

:myMac                 :UnixHost


       :Safari             :WebServer




:aPc                   :anotherHost


  :IExplorer               :Database
Example
Refined view of the WebServer component



                   WebServer
                                           GET
                                     URI
                  HttpRequest
                                           POST
                                 DBQuery
                    File
                                DBResult
Exercise

Describe the deployment structure of a system you
know
Composite structure
•  Shows the internal structure of a
   structured classifier or collaboration
Composite structure
•  Shows the internal structure of a
   structured classifier or collaboration
Composite structure vs
       component diagrams
•  A component diagram shows the internal
   parts, connectors and ports that implement
   a component; when the component is
   instantiated, copies of its internal parts are
   also instantiated
•  A composite structure diagram shows the
   internal structure of a class or a
   collaboration
UML2: novel behavior diagrams
Interaction
  overview diagram
•  A variant of activity
   diagrams
•  The Interaction Overview
   diagram focuses on the flow
   of control of the interactions
•  Visualizes the cooperation
   among other interaction
   diagrams to illustrate a
   control flow serving some
   purpose
Interaction overview

Use an interaction
overview diagram to
deconstruct a
complex scenario that
would otherwise
require multiple if-
then-else paths to be
illustrated as a single
sequence diagram
Timing diagram
Structural
diagrams:
summary
Behavioral
diagrams:
 summary
Extensibility of UML
•  Stereotypes (keywords denoted by << >>
                                                     <<myStereotype>>
   “guillemets”) can be used to extend the basic        ColorTypes

   UML notational elements                            +Red
                                                      +Green
•  Stereotypes may be used to classify and            +Blue

   extend associations, inheritance relationships,
   classes, and components
•  Examples:
     –  Class stereotypes:
         <<boundary>> and <<exception>>
     –  Inheritance stereotypes:
         <<uses>> and <<extends>>
     –  Component stereotypes: <<subsystem>>
Stereotype
•  A stereotype denotes a variation on an
   existing modeling element with the same
   form but with a modified intent




                      www.jeckle.de/files/UML1_2/apndxa.pdf!
Notational stereotypes
Examples

                                    Servlet stereotype with
                                    attached custom icon
Stereotype Servlet
extends Component




 Actor is extended by
 stereotype Web Client with
 attached cutom icon               Device extended by Server
                                   stereotype with tag definitions
                                   and custom icon
Example: <<history>> stereotype [Fowler]
                                      employer
                                     <<history>>
               Person                              Company
                         *                  0..1




•  The model says that a Person may work for only a single Company
   at one time. Over time, however, a Person may work for several
   Companies. The stereotype captures the following situation:

                                      employer
               Person                              Company
                          *                   *


                               Employment

                             Period:dateRange
Common stereotypes
Stereotype           denotes
<<application>>      A front-end of a system
<<database>>         A database
<<document>>         A printed or digital document
<<executable>>       A component executable on a node
<<file>>             Data file
<<infrastructure>>   Technical component, eg. An audit logger
<<library>>          Object or function library
<<source code>>      Text file to be compiled, like .java or .cpp
<<table>>            Table within a database
<<web service>>      One or more web services
<<XML DTD>>          XML Document Type Definition
Color
     UML
A special set of
stereotypes
defines
Color UML

Green: things
Pink: Time
Yellow: roles
Blue: description
Object Constraint Language (OCL)
•  The OCL is a declarative language to write
   logical formulas which denote constraints
   to apply to UML models
•  OCL is a key component of the new OMG
   standard recommendation for transforming
   models: the QVT specification, a key
   component of MDA
Questions
•  What is a package?
•  What is a “merge” dependency?
•  What is a component?
•  What is the difference between package
   and component?
•  What is a composite structure?
•  What is a stereotype?
References on advanced UML
•  OMG, UML Superstructure 2.3, 2010
•  www.agilemodeling.com!
•  advanceduml.wordpress.com!
•  www.ibm.com/developerworks/rational/rationaledge/!
•    www.ibm.com/developerworks/rational/library/05/321_uml/!
Readings
•  Ambler, The Elements of UML2 Style, Cambridge UP, 2005
•  Cheesman and Daniels, UML Components. A Simple Process for
   Specifying Component-Based Software, Addison Wesley, 2000
•  Bell, UML Basic: The Component Diagram, 2004
  www.ibm.com/developerworks/rational/library/dec04/bell/!
•  Bock, UML2 Composition Model, JOT 3:10, 2004,
   www.jot.fm/issues/issue_2004_11/column5/!
•  Valiente, UML 2.0 Notation for Modeling Real Time Task Scheduling,
   JOT 5:4, 2005 www.jot.fm/issues/issue_2006_05/article2!
Tools for advanced UML
•    www.sei.cmu.edu/architecture/arche.html!
•    www-01.ibm.com/software/awdtools/swarchitect/websphere/!
•    www.sparxsystems.com.au/products/ea/index.html!
•    www.papyrusuml.org!
•    diaspec.bordeaux.inria.fr!
•    lci.cs.ubbcluj.ro/ocle/index.htm!
Questions?

Mais conteúdo relacionado

Mais procurados

Package Diagram
Package DiagramPackage Diagram
Package DiagramWASI ALI
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagramsbarney92
 
Java Thread Synchronization
Java Thread SynchronizationJava Thread Synchronization
Java Thread SynchronizationBenj Del Mundo
 
Object Oriented Design Concept
Object Oriented Design ConceptObject Oriented Design Concept
Object Oriented Design ConceptSharath g
 
VB.NET:An introduction to Namespaces in .NET framework
VB.NET:An introduction to  Namespaces in .NET frameworkVB.NET:An introduction to  Namespaces in .NET framework
VB.NET:An introduction to Namespaces in .NET frameworkRicha Handa
 
Object Oriented Analysis Design using UML
Object Oriented Analysis Design using UMLObject Oriented Analysis Design using UML
Object Oriented Analysis Design using UMLAjit Nayak
 
Unit 3(advanced state modeling & interaction meodelling)
Unit  3(advanced state modeling & interaction meodelling)Unit  3(advanced state modeling & interaction meodelling)
Unit 3(advanced state modeling & interaction meodelling)Manoj Reddy
 
11 deployment diagrams
11 deployment diagrams11 deployment diagrams
11 deployment diagramsBaskarkncet
 
Python: Modules and Packages
Python: Modules and PackagesPython: Modules and Packages
Python: Modules and PackagesDamian T. Gordon
 

Mais procurados (20)

Class diagrams
Class diagramsClass diagrams
Class diagrams
 
Uml
UmlUml
Uml
 
Packages in java
Packages in javaPackages in java
Packages in java
 
Package Diagram
Package DiagramPackage Diagram
Package Diagram
 
Types and roles
Types and rolesTypes and roles
Types and roles
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
 
Java Thread Synchronization
Java Thread SynchronizationJava Thread Synchronization
Java Thread Synchronization
 
Object Oriented Design Concept
Object Oriented Design ConceptObject Oriented Design Concept
Object Oriented Design Concept
 
Uml
UmlUml
Uml
 
Object oriented analysis and design unit- i
Object oriented analysis and design unit- iObject oriented analysis and design unit- i
Object oriented analysis and design unit- i
 
VB.NET:An introduction to Namespaces in .NET framework
VB.NET:An introduction to  Namespaces in .NET frameworkVB.NET:An introduction to  Namespaces in .NET framework
VB.NET:An introduction to Namespaces in .NET framework
 
Object Oriented Analysis Design using UML
Object Oriented Analysis Design using UMLObject Oriented Analysis Design using UML
Object Oriented Analysis Design using UML
 
Unit 3(advanced state modeling & interaction meodelling)
Unit  3(advanced state modeling & interaction meodelling)Unit  3(advanced state modeling & interaction meodelling)
Unit 3(advanced state modeling & interaction meodelling)
 
Uml class-diagram
Uml class-diagramUml class-diagram
Uml class-diagram
 
Design Patterns.ppt
Design Patterns.pptDesign Patterns.ppt
Design Patterns.ppt
 
11 deployment diagrams
11 deployment diagrams11 deployment diagrams
11 deployment diagrams
 
Python: Modules and Packages
Python: Modules and PackagesPython: Modules and Packages
Python: Modules and Packages
 
Presentation on uml
Presentation on umlPresentation on uml
Presentation on uml
 
CS8592-OOAD Lecture Notes Unit-3
CS8592-OOAD Lecture Notes Unit-3CS8592-OOAD Lecture Notes Unit-3
CS8592-OOAD Lecture Notes Unit-3
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 

Destaque

Visteme con 'Clean Architecture' que tengo prisas
Visteme con 'Clean Architecture' que tengo prisasVisteme con 'Clean Architecture' que tengo prisas
Visteme con 'Clean Architecture' que tengo prisasJosé María Pérez Ramos
 
Unit 2(advanced class modeling & state diagram)
Unit  2(advanced class modeling & state diagram)Unit  2(advanced class modeling & state diagram)
Unit 2(advanced class modeling & state diagram)Manoj Reddy
 
24 dssa and_product_lines
24 dssa and_product_lines24 dssa and_product_lines
24 dssa and_product_linesMajong DevJfu
 
20 nfp design_techniques
20 nfp design_techniques20 nfp design_techniques
20 nfp design_techniquesMajong DevJfu
 
21 security and_trust
21 security and_trust21 security and_trust
21 security and_trustMajong DevJfu
 
22 deployment and_mobility
22 deployment and_mobility22 deployment and_mobility
22 deployment and_mobilityMajong DevJfu
 
19 designing for_nf_ps
19 designing for_nf_ps19 designing for_nf_ps
19 designing for_nf_psMajong DevJfu
 
25 architectural adaptation
25 architectural adaptation25 architectural adaptation
25 architectural adaptationMajong DevJfu
 
2 - Architetture Software - Software architecture
2 - Architetture Software - Software architecture2 - Architetture Software - Software architecture
2 - Architetture Software - Software architectureMajong DevJfu
 
5 - Architetture Software - Metamodelling and the Model Driven Architecture
5 - Architetture Software - Metamodelling and the Model Driven Architecture5 - Architetture Software - Metamodelling and the Model Driven Architecture
5 - Architetture Software - Metamodelling and the Model Driven ArchitectureMajong DevJfu
 
4 - Architetture Software - Architecture Portfolio
4 - Architetture Software - Architecture Portfolio4 - Architetture Software - Architecture Portfolio
4 - Architetture Software - Architecture PortfolioMajong DevJfu
 

Destaque (20)

26 standards
26 standards26 standards
26 standards
 
Visteme con 'Clean Architecture' que tengo prisas
Visteme con 'Clean Architecture' que tengo prisasVisteme con 'Clean Architecture' que tengo prisas
Visteme con 'Clean Architecture' que tengo prisas
 
Unit 2(advanced class modeling & state diagram)
Unit  2(advanced class modeling & state diagram)Unit  2(advanced class modeling & state diagram)
Unit 2(advanced class modeling & state diagram)
 
2
22
2
 
24 dssa and_product_lines
24 dssa and_product_lines24 dssa and_product_lines
24 dssa and_product_lines
 
20 nfp design_techniques
20 nfp design_techniques20 nfp design_techniques
20 nfp design_techniques
 
21 security and_trust
21 security and_trust21 security and_trust
21 security and_trust
 
6
66
6
 
Tmd template-sand
Tmd template-sandTmd template-sand
Tmd template-sand
 
22 deployment and_mobility
22 deployment and_mobility22 deployment and_mobility
22 deployment and_mobility
 
1
11
1
 
19 designing for_nf_ps
19 designing for_nf_ps19 designing for_nf_ps
19 designing for_nf_ps
 
5
55
5
 
25 architectural adaptation
25 architectural adaptation25 architectural adaptation
25 architectural adaptation
 
Uml3
Uml3Uml3
Uml3
 
2 - Architetture Software - Software architecture
2 - Architetture Software - Software architecture2 - Architetture Software - Software architecture
2 - Architetture Software - Software architecture
 
23 intro to_dsse
23 intro to_dsse23 intro to_dsse
23 intro to_dsse
 
5 - Architetture Software - Metamodelling and the Model Driven Architecture
5 - Architetture Software - Metamodelling and the Model Driven Architecture5 - Architetture Software - Metamodelling and the Model Driven Architecture
5 - Architetture Software - Metamodelling and the Model Driven Architecture
 
4 - Architetture Software - Architecture Portfolio
4 - Architetture Software - Architecture Portfolio4 - Architetture Software - Architecture Portfolio
4 - Architetture Software - Architecture Portfolio
 
4 (uml basic)
4 (uml basic)4 (uml basic)
4 (uml basic)
 

Semelhante a Uml2

Bab 11 component diagram 2010
Bab 11 component diagram 2010Bab 11 component diagram 2010
Bab 11 component diagram 2010donasiilmu
 
Eclipse plug in development
Eclipse plug in developmentEclipse plug in development
Eclipse plug in developmentMartin Toshev
 
Moeed SDA LAB2.pptx
Moeed SDA LAB2.pptxMoeed SDA LAB2.pptx
Moeed SDA LAB2.pptxUnknownCraft
 
4+1view architecture
4+1view architecture4+1view architecture
4+1view architecturedrewz lin
 
4+1view architecture
4+1view architecture4+1view architecture
4+1view architectureTot Bob
 
(ATS3-DEV08) Team Development with Accelrys Enterprise Platform
(ATS3-DEV08) Team Development with Accelrys Enterprise Platform(ATS3-DEV08) Team Development with Accelrys Enterprise Platform
(ATS3-DEV08) Team Development with Accelrys Enterprise PlatformBIOVIA
 
.net Based Component Technologies
.net Based Component Technologies.net Based Component Technologies
.net Based Component Technologiesprakashk453625
 
Software design, software engineering
Software design, software engineeringSoftware design, software engineering
Software design, software engineeringRupesh Vaishnav
 
Anish Karmakar S C A
Anish  Karmakar    S C AAnish  Karmakar    S C A
Anish Karmakar S C ASOA Symposium
 
Middle ware Technologies
Middle ware TechnologiesMiddle ware Technologies
Middle ware Technologiesprakashk453625
 
S/W Design and Modularity using Maven
S/W Design and Modularity using MavenS/W Design and Modularity using Maven
S/W Design and Modularity using MavenScheidt & Bachmann
 
Middleware Technologies
Middleware Technologies Middleware Technologies
Middleware Technologies prakashk453625
 
Spring Architecture | Advanced Java
Spring Architecture | Advanced JavaSpring Architecture | Advanced Java
Spring Architecture | Advanced JavaVISHAL DONGA
 
Software Design Patterns. Part I :: Structural Patterns
Software Design Patterns. Part I :: Structural PatternsSoftware Design Patterns. Part I :: Structural Patterns
Software Design Patterns. Part I :: Structural PatternsSergey Aganezov
 
Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural ModelingAMITJain879
 
OSGi Service Platform Release 4 Overview - BJ Hargrave, IBM & Peter Kriens, a...
OSGi Service Platform Release 4 Overview - BJ Hargrave, IBM & Peter Kriens, a...OSGi Service Platform Release 4 Overview - BJ Hargrave, IBM & Peter Kriens, a...
OSGi Service Platform Release 4 Overview - BJ Hargrave, IBM & Peter Kriens, a...mfrancis
 
Agile collaborative practices
Agile collaborative practicesAgile collaborative practices
Agile collaborative practicesSreejith Madhavan
 

Semelhante a Uml2 (20)

Bab 11 component diagram 2010
Bab 11 component diagram 2010Bab 11 component diagram 2010
Bab 11 component diagram 2010
 
Eclipse plug in development
Eclipse plug in developmentEclipse plug in development
Eclipse plug in development
 
Moeed SDA LAB2.pptx
Moeed SDA LAB2.pptxMoeed SDA LAB2.pptx
Moeed SDA LAB2.pptx
 
4+1view architecture
4+1view architecture4+1view architecture
4+1view architecture
 
4+1view architecture
4+1view architecture4+1view architecture
4+1view architecture
 
(ATS3-DEV08) Team Development with Accelrys Enterprise Platform
(ATS3-DEV08) Team Development with Accelrys Enterprise Platform(ATS3-DEV08) Team Development with Accelrys Enterprise Platform
(ATS3-DEV08) Team Development with Accelrys Enterprise Platform
 
.net Based Component Technologies
.net Based Component Technologies.net Based Component Technologies
.net Based Component Technologies
 
Component level design
Component   level designComponent   level design
Component level design
 
Software design, software engineering
Software design, software engineeringSoftware design, software engineering
Software design, software engineering
 
Anish Karmakar S C A
Anish  Karmakar    S C AAnish  Karmakar    S C A
Anish Karmakar S C A
 
Middle ware Technologies
Middle ware TechnologiesMiddle ware Technologies
Middle ware Technologies
 
S/W Design and Modularity using Maven
S/W Design and Modularity using MavenS/W Design and Modularity using Maven
S/W Design and Modularity using Maven
 
Chapter 9
Chapter 9Chapter 9
Chapter 9
 
Middleware Technologies
Middleware Technologies Middleware Technologies
Middleware Technologies
 
Spring Architecture | Advanced Java
Spring Architecture | Advanced JavaSpring Architecture | Advanced Java
Spring Architecture | Advanced Java
 
Introduction to Spring & Spring BootFramework
Introduction to Spring  & Spring BootFrameworkIntroduction to Spring  & Spring BootFramework
Introduction to Spring & Spring BootFramework
 
Software Design Patterns. Part I :: Structural Patterns
Software Design Patterns. Part I :: Structural PatternsSoftware Design Patterns. Part I :: Structural Patterns
Software Design Patterns. Part I :: Structural Patterns
 
Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural Modeling
 
OSGi Service Platform Release 4 Overview - BJ Hargrave, IBM & Peter Kriens, a...
OSGi Service Platform Release 4 Overview - BJ Hargrave, IBM & Peter Kriens, a...OSGi Service Platform Release 4 Overview - BJ Hargrave, IBM & Peter Kriens, a...
OSGi Service Platform Release 4 Overview - BJ Hargrave, IBM & Peter Kriens, a...
 
Agile collaborative practices
Agile collaborative practicesAgile collaborative practices
Agile collaborative practices
 

Mais de Majong DevJfu

9 - Architetture Software - SOA Cloud
9 - Architetture Software - SOA Cloud9 - Architetture Software - SOA Cloud
9 - Architetture Software - SOA CloudMajong DevJfu
 
8 - Architetture Software - Architecture centric processes
8 - Architetture Software - Architecture centric processes8 - Architetture Software - Architecture centric processes
8 - Architetture Software - Architecture centric processesMajong DevJfu
 
7 - Architetture Software - Software product line
7 - Architetture Software - Software product line7 - Architetture Software - Software product line
7 - Architetture Software - Software product lineMajong DevJfu
 
6 - Architetture Software - Model transformation
6 - Architetture Software - Model transformation6 - Architetture Software - Model transformation
6 - Architetture Software - Model transformationMajong DevJfu
 
3 - Architetture Software - Architectural styles
3 - Architetture Software - Architectural styles3 - Architetture Software - Architectural styles
3 - Architetture Software - Architectural stylesMajong DevJfu
 
1 - Architetture Software - Software as a product
1 - Architetture Software - Software as a product1 - Architetture Software - Software as a product
1 - Architetture Software - Software as a productMajong DevJfu
 
10 - Architetture Software - More architectural styles
10 - Architetture Software - More architectural styles10 - Architetture Software - More architectural styles
10 - Architetture Software - More architectural stylesMajong DevJfu
 
18 applied architectures_part_2
18 applied architectures_part_218 applied architectures_part_2
18 applied architectures_part_2Majong DevJfu
 
17 applied architectures
17 applied architectures17 applied architectures
17 applied architecturesMajong DevJfu
 
16 implementation techniques
16 implementation techniques16 implementation techniques
16 implementation techniquesMajong DevJfu
 
15 implementing architectures
15 implementing architectures15 implementing architectures
15 implementing architecturesMajong DevJfu
 

Mais de Majong DevJfu (12)

9 - Architetture Software - SOA Cloud
9 - Architetture Software - SOA Cloud9 - Architetture Software - SOA Cloud
9 - Architetture Software - SOA Cloud
 
8 - Architetture Software - Architecture centric processes
8 - Architetture Software - Architecture centric processes8 - Architetture Software - Architecture centric processes
8 - Architetture Software - Architecture centric processes
 
7 - Architetture Software - Software product line
7 - Architetture Software - Software product line7 - Architetture Software - Software product line
7 - Architetture Software - Software product line
 
6 - Architetture Software - Model transformation
6 - Architetture Software - Model transformation6 - Architetture Software - Model transformation
6 - Architetture Software - Model transformation
 
3 - Architetture Software - Architectural styles
3 - Architetture Software - Architectural styles3 - Architetture Software - Architectural styles
3 - Architetture Software - Architectural styles
 
1 - Architetture Software - Software as a product
1 - Architetture Software - Software as a product1 - Architetture Software - Software as a product
1 - Architetture Software - Software as a product
 
10 - Architetture Software - More architectural styles
10 - Architetture Software - More architectural styles10 - Architetture Software - More architectural styles
10 - Architetture Software - More architectural styles
 
3
33
3
 
18 applied architectures_part_2
18 applied architectures_part_218 applied architectures_part_2
18 applied architectures_part_2
 
17 applied architectures
17 applied architectures17 applied architectures
17 applied architectures
 
16 implementation techniques
16 implementation techniques16 implementation techniques
16 implementation techniques
 
15 implementing architectures
15 implementing architectures15 implementing architectures
15 implementing architectures
 

Último

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Uml2

  • 1. UML advanced Paolo Ciancarini
  • 2. Agenda •  Advanced diagrams in UML –  Packages –  Components –  Deployment –  Other diagrams •  Extension rules of UML •  Stereotypes •  Profiles
  • 3. UML 2.0 Superstructure Diagram Interchange Defines user-level constructs to specify structure and behavior of systems (e.g., class diagrams, sequence diagrams) Infrastructure OCL Defines basic constructs to specify UML and to customize it for specific domains (e.g., real-time) 3
  • 4. UML2: advanced structure diagrams Profile diagram
  • 5. New syntax for diagrams
  • 6. Modularity •  A complex software system can only be designed starting from simpler subsystems, or modules, or components •  Module: unit of compilation; eg. a Java package •  Component: (functional, stateless) unit at runtime; eg. a new peer connected to a p2p system
  • 7. Discuss •  The programming languages you know which modularity mechanisms do they offer?
  • 8. Grouping Things: Packages •  Useful to organize elements into groups •  Purely conceptual; only exists at development time •  Can be nested •  Variations of packages are: frameworks, models, & subsystems University Administration Course Manager Student Admission Course Manager -Student +Department
  • 9. Package •  Module; collects logically coherent elements •  Defines a namespace where each element has a unique name Java graphics
  • 10. Package containing classes VehicleParts 1..2 Engine Car 3..* Wheel The classes Engine and Wheel are included in the package VehicleParts
  • 11. Package notations Types Types Shape Point Types Shape Point
  • 13. A package diagram User Interface Business logic AWT Database
  • 15. Dependencies “A dependency exists between two elements if changes to the definition of one element may cause changes to the other.” “A dependency between two packages exists if any dependency exists between any two classes in the packages.” Martin Fowler
  • 17. Minimizing Coupling •  When a class changes, all classes which depend upon it generally need to be changed or recompiled •  More independent, more robust to changes Uncoupled Loosely Coupled Highly Coupled
  • 18. Encouraging Cohesion •  Group types (interface and classes) which fulfill a similar purpose, service or function •  Internal package coupling, or relational cohesion can be quantified –  RC = NumberOfInternalRelations/ NumberOfTypes –  The bigger of RC, the higher cohesion –  Most useful for packages containing some implementation classes
  • 19. Package diagram •  Packages can be nested inside other packages •  Packages can be used to add details to Use cases •  Package diagrams are often used to show the contents of components, which are often packages in the Java sense
  • 21. Relations between packages •  Package dependency •  Package import •  Package merge •  Profile application
  • 22. Package A imports package B the importing namespace A adds the names of the members of the other package B to its own namespace A B
  • 23. Package A merges with package B A B It is similar to Generalization: the source package A adds the characteristics of the target B to its own characteristics resulting in an element that combines the characteristics of both. This mechanism should be used when elements defined in different packages have the same name and represent the same concept. It is used to provide different definitions of a given concept for different purposes, starting from a common base definition.
  • 24. Example (from UML Superstructure, sect 7.1) Constructs Primitive types <<imports>> <<merge>> Kernel <<merge>>
  • 25. Merge in the UML metamodel
  • 26.
  • 29. Profile diagram •  A profile diagram is a special package diagram including stereotypes and tagged values •  Used to describe a domain or a reference architecture
  • 30. Example: RUP as a profile A fragment of the descriptive stereotypes
  • 31. Note on sub-systems •  A subsystem is labeled with a <<subsystem>> stereotype •  In UML1 a subsystem is both a classifier and a package: a unit of behavior •  In UML2 a subsystem is a component
  • 32. Package vs Sub-system •  Packages are a general purpose mechanism for grouping elements –  E.g. java.util package is not a subsystem •  Subsystems have clearly defined responsibilities, behavior, and interfaces that do work
  • 33. Exercise Describe using UML packages the structure and dependencies of some Java libraries you know
  • 34. Example: Java packages Packages include: –  java.applet –  java.awt –  java.io –  java.math import java.io.*; import java.awt.*; package statement in Java to organise classes into packages
  • 35. Organizing Classes Into Packages Package Purpose Sample Class java.lang Language Support Math java.util Utilities Random java.io Input and Output PrintScreen Java.awt Abstract Windowing Toolkit Color Java.applet Applets Applet Java.net Networking Socket Java.sql Database Access ResultSet Java.swing Swing user interface JButton Org.omg.CORBA Common Object Request Broker IntHolder Architecture
  • 36. Example: MOF 2.0 structure Core <<import>> PrimitiveTypes <<import>> Basic <<import>> Constructs <<merge>> <<merge>> <<import>> <<merge>> <<merge>> EMOF CMOF <<merge>> Common <<merge>> CMOFReflection <<merge>> <<merge>> <<merge>> <<import>> Identifiers CMOFExtension Extension Reflection 36
  • 37. Logical architecture •  Logical architecture is the large-scale organization of the software classes into packages (or namespaces), subsystems, and layers. •  Logical - because there is no decision about how these elements are deployed across different operating system processes or across physical computers in a network (deployment architecture)
  • 38. Logical Architecture and Layers •  Logical architecture: the large-scale organization of software classes into packages, subsystems, and layers. –  “Logical” because no decisions about deployment are implied •  Layer: a very coarse-grained grouping of classes, packages, or subsystems that has cohesive responsibility for a major aspect of the system
  • 39. Layered Architectures •  Typical layers in an OO system: –  User Interface –  Application Logic and Domain Objects –  Technical Services •  Application-independent, reusable across systems. •  Relationships between layers: –  Strict layered architecture: a layer only calls upon services of the layer directly below it. –  Relaxed layered architecture: a higher layer calls upon several lower layers.
  • 40. Layers shown with package diagram
  • 41. Components The task of the software development team is to engineer the illusion of simplicity [Booch]
  • 42. Components and connectors connector component component interface interface attributes attributes attributes http over tcp-ip browser webserver Example: Cookies enabled get/post Es. layout Es. maxload Es. https
  • 43. Components in sw architectures •  A component is a binary unit of independent deployment –  well separated from other components –  can be deployed independently •  A component is a unit of third-party composition –  is composable –  comes with clear specifications of what it requires and provides –  interacts with its environment through well-defined interfaces •  A component has no persistent state –  temporary state set only through well-defined interfaces –  substituible by a functionally equivalent component [Szyperski]
  • 44. Components in UML2 •  A component is a modular unit with well-defined interfaces that is replaceable within its environment •  Intuition: autonomous behavior unit within a system –  Has one or more provided or required interfaces –  A component is encapsulated: its internals are hidden and inaccessible; possibly cohesive –  Its dependencies are designed such that it can be treated as independently as possible
  • 46. Component diagram •  Component diagrams show the organization and dependencies among software components •  Component types: •  Documents (eg. source code) •  Object code (binary file, static or dynamic libraries) •  Executable program
  • 47. Component diagram •  Captures the physical structure of the implementation •  Shows dependencies Dependency 47
  • 48. Component diagrams •  Drawing a component is very similar to drawing a class. In fact, a component is a specialized version of the class concept •  A component is drawn as a rectangle with optional compartments stacked vertically •  The component stereotype icon is a rectangle with two smaller rectangles protruding on its left side (was the UML 1.4 notation for a component)
  • 53. Component elements •  A component can have –  Interfaces An interface represents a declaration of a set of operations and obligations –  Usage dependencies A usage dependency is relationship which one element requires another element for its full implementation –  Ports A port represents an interaction point between a component and its environment –  Connectors •  A connector connects two components •  Can also connect the external contract of a component to its internal structure
  • 54. Ports •  Using ports in component diagrams allows for a service or behavior to be specified to its environment as well as a service or behavior that a component requires. •  Ports may specify inputs and outputs as they can operate bi-directionally The example details a component with a port for online services along with two provided interfaces “order entry” and “tracking” as well as a required interface “payment”
  • 55. Equivalent representations for ports Using class stereotype Using lollipop stereotype
  • 56. Dependencies and ports •  When showing a component's relationship with other components, the lollipop and socket notation must also include a dependency arrow •  Note that the dependency arrow comes out of the consuming (requiring) socket and its arrow head connects with the provider's lollipop
  • 57. Connectors Typical connectors are: –  Assembly –  Delegate –  Associate –  Generalize –  Realize
  • 58. Assembly connector •  The assembly connector bridges a component’s required interface (Component1) with the provided interface of another component (Component2) •  This allows a component to provide the services that another component requires
  • 59. Delegate connector •  The delegate connector defines the internal assembly of a component's external ports and interfaces •  It links the external contract of a component (specified by its ports) to the internal realization of that behavior by the component's parts •  It represents the forwarding of signals (operation requests and events): a signal that arrives at a port that has a delegation connector to a part or to another port will be passed on to that target for handling
  • 60. Components in UML1 •  In UML 1.1, a component represented implementation items, such as files and executables •  This conflicted with the more common use of the term component," which refers to things such as COM components •  Over time and across successive releases of UML, the original meaning of components was mostly lost
  • 63. Components in UML2 •  in UML 2, components are autonomous, encapsulated units within a system or subsystem that provide one or more interfaces •  components are design units that represent things that will typically be implemented using replaceable" modules. •  unlike UML 1.x, components are now strictly logical, design-time constructs •  The idea is that we can easily reuse and/or substitute a different component implementation in our designs because a component encapsulates behavior and implements specified interfaces
  • 64. Artifacts •  The physical items called components in UML1.x are called "artifacts" in UML 2 •  An artifact is a physical unit, such as a file, executable, script, database, etc. •  Only artifacts live on physical nodes; classes and components do not have "location" •  However, an artifact may manifest components and other classifiers (i.e., classes) •  A single component could be manifested by multiple artifacts, which could be on the same or different nodes, so a single component could indirectly be implemented on multiple nodes
  • 65. Difference between package and component diagrams •  Components (or subsystems, in UML2) are similar to package diagrams, as they define boundaries used to group elements into logical structures •  The difference between package and component diagrams is that the latter offer a semantically richer grouping mechanism •  In a component diagram all model elements are private, whereas a package diagram only displays public items
  • 66. Remember •  A Package Diagram is used to organize the model •  A Component Diagram is used to organize the solution •  Packages are a tool for configuration management and version control •  Components are a tool for representing the solution logic
  • 67. Exercise Describe the runtime structure of components of a system you know, and compare it with its package structure
  • 68. Deployment diagram •  A deployment diagram models the run-time architecture of a system. It shows the configuration of the hardware elements (nodes) and shows how software components are mapped onto those nodes •  A node is shown as a three-dimensional box shape
  • 69. Deployment diagram •  Captures the topology of a system A piece of hardware (TCP/IP)
  • 72. Example :myMac :UnixHost :Safari :WebServer :aPc :anotherHost :IExplorer :Database
  • 73. Example Refined view of the WebServer component WebServer GET URI HttpRequest POST DBQuery File DBResult
  • 74. Exercise Describe the deployment structure of a system you know
  • 75. Composite structure •  Shows the internal structure of a structured classifier or collaboration
  • 76. Composite structure •  Shows the internal structure of a structured classifier or collaboration
  • 77. Composite structure vs component diagrams •  A component diagram shows the internal parts, connectors and ports that implement a component; when the component is instantiated, copies of its internal parts are also instantiated •  A composite structure diagram shows the internal structure of a class or a collaboration
  • 79. Interaction overview diagram •  A variant of activity diagrams •  The Interaction Overview diagram focuses on the flow of control of the interactions •  Visualizes the cooperation among other interaction diagrams to illustrate a control flow serving some purpose
  • 80. Interaction overview Use an interaction overview diagram to deconstruct a complex scenario that would otherwise require multiple if- then-else paths to be illustrated as a single sequence diagram
  • 84. Extensibility of UML •  Stereotypes (keywords denoted by << >> <<myStereotype>> “guillemets”) can be used to extend the basic ColorTypes UML notational elements +Red +Green •  Stereotypes may be used to classify and +Blue extend associations, inheritance relationships, classes, and components •  Examples: –  Class stereotypes: <<boundary>> and <<exception>> –  Inheritance stereotypes: <<uses>> and <<extends>> –  Component stereotypes: <<subsystem>>
  • 85. Stereotype •  A stereotype denotes a variation on an existing modeling element with the same form but with a modified intent www.jeckle.de/files/UML1_2/apndxa.pdf!
  • 87. Examples Servlet stereotype with attached custom icon Stereotype Servlet extends Component Actor is extended by stereotype Web Client with attached cutom icon Device extended by Server stereotype with tag definitions and custom icon
  • 88. Example: <<history>> stereotype [Fowler] employer <<history>> Person Company * 0..1 •  The model says that a Person may work for only a single Company at one time. Over time, however, a Person may work for several Companies. The stereotype captures the following situation: employer Person Company * * Employment Period:dateRange
  • 89. Common stereotypes Stereotype denotes <<application>> A front-end of a system <<database>> A database <<document>> A printed or digital document <<executable>> A component executable on a node <<file>> Data file <<infrastructure>> Technical component, eg. An audit logger <<library>> Object or function library <<source code>> Text file to be compiled, like .java or .cpp <<table>> Table within a database <<web service>> One or more web services <<XML DTD>> XML Document Type Definition
  • 90. Color UML A special set of stereotypes defines Color UML Green: things Pink: Time Yellow: roles Blue: description
  • 91. Object Constraint Language (OCL) •  The OCL is a declarative language to write logical formulas which denote constraints to apply to UML models •  OCL is a key component of the new OMG standard recommendation for transforming models: the QVT specification, a key component of MDA
  • 92. Questions •  What is a package? •  What is a “merge” dependency? •  What is a component? •  What is the difference between package and component? •  What is a composite structure? •  What is a stereotype?
  • 93. References on advanced UML •  OMG, UML Superstructure 2.3, 2010 •  www.agilemodeling.com! •  advanceduml.wordpress.com! •  www.ibm.com/developerworks/rational/rationaledge/! •  www.ibm.com/developerworks/rational/library/05/321_uml/!
  • 94. Readings •  Ambler, The Elements of UML2 Style, Cambridge UP, 2005 •  Cheesman and Daniels, UML Components. A Simple Process for Specifying Component-Based Software, Addison Wesley, 2000 •  Bell, UML Basic: The Component Diagram, 2004 www.ibm.com/developerworks/rational/library/dec04/bell/! •  Bock, UML2 Composition Model, JOT 3:10, 2004, www.jot.fm/issues/issue_2004_11/column5/! •  Valiente, UML 2.0 Notation for Modeling Real Time Task Scheduling, JOT 5:4, 2005 www.jot.fm/issues/issue_2006_05/article2!
  • 95. Tools for advanced UML •  www.sei.cmu.edu/architecture/arche.html! •  www-01.ibm.com/software/awdtools/swarchitect/websphere/! •  www.sparxsystems.com.au/products/ea/index.html! •  www.papyrusuml.org! •  diaspec.bordeaux.inria.fr! •  lci.cs.ubbcluj.ro/ocle/index.htm!