UML实例--HELL_WORLD(六)



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 applet’s
Thread object. However, it’s
not the HelloWorld class that’s
directly a part of the Web page. Rather, it’s 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, what’s
going on here is a view of the applet’s 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 computer’s
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 <<manifest>>.

逻辑类HelloWorld被作为类矩形框显示在顶部.在这个图中的每一个其它图标代表着系统的实施视图中一个UML工件.一个工件是一个物理表示法,如文件.hello.java工件代表的是HelloWorld逻辑类的源代码,所以那是一个通过开发环境和配置管理工具控制的文件.这个源代码可以通过Java编译器变换成二进制形式的应用程序hello.class,以适用于计算机的Java虚拟机执行.包括源代码和二进制程序清单--物理实现--逻辑类.这个通过带有关键词<<manifest>>的虚线箭头表示出来.

The icon for an artifact is a rectangle with the keyword <artifact>
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 UML’s
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.

在工件名称上标注了关键词<artifact> 的矩形框,是一个工件图标.这个二进制程序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 model
its pages and other executable artifacts.

备注:类(HelloWorld)之间的关系,它的源代码(hello.java)和它的对象代码(HelloWorld.class)很少被明确地建模,尽管 这么做有时对可视化系统的物理配置很有用.另一方面,可视化基于网络系统的组织是很常见的,如通过使用工件图构建它的页面和其它可执行工件.

UML实例--HELL_WORLD(六)

时间: 2024-08-23 21:23:33

UML实例--HELL_WORLD(六)的相关文章

冯斌:JavaFx实例(六)“ShowImage”

javafx.scene.image.Image类的作用是从文件或者网站显示一个图片,例如:new Image("image/us.gif")为图形文件us.gif创建一个Image对象. javafx.scene.image.ImageView是显示图片的node.一个ImageView能从一个Image对象创建.例如: Image image = new Image("image/us.gif"); ImageView imageView = new Image

UML视图(六)时序图

[定义] 时序图(Sequence Diagram),亦称为序列图或循序图,是一种UML行为图.它通过描述对象之间发送消息的时间顺序显示多个对象之间的动态协作.它可以表示用例的行为顺序,当执行一个用例行为时,时序图中的每条消息对应了一个类操作或状态机中引起转换的触发事件. 时序图与协作图是可以互相转换的,与胁作图不同的是,时序图强调消息事件的发生顺序,更方便于阐述事件流的过程:但是时序图却难以表达对象之间关系. [元素]对象.生命周期线.消息.会话.销毁 对象 参与交互的对象.每个对象都带有一条

android-UI组件实例大全(六)------ImageView图像视图

图像视图:ImageView 继承view类,用于在屏幕上显示任何Drawable对象,通常用来显示图片: 这里的话我们介绍一些比较常用的属性: Path 1: android:adjustViewBounds:设置ImageView是否调整自己的边界来保持所显示图片的长宽比 !!!下面的这两个属性需要adjustViewBounds为ture,不然是不起作用的哦! android:maxHeight:设置ImageView的最大高度 android:maxWidth:设置ImageView的最

Flask实例教程六

Flask-SQLALchemy 是一个给你的应用添加 SQLALchemy 支持的 Flask 扩展.SQLALchemy 是Python语言的SQL工具包及对象关系映射(ORM)工具,使用MIT许可证发行,提供能兼容众多数据库(如 SQLite.MySQL.Postgres.Oracle.MS-SQL.SQLServer 和 Firebird)的企业级持久性模型. 一.为你的Flask应用加载Flask-SqlAlchemy扩展 from flask import Flask from fl

uml系列(六)——行为图:活动&amp;状态

说完uml的静态图了,说一下uml的动态的表示吧. uml的行为图,uml的行为图主要用来设计程序的行为.还是老规矩,先来张图: 行为图包含活动图和状态图两种. 先来说下活动图:活动图是由活动的节点和流程构成的图.比较清晰的表达了各个步骤的流程. 首先是起点和终点,活动图由一个实心圆表示起点,一个实心圆外加一个圆圈来表示终点. 然后是节点,节点这个词比较高大上,其实它很简单,就是说的流程进行的状态,进行到哪一步了.上图的"用户下订单"."生产送货单"等都是节点. 在

activiti自己定义流程之Spring整合activiti-modeler实例(六):启动流程

1.启动流程并分配任务是单个流程的正式開始,因此要使用到runtimeService接口.以及相关的启动流程的方法.我习惯于用流程定义的key启动,由于有多个版本号的流程定义时,用key启动默认会使用最新版本号.同一时候,由于启动中查询了流程部署时xml文件里流程节点的信息.也用到了repositoryService及相关方法. 2.后台业务代码, (1)自己定义的申请单实体类(为的目的仅仅为了跑通整个流程.因此仅仅定义了一个实体类.按公司标准开发来说,应该是和前台交互一个command类(事实

activiti自定义流程之Spring整合activiti-modeler5.16实例(六):启动流程

注:(1)环境搭建:activiti自定义流程之Spring整合activiti-modeler5.16实例(一):环境搭建        (2)创建流程模型:activiti自定义流程之Spring整合activiti-modeler5.16实例(二):创建流程模型        (3)流程模型列表展示:activiti自定义流程之Spring整合activiti-modeler5.16实例(三):流程模型列表展示        (4)部署流程定义:activiti自定义流程之Spring整合

驱动程序实例(六):mpu6050(IIC + cdev)

在我们实际开发中,I2C 总线驱动一般芯片原厂会提供,我们开发一般是设计设备驱动. 本文结合之前对Linux内核的IIC子系统的分析 ,以及对字符设备的cdev接口的分析,本文将编写基于IIC总线与cdev接口的MPU6050设备的实例代码并对其进行分析. IIC子系统分析:详见Linux IIC总线驱动框架. 字符设备的cdev接口分析:详见Linux字符设备驱动(一):cdev接口. 硬件接口: CPU:s5pv210: 挂载IIC总线编号:0. IIC从设备驱动挂载在IIC总线下,IIC总

Python3 实例(六)

Python 判断字符串是否存在子字符串 给定一个字符串,然后判断指定的子字符串是否存在于改字符串中. 实例 def check(string, sub_str): if (string.find(sub_str) == -1): print("不存在!") else: print("存在!") string = "www.runoob.com"sub_str ="runoob"check(string, sub_str)执行