Beruflich Dokumente
Kultur Dokumente
Fundamentals
Ing. Gerardo Padilla Zárate
gpadilla@cimat.mx
Course Outline
1. Course presentation
2. OO Concepts Review
3. Introduction to UML
4. UML Views
5. Tool Fundamental
15
Course outline (cont..)
6. Structural diagrams
7. Behavior Diagram
8. Model Management Diagrams
9. UML during development process
10. UML and 4GL
11. Review and Critique
Goal:
10
Introduction to Object
Orientation Topics
n Basic Principles of Object Orientation
n Basic Concepts of Object Orientation
Basic Principles of Object
Orientation
Object Orientation
Encapsulation
Abstraction
Modularity
Hierarchy
Abstraction [omg]
n The essential characteristics of an entity
that distinguish it from all other kinds of
entities.
n An abstraction defines a boundary relative
to the perspective of the viewer.
What is Abstraction?
Salesperson
Customer
Product
What is Encapsulation?
n Hide implementation from clients
¨Clients depend on interface
Encapsulation
n Exposing only the details that are relevant: the public
interface.
n What? not How?
n Hiding the “gears and levers”.
n Exposing only the client’s view of the object’s
responsibilities.
n Protects the object from outside interference.
n Protects other objects from relying on details that are
likely to change.
n Reduces interdependencies in the code.
n “Good fences make good neighbors”.
What is Modularity?
n The breaking up of something complex
into manageable pieces
Order
Entry
Order
Fulfillment
Order Processing
System
Billing
What is Hierarchy?
Asset
Increasing
abstraction n Levels of abstraction
Algebra 110
Music History 200
Object [omg]
n An entity with a well-defined boundary and
identity that encapsulates state and
behavior. State is represented by
attributes and relationships, behavior is
represented by operations, methods, and
state machines.
n An object is an instance of a class.
What is a Class?
n An object is defined by a class English 101
Intro to OO 180
Geology 110
Algebra 110
Music History 200
Class [omg]
n A description of a set of objects that
share the same attributes, operations,
methods, relationships, and semantics.
n A class may use a set of interfaces to
specify collections of operations it provides
to its environment.
What is an Attribute?
Object
Class
register( )
generalization
Manufactor A Manufactor C
Manufactor A
Review: Introduction to Object
Orientation
n What are the four basic principles of object orientation?
Provide a brief description of each.
n What is an Object and what is a Class? What is the
difference between them?
n What is an Attribute?
n What is an Operation?
n What is generalization?
n What is polymorphism?
n Describe the strengths of object orientation.
UML Introduction
15
Why do we model?
n Provide structure for problem solving
n Experiment to explore multiple solutions
Tijuana “shantytown”:
http://www.macalester.edu/~jschatz/residential.html
The Vision
Fallingwater:
http://www.adelaide.net.au/~jpolias/FLW/Images/FallingWater.jpeg
Why do we model
graphically?
n Graphics reveal data.
¨ Edward Tufte
The Visual Display of Quantitative Information,
1983
n1 bitmap = 1 megaword.
¨ Anonymous visual modeler
Quick Tour
n The UML is a graphical language for
¨ specifying
¨ visualizing
¨ constructing
¨ documenting
the artifacts of software systems
UML Goals
The primary design goals of the UML are as follows:
n Provide users with a ready-to-use, expressive visual
modeling language to develop and exchange meaningful
models.
n Support specifications that are independent of particular
programming languages and development processes.
n Provide a formal basis for understanding the modeling
language.
n Support higher-level development concepts such as
components, collaborations, frameworks and patterns.
n Integrate best practices.
composition <<document>>
(whole-part) UML 2.0
relationship
OMG
UML Evolution <<document>>
UML 2.0
2002 Superstructure
(planned)
<<document>>
<<document>>
2001 Q4 UML 2.0
UML 2.0 OCL
(planned) Infrastructure
<<document>>
Q1 2001 UML 1.4 dependency
relationship
<<document>>
1999 UML 1.3
<<document>>
1997 UML 1.1
(adopted by OMG) From [Kobryn 01a].
OMG UML Contributors
Aonix Microsoft
Colorado State University ObjecTime
Computer Associates Oracle
Concept Five Ptech
Data Access OAO Technology Solutions
EDS Rational Software
Enea Data Reich
Hewlett-Packard SAP
IBM Softeam
I-Logix Sterling Software
InLine Software Sun
Intellicorp Taskon
Kabira Technologies Telelogic
Klasse Objecten Unisys
Lockheed Martin …
OMG UML 1.4 Specification
n UML Summary
n UML Semantics
n UML Notation Guide
n UML Example Profiles
¨ Software Development Processes
¨ Business Modeling
n Model Interchange
¨ Model Interchange Using XMI
¨ Model Interchange Using CORBA IDL
n Object Constraint Language
OMG
Review: UML Introduction
n Why do we model?.
n What are the goals of UML?
n What are the main uses of UML?
n Describe the UML evolution.
n Describe the major parts of UML Specification.
UML Views
10
Basic UML concepts
n Notes
n Artifact
n Classifier
n Stereotypes
Notes
n A note can be added to any UML element
n It is a ‘dog eared’ rectangle
n The note may be anchored to an element
with a dashed line There can be up to one
MaintainScheduleForm per
MaintainScheduleForm user session.
Artifact
n A physical piece of information that is
used or produced by a software
development process.
n Examples of Artifacts include models,
documents, source files, scripts, and
binary executable files.
Classifier
n A mechanism that describes behavioral
and structural features. Classifiers include
interfaces, classes, datatypes, and
components.
Diagram: Classifier View
Element
C <<covalent>>
Carbon Hydrogen
C H
<<covalent>> C
Diagram: Instance View
:Hydrogen :Hydrogen
:Hydrogen :Hydrogen
Unifying Concepts
n classifier-instance dichotomy
¨ e.g., an object is an instance of a class OR
a class is the classifier of an object
n specification-realization dichotomy
¨ e.g., an interface is a specification of a class OR
a class is a realization of an interface
n analysis-time vs. design-time vs. run-time
¨ modeling phases (“process creep”)
¨ usage guidelines suggested, not enforced
Stereotypes
n Define a new model element in terms of another
model element
n May be applied to all modeling elements
OMG Diagram categories
n Structural Diagrams include the Class
Diagram, Object Diagram, Component Diagram,
and Deployment Diagram.
n Behavior Diagrams include the Use Case
Diagram (used by some methodologies during
requirements gathering); Sequence Diagram,
Activity Diagram, Collaboration Diagram, and
Statechart Diagram.
n Model Management Diagrams include
Packages, Subsystems, and Models
Modeling a house
Multiple views
Views from RUP
Logical View Implementation View
Conceptual Physical
Excercise 1
Ejercicio 1
n Enliste por lo menos 20 artefactos usados
en el proceso de desarrollo.
¨ Incluya
artefactos de todos los tipos
(documentación, archivos binarios, etc.)
n Tiempo: 10 minutos
Break
n 10 minutos
Structural Diagrams
Conceptual model of UML
Component Deployment
Classifier Instance
Review: Structural Diagrams:
Component and Deployment Diagrams
n What is a node?
n What is a deployment diagram?
n What is a component ?
n What is a componet diagram?
n What is the relation between Component and Node?
Excercise 2
Ejercicio 2
n Con base a uno de sus artefactos
(similares a elementos de ejecución)
elabore un ejemplo de un diagrama de
componentes y uno de despliege.