UML实例--HELL_WORLD(六).doc_第1页
UML实例--HELL_WORLD(六).doc_第2页
UML实例--HELL_WORLD(六).doc_第3页
UML实例--HELL_WORLD(六).doc_第4页
免费预览已结束,剩余1页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Artifacts工件“Hello, World!” is implemented as an applet, so it never stands alone but instead is typically a part of some Web page. The applet starts when its enclosing page is opened, triggered by some browser mechanism that runs the applets Thread object. However, its not the HelloWorld class thats directly a part of the Web page. Rather, its a binary form of the class, created by a Java compiler that transforms the source code representing that class into an artifact that can be executed. This suggests a very different perspective of the system. Whereas all the earlier diagrams represented a logical view of the applet, whats going on here is a view of the applets physical artifacts.“Hello, World!”作为一个小应用程序执行,所以它不能单独成立,而只能是某些网页的一部分当它依附的页面被打开,这个小应用程序就会启动,通过一些浏览器机制触发并运行这个小应用程序的Thread对象然而,HelloWorld类并不是网页的一部分,相反,它是类的二进制形式,通过Java编译器创建,将这个类的源代码表示为可被执行的工件这表明,这个系统的一个非常不同的视点而所有早期的图表示了这个应用程序的逻辑视图,在这里显示的是应用程序的物理效应You can model this physical view using an artifact diagram, as in Figure 3-6. 你可以使用工件图构建物理视图模型就像图3-6显示的那样The logical class HelloWorld is shown at the top as a class rectangle. Each of the other icons in this figure represents a UML artifact in the implementation view of the system. An artifact is a physical representation, such as a file. The artifact called hello.java represents the source code for the logical class HelloWorld, so it is a file that may be manipulated by development environments and configuration management tools. This source code can be transformed into the binary applet hello.class by a Java compiler, making it suitable for execution by a computers Java virtual machine. Both the source code and the binary applet manifest - physically implement - the logical class. This is shown by the dashed arrows with the keyword .逻辑类HelloWorld被作为类矩形框显示在顶部在这个图中的每一个其它图标代表着系统的实施视图中一个UML工件一个工件是一个物理表示法,如文件hello.java工件代表的是HelloWorld逻辑类的源代码,所以那是一个通过开发环境和配置管理工具控制的文件这个源代码可以通过Java编译器变换成二进制形式的应用程序hello.class,以适用于计算机的Java虚拟机执行包括源代码和二进制程序清单物理实现逻辑类这个通过带有关键词的虚线箭头表示出来The icon for an artifact is a rectangle with the keyword above the name. The binary applet HelloWorld.class is a variation of this basic symbol, with its lines made thicker, indication that it is an executable artifact (just like an active class). The icon for the hello.java artifact has been replaced with a user-defined icon, representing a text file. The icon for the Web page hello.html has been similarly tailored by extending the UMLs notation. As the figure indicates, this Web page has another artifact, hello.jpg , which is represented by a user-defined artifact icon, in this case providing a thumbnail sketch of the graphics image. Because these latter three artifacts use user-defined graphical symbols, their names are placed outside the icon. The dependencies among the artifacts are shown by dashed arrows.在工件名称上标注了关键词 的矩形框,是一个工件图标这个二进制程序HelloWorld.class是一个变化的基本符号,带有的双重线,指示出它是一个可执行的工件(就像一个活动类一样)代表hello.java工件的图标已经用一个用户自定义的图标所替代,表示的是一个文本文件代表网页hello.html的图标已经通过扩展UML的符号作了相似的调整如图所示,这个网页有另一个工件,hello.jpg,通过一个用户自定义的工件图标表现,在这种情况下,提供了一个图形图像的缩略草图因为后面的三个工件使用的是用户自定义的图形符号,它们的名称被放在了图标的外面这些工件之间的依赖关系用虚线箭头表示Note: The relationships among the class (HelloWorld), its source code (hello.java), and its object code (HelloWorld.class) are rarely modeled explicitly, although it is sometimes useful to do so to visualize the physical configuration of a system. On the other hand, it is common to visualize the organization of a Web-based system such as this by using artifact diagrams to mode

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论