📄 oobject102001.htm
字号:
currently doing business, or how it would like to do business. This
is because activity diagrams are "less technical" in
appearance, compared to sequence diagrams, and business-minded
people tend to understand them more quickly.</font></p>
<p><font color="#000000">An activity diagram's notation set is
similar to that used in a statechart diagram. Like a statechart
diagram, the activity diagram starts with a solid circle connected
to the initial activity. The activity is modeled by drawing a
rectangle with rounded edges, enclosing the activity's name.
Activities can be connected to other activities through transition
lines, or to decision points that connect to different activities
guarded by conditions of the decision point. Activities that
terminate the modeled process are connected to a termination point
(just as in a statechart diagram). Optionally, the activities can be
grouped into swimlanes, which are used to indicate the object that
actually performs the activity, as shown in Figure 6.<br>
</font></p>
<h5 align="center"><a href="javascript:if(confirm('http://www.therationaledge.com/images/jun_03/bell_fig6.gif \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.therationaledge.com/images/jun_03/bell_fig6.gif'" tppabs="http://www.therationaledge.com/images/jun_03/bell_fig6.gif"><font color="#000000"><img height="521" alt="Figure 6: Activity diagram, with two swimlanes to indicate control of activity by two objects: the band manager, and the reporting tool" src="javascript:if(confirm('http://www.therationaledge.com/images/jun_03/bell_fig6.gif \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.therationaledge.com/images/jun_03/bell_fig6.gif'" tppabs="http://www.therationaledge.com/images/jun_03/bell_fig6.gif" width="439" border="0"></font></a></h5>
<h5> </h5>
<div align="center">
<h5> </h5>
<div align="center">
</div>
<h5><font color="#000000">Figure 6: Activity diagram, with two
swimlanes to indicate control of activity by two objects: the band
manager, and the reporting tool<br>
</font></h5>
</div>
<p><font color="#000000">In our example activity diagram, we have
two swimlanes because we have two objects that control separate
activities: a band manager and a reporting tool. The process starts
with the band manager electing to view the sales report for one of
his bands. The reporting tool then retrieves and displays all the
bands that person manages and asks him to choose one. After the band
manager selects a band, the reporting tool retrieves the sales
information and displays the sales report. The activity diagram
shows that displaying the report is the last step in the process.</font></p>
<h3><font color="#000000"><br>
Component diagram</font></h3>
<p><font color="#000000">A component diagram provides a physical
view of the system. Its purpose is to show the dependencies that the
software has on the other software components (e.g., software
libraries) in the system. The diagram can be shown at a very high
level, with just the large-grain components, or it can be shown at
the component package level.<a href="#footnotes"><sup>2</sup></a></font></p>
<p><font color="#000000">Modeling a component diagram is best
described through an example. Figure 7 shows four components:
Reporting Tool, Billboard Service, Servlet 2.2 API, and JDBC API.
The arrowed lines from the Reporting Tool component to the Billboard
Service, Servlet 2.2 API, and JDBC API components mean that the
Reporting Tool is dependent on those three components.</font></p>
<p><a href="javascript:if(confirm('http://www.therationaledge.com/images/jun_03/bell_fig7.gif \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.therationaledge.com/images/jun_03/bell_fig7.gif'" tppabs="http://www.therationaledge.com/images/jun_03/bell_fig7.gif"><font color="#000000"><img height="179" alt="Figure 7: A component diagram shows interdependencies of various software components " src="bell_fig7small.gif.htm" tppabs="http://www.therationaledge.com/images/jun_03/bell_fig7small.gif" width="540" border="0"></font></a></p>
<div align="center">
</div>
<h5 align="center"><font color="#000000">Figure 7: A component
diagram shows interdependencies of<br>
various software components the system comprises<br>
<a href="javascript:if(confirm('http://www.therationaledge.com/images/jun_03/bell_fig7.gif \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.therationaledge.com/images/jun_03/bell_fig7.gif'" tppabs="http://www.therationaledge.com/images/jun_03/bell_fig7.gif">Click
to enlarge</a></font></h5>
<h3><font color="#000000"><br>
Deployment diagram</font></h3>
<p><font color="#000000">The deployment diagram shows how a system
will be physically deployed in the hardware environment. Its purpose
is to show where the different components of the system will
physically run and how they will communicate with each other. Since
the diagram models the physical runtime, a system's production staff
will make considerable use of this diagram.</font></p>
<p><font color="#000000">The notation in a deployment diagram
includes the notation elements used in a component diagram, with a
couple of additions, including the concept of a node. A node
represents either a physical machine or a virtual machine node
(e.g., a mainframe node). To model a node, simply draw a
three-dimensional cube with the name of the node at the top of the
cube. Use the naming convention used in sequence diagrams: [instance
name] : [instance type] (e.g., "w3reporting.myco.com :
Application Server").<br>
</font></p>
<p align="center"><a href="javascript:if(confirm('http://www.therationaledge.com/images/jun_03/bell_fig8.gif \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.therationaledge.com/images/jun_03/bell_fig8.gif'" tppabs="http://www.therationaledge.com/images/jun_03/bell_fig8.gif"><font color="#000000"><img height="326" alt="Figure 8: Deployment diagram. Because the Reporting Tool component is drawn inside of IBM WebSphere, which in turn is drawn inside of the node w3.reporting.myco.com, we know that users will access the Reporting Tool via a browser running on their local machine, and connecting via HTTP over their company's intranet." src="bell_fig8s.gif.htm" tppabs="http://www.therationaledge.com/images/jun_03/bell_fig8s.gif" width="540" border="0"></font></a></p>
<div align="center">
</div>
<h5 align="center"><font color="#000000">Figure 8: Deployment
diagram. Because the Reporting Tool component is drawn inside of IBM
WebSphere, which in turn is drawn inside of the node
w3.reporting.myco.com, we know that users will access the Reporting
Tool via a browser running on their local machine, and connecting
via HTTP over their company's intranet.<br>
<a href="javascript:if(confirm('http://www.therationaledge.com/images/jun_03/bell_fig8.gif \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.therationaledge.com/images/jun_03/bell_fig8.gif'" tppabs="http://www.therationaledge.com/images/jun_03/bell_fig8.gif">Click
to enlarge</a></font></h5>
<p><font color="#000000"><br>
The deployment diagram in Figure 8 shows that the users access the
Reporting Tool by using a browser running on their local machine and
connecting via HTTP over their company's intranet to the Reporting
Tool. This tool physically runs on the Application Server named
w3reporting.myco.com. The diagram shows the Reporting Tool component
drawn inside of IBM WebSphere, which in turn is drawn inside of the
node w3.reporting.myco.com. The Reporting Tool connects to its
reporting database using the Java language to IBM DB2's JDBC
interface, which then communicates to the actual DB2 database
running on the server named db1.myco.com using native DB2
communication. In addition to talking to the reporting database, the
Report Tool component communicates via SOAP over HTTPS to the
Billboard Service.</font></p>
<h3><font color="#000000">Conclusion</font></h3>
<p><font color="#000000">Although this article provides only a brief
introduction to Unified Modeling Language, I encourage you to start
applying the information you have learned here to your own projects
and to dig more deeply into UML. There are several software tools
that help you to integrate UML diagrams into your software
development process, but even without automated tools, you can use
markers on a whiteboard or paper and pencils to draw your UML
diagrams and still achieve benefits.</font></p>
<a name="footnotes"></a>
<hr>
<h3><font color="#000000">Notes</font></h3>
<p class="small"><font color="#000000"><sup>1</sup> For more
information on inheritance and other object-oriented principles, see
<a href="javascript:if(confirm('http://java.sun.com/docs/books/tutorial/java/concepts/inheritance.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://java.sun.com/docs/books/tutorial/java/concepts/inheritance.html'" tppabs="http://java.sun.com/docs/books/tutorial/java/concepts/inheritance.html" target="_blank">http://java.sun.com/docs/books/tutorial/java/concepts/inheritance.html</a></font></p>
<p class="small"><font color="#000000"><sup>2</sup> The phrase
component package level is a programming language-neutral way of
referring to class container levels such as .Net's namespaces (e.g.,
System.Web.UI) or Java's packages (e.g., java.util).</font></p>
<h3><font color="#000000"><br>
Resources</font></h3>
<p><font color="#000000"><a href="javascript:if(confirm('http://www.uml.org/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.uml.org/'" tppabs="http://www.uml.org/" target="_blank">http://www.uml.org</a>
-- The official UML Web site.<br>
<a href="javascript:if(confirm('http://www.rational.com/uml/resources/documentation/index.jsp \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.rational.com/uml/resources/documentation/index.jsp'" tppabs="http://www.rational.com/uml/resources/documentation/index.jsp" target="_blank">http://www.rational.com/uml/resources/documentation/index.jsp</a>
--Offers several different versions of the actual UML specification.<br>
<a href="javascript:if(confirm('http://www.rational.com/rose \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.rational.com/rose'" tppabs="http://www.rational.com/rose" target="_blank">http://www.rational.com/rose</a>
--Information on IBM Rational Rose,<sup>®</sup> A commercial UML
modeling tool.<br>
<a href="javascript:if(confirm('http://www.rational.com/xde \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.rational.com/xde'" tppabs="http://www.rational.com/xde" target="_blank">http://www.rational.com/xde
</a>--Information on IBM Rational XDE,<sup>®</sup> a commercial
UML modeling tool that is integrated with IBM's Eclipse development
platform.<br>
<a href="javascript:if(confirm('http://argouml.tigris.org/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://argouml.tigris.org/'" tppabs="http://argouml.tigris.org/" target="_blank">http://argouml.tigris.org</a>
--Information on Argo UML, an .open source UML modeling tool built
in Java.<br>
<a href="javascript:if(confirm('http://uml.sourceforge.net/index.php \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://uml.sourceforge.net/index.php'" tppabs="http://uml.sourceforge.net/index.php" target="_blank">http://uml.sourceforge.net/index.php</a>
-- Information on Umbrello UML Modeller, an open source UML modeling
tool for KDE.<br>
<br>
<img height="35" alt="tre icon" src="icon.gif.htm" tppabs="http://www.therationaledge.com/images/icon.gif" width="35" align="right" border="0"></font></p>
<hr>
<p><font color="#000000">For more information on the products or
services discussed in this article, please click <a href="javascript:if(confirm('http://www.rational.com/contact/request.jsp \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.rational.com/contact/request.jsp'" tppabs="http://www.rational.com/contact/request.jsp" target="_blank">here</a>
and follow the instructions provided. Thank you!</font></td>
</tr>
</table>
<!-- #EndEditable --></td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<hr>
<span class="copyright"> 版权所有:UML软件工程组织 </span></td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -