Roles of Component Diagram, Deployment Diagram and Package

advertisement
Group 1 Question To Be Answered:
Discuss the roles of Component Diagram, Deployment Diagram and Package Diagram in UML. Identify an
example from the web that shows how component and deployment diagrams are used.
Component Diagram:
The Component Diagram helps to model the physical aspect of an Object-Oriented software system. It
illustrates the architectures of the software components and the dependencies between them. Those software
components include run-time components, executable components and the source code components.
A component represents a modular part of a system that encapsulates its contents and whose manifestation is
replaceable within its environment.
A component defines its behavior in terms of provided and required interfaces. As such, a component serves as
a type whose conformance is defined by these provided and required interfaces (encompassing both their static
as well as dynamic semantics). One component may therefore be substituted by another only if the two are type
conformant. Larger pieces of systems functionality may be assembled by reusing components as parts in an
encompassing component or assembly of components, and wiring together their required and provided
interfaces.
A component is modeled throughout the development life cycle and successively refined into deployment and
run-time. A component may be manifest by one or more artifacts, and in turn, that artifact may be deployed to
its execution environment. A deployment specification may define values that parameterize the components
execution.
Example of Component Diagram:
A component is a code module. Component diagrams are physical analogs of class diagram.
Page 1 of 4
Deployment Diagram:
Deployment diagrams describe the physical architecture of the hardware and software in the system (Bentley,
2007). They show the hardware for your system, the software that is installed on that hardware, and the
middleware used to connect the disparate machines to one another. You create a deployment model to (Ambler,
2005):
 Explore the issues involved with installing your system into production.
 Explore the dependencies that your system has with other systems that are currently in, or planned for,
your production environment.
 Depict a major deployment configuration of a business application.
 Design the hardware and software configuration of an embedded system.
 Depict the hardware/network infrastructure of an organization.
(Ambler, 2005)
A deployment diagram in the Unified Modeling Language models the physical deployment of artifacts on
nodes. To describe a web site, for example, a deployment diagram would show what hardware components
("nodes") exist (e.g., a web server, an application server, and a database server), what software components
("artifacts") run on each node (e.g., web application, database), and how the different pieces are connected (e.g.
JDBC, REST, RMI) (Wikipedia).
The nodes appear as boxes, and the artifacts allocated to each node appear as rectangles within the boxes. Nodes
may have subnodes, which appear as nested boxes. A single node in a deployment diagram may conceptually
represent multiple physical nodes, such as a cluster of database servers (Wikipedia).
Example of Deployment Diagram:
Page 2 of 4
Package Diagram:
To reflect the organization of packages and their elements we use package diagrams. Package diagrams provide
a visualization of the namespaces when used to represent class elements. To organize use case diagrams and
class diagrams the most commonly used diagram is package diagrams (Sparx Systems).
Packages can be built to represent either Physical or Logical relationships. Packages are represented in UML as
folders and also contain the elements that share a namespace, the elements; all of them must be identifiable
within a package and have a unique name and type. The package must show the package name and can
optionally show the elements within the package in extra compartments (Sparx Systems).
Example of Package Diagram:
Source:
http://www.sparxsystems.com/resources/uml2_tutorial/uml2_packagediagram.html
Page 3 of 4
REFERENCES:
For Deployment Diagram:
Ambler, S. (2005). The Elements of UML 2.0 Style.
http://www.agilemodeling.com/style/deploymentDiagram.htm.
Bentley, W. (2007). Systems Analysis & Design Methods – 7th Edition. New York, NY: The McGrawHill/Irwin.
Wikipedia. http://en.wikipedia.org/wiki/Deployment_diagram.
For Package Diagram:
http://en.wikipedia.org/wiki/Package_diagram.
http://www.sparxsystems.com/resources/uml2_tutorial/uml2_packagediagram.html.
Page 4 of 4
Download