UML基本架构建模--开始构建图

来源:互联网 发布:qq卡屏源码 编辑:程序博客网 时间:2024/05/17 03:10


 

When you work with an architect to design a house, you start with three things: a list of wants (such asI want a house with three bedrooms and I want to pay no more thanx), a few simple sketches or pictures from other houses representing some of its key features (such as a picture of an entry with a circular staircase), and some general idea of style (such asWed like a French country look with hints of California coastal). The job of the architect is to take these incomplete, ever-changing, and possibly contradictory requirements and turn them into a design.

在你与一位设计师一同设计一个房子时,就已经开始做三件事:想法列表(如我想要带有三个卧室的房子我希望支出不要超出),一些表现其它房子的关键特征的简单草图或图片(如一张入口带有环形楼梯的图片),风格的一些大致想法(如我希望法国乡村看起来象加利福尼亚海岸).设计师的工作就是将这些不完全的,变幻无穷的及可能相互矛盾的需求转换成设计图.

 

To do that, the architect will probably start with a blueprint of a basic floor plan. This artifact provides a vehicle for you and your architect to visualize the final house, to specify details, and to document decisions. At each review, youll want to make some changes, such as moving walls about, rearranging rooms, and placing windows and doors. Early on, these blueprints change often. As the design matures and you become satisfied that you have a design that best fits all the constraints of form, function, time, and money, these blueprints will stabilize to the point at which they can be used for constructing your house. Even while your house is being built, youll probably change some of these diagrams and create some new ones as well.

 这样,设计师有可能开始于基本的地板平面设计图.这个半成品为你和你的设计师将房子的最终形式细节描述和记录下的决定形成思维图像提供了一个媒介,在每次回顾时,你会想做些改变,如移动墙,重新安排房间,放置门和窗.在早期,这些蓝图变动频繁.随着设计的成熟,同时你满意于你有一个最好的设计--不管在形式上,功能上,时间和金钱上都符合你的预期.这些蓝图稳定在可以用于构建你的房子的那个点上.甚至在你的房子正在建造的过程中,你仍然有可能改变这些图和创建新的图.

 

Along the way, youll want to see views of the house other than just the floor plan. For example, youll want to see elevations showing the house from different sides. As you start specifying details so that the job can be meaningfully costed, your architect will need to create electrical plans, plans for heating and ventilation, and plans for water and sewer connections. If your design requires some unusual feature (such as a long, unsupported span over the basement) or you have a feature thats important to you (such as the placement of a fireplace so that you can install a home theater), you and your architect will want to create some sketches that highlight those details.

随着时间的推移,相对于地板设计你会更想看看这个房子的其它构想.例如,你会想从不同侧面观察房子所显示的立体效果.为了让这个工作的代价有点意义,你开始描绘细节,你的设计师需要构建电路设计用于取暖和通风的设计供水和下水道连接的设计.如果你的设计需求有些不常用的特点(如一段长的不被支持的跨越地下室的距离)或是一个对你来说很重要的特点(如壁炉的位置,因为你要安装家庭影院),你和你的设计师会想创造一些草图来强调那些细节.

 

The practice of creating diagrams to visualize systems from different perspectives is not limited to the construction industry. Youll find this in every engineering discipline involving the creation of complex systems, from civil engineering to aeronautical engineering, ship building, manufacturing, and software.

实行从不同角度创建图群来让系统可视化并不限于建筑行业.你会在每个工程学科涉及复杂系统的创造中找到这个,从土木工程到航空工程,船舶的建造,制造业和软件.

 

In the context of software, there are five complementary views that are most important in visualizing, specifying, constructing, and documenting a software architecture: the use case view, the design view, the interaction view, the implementation view, and the deployment view. Each of these views involves structural modeling (modeling static things) as well as behavioral modeling (modeling dynamic things). Together, these different views capture the most important decisions about the system. Individually, each of these views lets you focus attention on one perspective of the system so that you can reason about your decisions with clarity.

在软件方面,有五个互为补充的视图,它们在可视化叙述化结构化文档化一个软件的体系结构上非常重要:用例视图,设计视图,交互视图,实施视图和布署视图.这些视图的每一个都涉及到结构建模(建模静态事物)以及行为建模(建模动态事物).放在一起时,这些不同的视图捕捉关于系统的最重要的决定.单独存在时,这些视图的每一个让你专注于系统的一个方面,以便你能明确为什么做这个决定.

 

When you view a software system from any perspective using the UML, you use diagrams to organize the elements of interest. The UML defines different kinds of diagrams, which you can mix and match to assemble each view. For example, the static aspects of a systems implementation view might be visualized using class diagrams; the dynamic aspects of the same implementation view might be visualized using interaction diagrams.

在你使用UML从任意角度观察一个软件系统的时候,你使用图来组织感兴趣的元件.UML定义了不同类别的图群,你可以混合搭配来组合每个视图.如系统实施视图的静态方面可以使用类图表现;这个实施视图的动态方面可以使用交互图表现.

 

Of course, you are not limited to the predefined diagram types. In the UML, diagram types are defined because they represent the most common packaging of viewed elements. To fit the needs of your project or organization, you can create your own kinds of diagrams to view UML elements in different ways.

当然,你不必限制在已定义的图类型上.在UML中,图类型被定义是因为它们表现最常用的视图元件包.你的项目或是你的组织为适应这个需要,可以建立你自己的图群种类来用不同的方式表现UML的元件.

 

Youll use the UMLs diagrams in two basic ways: to specify models from which youll construct an executable system (forward engineering) and to reconstruct models from parts of an executable system (reverse engineering). Either way, just like a building architect, youll tend to create your diagrams incrementally (crafting them one piece at a time) and iteratively (repeating the process ofdesign a little, build a little).

使用UML图群有两个基本的方式:描绘的模型可构造一个可执行的系统(前向工程)及从一个可执行的系统重构模型(逆向工程).不管哪种方法,你就像一个建筑设计师,慢慢地(在一段时间制作它们中的一块)迭代地(重复着这个过程:设计一点,建立一点)建立好你的图群.

 
0 0
原创粉丝点击