uml

How can I generate UML diagrams from Xcode4

佐手、 提交于 2019-11-26 18:53:43
问题 I watched a video with xcode 3, that shows a button "Design" that displays a UML diagram, but I can't find how to do it with xcode 4. 回答1: Try Omnigraffle This has templates for UML diagrams. If you drop an Xcode4 project file onto its dock icon, it will generate a UML diagram from that. What it doesn't do is generate code from diagrams. 回答2: Search for "Xcode Design Tools" in Help. That will show you a tutorial that will walk you through creating a diagram. EDIT >>> It looks like the

UML类图关系大全【转】

孤者浪人 提交于 2019-11-26 18:34:23
原文: http://www.cnblogs.com/riky/archive/2007/04/07/704298.html 1、关联 双向关联: C1-C2:指双方都知道对方的存在,都可以调用对方的公共属性和方法。 在GOF的设计模式书上是这样描述的:虽然在分析阶段这种关系是适用的,但我们觉得它对于描述设计模式内的类关系来说显得太抽象了,因为在设计阶段关联关系必须被映射为对象引用或指针。对象引用本身就是有向的,更适合表达我们所讨论的那种关系。所以这种关系在设计的时候比较少用到,关联一般都是有向的。 使用ROSE 生成的代码是这样的: class C1 ...{ public: C2* theC2; }; class C2 ...{ public: C1* theC1; }; 双向关联在代码的表现为双方都拥有对方的一个指针,当然也可以是引用或者是值。 单向关联: C3->C4:表示相识关系,指C3知道C4,C3可以调用C4的公共属性和方法。没有生命期的依赖。一般是表示为一种引用。 生成代码如下: class C3 ...{ public: C4* theC4; }; class C4 ...{ }; 单向关联的代码就表现为C3有C4的指针,而C4对C3一无所知。 自身关联(反身关联): 自己引用自己,带着一个自己的引用。 代码如下: class C14 ...{ public:

Association vs. Aggregation [duplicate]

Deadly 提交于 2019-11-26 17:55:07
问题 This question already has answers here : Aggregation versus Composition [closed] (12 answers) Closed 6 years ago . I have reviewed a lot of information about these things, but can't understand what is the difference between them? In Fowler's UML Distilled says that Aggreagation is strictly meaningless, so author recommends not to use it in diagrams. Explain, please, when I should use each of them and how it will influence on java code. 回答1: This is a very arguable question. As Martin explains

UML Class Diagram and Generics

我是研究僧i 提交于 2019-11-26 15:52:58
问题 How do you indicate a generic class or interface in a Class Diagram? I'm looking for two things really: One is how do I model generic java classes if i were doing it with pen and paper. Secondly, what uml tools out there support generic classes/interfaces. Thanks! 回答1: Usually generics are represented as classifier's template parameter. Here is the example how it looks like in the NetBeans UML Plugin: 回答2: UML calls them parameterized types - see examples here. As for tools, I know MagicDraw

Generate UML Class Diagram from Java Project [closed]

孤街醉人 提交于 2019-11-26 15:36:53
Is there a good tool that can help to reverse engineer Java classes to UML that will show an overview of how my classes are related to each other? It doesn't need to decompile from JAR file because I have the sources. I know there are quite a few out there but most of those can only generate individual class. I hope there is a tool that can generate class diagram that shows an overview of how all my current classes and packages work together, so that I can analyse my current architecture design. Of course, analysing is one thing. The other is for documentation purposes. I know of a few so far.

UML和OO

余生长醉 提交于 2019-11-26 15:03:50
UML和OO: UML是描述、构造和文档化系统制品的可视化语言。UML是标准的图形表示法,用来绘制和展示与软件相关的图形,是项目组相关人员的交流沟通工具;是一套标准的建模工具; 应用UML的三种方式: 1.作为草图使用---一种非正式的、不完整的UML图形,借助于UML讨论问题或方案的复杂部分。 2.作为蓝图使用---相对详细的设计图。 3.作为编程语言使用---使用UML进行自动代码生成。MDA等,目前技术还不是很成熟,还在发展阶段。 UML不可能与设计和对象思想同等重要,相对UML,面向对象的思想更值得学习,设计是一项极不寻常且更为重要的技能,特别是怎样使用面向对象的思维进行思考和解决问题的能力,他不是通过学习UML表示法或Case/MDA工具就可以掌握的,UML并不是OOA/D,也不是方法,只是个图形表示法而已,如果没有真正掌握如何创建优秀的面向对象设计,或如何评估和改善现有设计,那么学习UML或UML Case工具则毫无意义。 分析是对需求的调查研究,不是解决方案。设计是为了满足需求的概念上的解决方案。分析和设计可以概括为:做正确的事(分析)和正确地做事(设计)。OOA强调的是在问题领域内发现和描述对象;OOD强调的是定义软件对象以及它们之间是如何协作也实现需求。 在OO开发中,至关重要的能力是熟练地为软件对象分配职责。无论是作UML图还是进行OOA/D/P

面向过程&面向对象 UML&RUP

一世执手 提交于 2019-11-26 15:03:20
面向过程&面向对象 面向过程和面向对象其实都是一种软件技术,我们一般把面向过程归纳为结构化分析方法,常使用DFD图、ER模型、UC矩阵等,把面向对象则归纳为继承、封装、多态等具体技术,事实上,所有的技术都只是人们采用不同方法来认识和描述这个世界时所采用的工具。 我们引用Booch的话: 我对面向对象编程的目标从来都不是复用,相反,对我来说,对象提供了一种处理复杂性问题的方式,这个问题可以追溯到亚里士多德:你把这个世界视为过程还是对象?在面向对象兴起运动之前,编程以过程为中心,如结构化设计方法。然而,系统已经达到了超越其处理能力的复杂性极点。有了对象,我们能够通过提升抽象级别来构建更大的、更复杂的系统---我认为,这才是面向对象编程运动的真正的胜利。 归纳起来,面向对象这种认识论能够帮助我们构建更为复杂的系统来解释越来越复杂的现实世界。 面向对象,认为这个世界的本质是由对象构成的,一切皆为对象,平时看上去相互无关的对象在不同的驱动力和规则下体现不同的运动过程,然后这些过程便展现了我们这个生动的世界。 面向过程,认为世界的一切都不是孤立的,它们互相紧密地联系在一起,缺一不可,互相影响,互相作用,形成一个个具有严格因果关系的小系统,更多小系统组成大系统,所有小系统之间的联系也是紧密和不可分割的。 把世界视为过程这个方法本身有一个假设前提,即这个过程是稳定的,这样我们才有分析的基础

UML统一建模语言

蓝咒 提交于 2019-11-26 14:57:36
概述 统一建模语言(UML)是一种图形化的语言,用于软件密集系统要素的可视化、制定规范、构建对象和编写文档。UML提供了一种标准的方式来描述系统的设计图,既包括概念方面,例如业务过程和系统功能,也包括具体事务,如编程语言语句,数据库图示和可重用的软件组件。 这里着重指出的是UML是一种说明性的“语言”,而不是一种方法或程序。UML通常用来定义软件系统与细化、编写、构造系统中的要素,是“写”设计图的语言。UML可以用不同的方式来支持软件开发方法(例如:统一软件开发过程)-但是它本身并不指定某种方法或过程。 UML模型图构成: 事物things:最基本构成元素,是具有代表性的成分的抽象。 关系relationships:关系把事物紧密联系在一起。 图diagrams:图是事物和关系的可视化表示。 UML事物 UML包含4种事物:构建事物、行为事物、分组事物、注释事物 构建事物 行为事物 分组事物 注释事物 UML关系 依赖 如果类A使用了类B,或者说如果类B的变化会影响类A,则说类A依赖于类B。 一般有以下几种情况属于依赖关系: 类A调用类B的成员函数; 类B的对象是类A的成员变量; 类A的成员函数使用了类B类型的参数。 依赖关系用带箭头的虚线表示。 关联 重数A表示类B的每个对象与类A的多少个对象相关联,重数B则表示类A的每个对象与类B的多少个对象发生作用。 泛化

How to show “if” condition on a sequence diagram?

左心房为你撑大大i 提交于 2019-11-26 12:51:11
问题 I was wondering, how can one represent \" if \" statement on a sequence diagram? if (somethingShouldBeDone) { // Do it } else { // Do something else } Can it be represented at all? The thing is ... in my code, fair amount of conditions are checked to determine a variety of actions. If i am going to show the actions, I\'d like to explicitly state that actions are caused by particular events. If possible create an image representation of a solution. 回答1: If else condition, also called

PHP UML Generator [closed]

試著忘記壹切 提交于 2019-11-26 12:38:19
How do I generate UML diagram based on existing classes in PHP? There's also the PHP UML tool available from pear . PHP_UML: Can generate UML/XMI files in version 1.4, or in version 2.1 (logical, component, and deployment views) Can generate an API documentation in HTML format Can generate PHP code (code skeleton) from a given XMI file Can convert UML/XMI content from version 1.4 to version 2.1 Install it on the command line via: $ pear install pear/php_uml (This used to be $ pear install pear/php_uml-alpha but the package has since gone stable.) Generate your xmi: $ phpuml -o project.xmi I