uml

Visual Studio UML Class Diagram & Modeling of Generic Types

久未见 提交于 2019-11-30 02:24:37
I need to model a concrete generic class inheriting from a base generic class. First, see below: ActivityFacade should be implemented this way: public class ActivityFacade : BaseFacade<Activity, int> { } How can I model this in a VS2012 UML class diagram? Looking at the diagram, it is obvious that ActivityFacade inherits from BaseFacade, but what's not obvious is the generic type parameters that it is passing in, namely: Activity and int . You need to add a new binding class ( BaseFacade <Activity, int> ) connect it to your parameterized class ( BaseFacade<T, TKey> ) with a template binding

UML中的类图

自作多情 提交于 2019-11-30 02:08:52
在UML中,描述两个类之间的关系,按照关系的强弱分为,实现=泛化>组合>聚合>关联>依赖。 这六种关系,是存在于UML中的概念,请不要和Java中的混淆。例如,UML中的组合,与Java中的组合,含义是不一样的。 类图是依赖于语言的,不同语言可能存在差别。 1、实现 实现: 描述java中的implements。UML中用虚线和空三角表示。 在Java中表示: class Fruit {} class Apple implements Fruit {} 在UML中表示: 2、泛化 泛化: 泛化描述的是Java中,继承的关系。UML中,用实线和空三角表示。 在Java中表示 class Fruit {} class Apple extends Fruit {} 在UML中表示 3、组合、聚合、关联 这三种关系描述的都是,Java中的组合关系,即一类的定义中有另一类的引用。 但是,这三种组合关系是有区别的。 组合: 关系最强,代表整体和部分的关系,且要求代表整体的类的对象,对代表部分的类的对象的生命周期负责,整体对象被垃圾回收期清理,部分对象 就不能够单独存在。 Java中表示:代表人的对象被清理,代表身高信息的对象就不可以存在了。(例子不是很恰当,但是这个道理) class Hight {} class Person { Hight h; } UML表示:软件不同可能有不同的表示

Best UML plugins for Eclipse [closed]

家住魔仙堡 提交于 2019-11-30 02:06:20
I just inherited a J2SE project and will be working on it on Eclipse. I'd like to get some diagrams out of the existing code and I'm looking for good UML plugins to use with Eclipse. Any recommendations? Honestly, I think your best bet isn't an Eclipse plugin at all, but Enterprise Architect by Sparx Systems. Its cost is reasonable ( $200-300 US for the Professional version ), and it can reverse engineer an existing code base into UML. I've used it on several projects, and have found it invaluable whenever I needed the 20,000-foot overview on an existing project. Also, I haven't used its UML

Use case generalization versus extension

时光怂恿深爱的人放手 提交于 2019-11-30 01:51:21
UML Use Case Diagrams allow for two seemingly equivalent ways to show that a given use case might be realised in several different ways namely use case generalizations as opposed to use case extensions . I have seen the following basically example modelled using either approach with equal frequency, sometimes within a single source. To my mind an extension is a weaker relationship than generalization as a direct substitution of the specialised use case for the base case must be possible in generalization but not necessarily in extensions. It seems to me that generalisation implies a

JavaScript code to Class Diagram

♀尐吖头ヾ 提交于 2019-11-30 01:45:37
I am looking for a tool that can generate class diagram from JavaScript code. Similar to the ones for C++ and Java. Is there any? http://jsuml.org/ If you are using node.js, i made a module that generate a class diagram for javascript/node/html/css. Its called wavi. For javascript, function and variable are recognized. https://www.npmjs.org/package/wavi 来源: https://stackoverflow.com/questions/943212/javascript-code-to-class-diagram

UML class diagrams for Xcode (swift programming)

孤街醉人 提交于 2019-11-30 01:30:48
问题 I have created an iOS mobile application. I wanted to know if there is a way to generate UML Class diagram for swift programming language? I have tried Omni Graffle but it keeps saying that the project doesn't contain Objective-C interfaces. And Omni Graffle only does this for objective-c. Please help. Thanks in advance. 回答1: The answer unfortunately is: you can't do it. At least not automatically. Swift as compiler itself has enough flaws left. Leave alone some tool will be able to swallow

聚合和组合UML

南笙酒味 提交于 2019-11-30 00:24:00
聚合关系 聚合(Aggregation)关系表示整体与部分的关系。 在聚合关系中,成员对象是整体对象的一部分,但是成员对象可以脱离整体对象独立存在。 在UML中,聚合关系用带空心菱形的直线表示。例如:汽车发动机(Engine)是汽车(Car)的组成部分,但是汽车发动机可以独立存在,因此,汽车和发动机是聚合关系,如图6所示: 图6 聚合关系实例 在代码实现聚合关系时, 成员对象通常作为构造方法、Setter方法或业务方法的参数注入到整体对象中 ,图6对应的Java代码片段如下: [java] view plain copy public class Car { private Engine engine; //构造注入 public Car(Engine engine) { this.engine = engine; } //设值注入 public void setEngine(Engine engine) { this.engine = engine; } …… } public class Engine { …… } 组合关系 组合(Composition)关系也表示类之间整体和部分的关系,但是在 组合关系中整体对象可以控制成员对象的生命周期,一旦整体对象不存在,成员对象也将不存在,成员对象与整体对象之间具有同生共死的关系 。在UML中,组合关系用带实心菱形的直线表示。例如

一次搞懂建模语言UML

£可爱£侵袭症+ 提交于 2019-11-29 22:36:08
Unified Modeling Language (UML)又称统一建模语言或标准建模语言,它是一个支持模型化和软件系统开发的图形化语言,为软件开发的所有阶段提供模型化和可视化支持,包括由需求分析到规格,到构造和配置。 UML分类 (1)静态模型(系统结构): 用例图、类图、对象图、构件图、部署图 (2)动态模型(系统行为):状态图、活动图、顺序图、协作图 UML中有4种事务: (1)结构事务:名词、静态部分、物理元素。 (2)行为事务:动词、动态部分、行为。 (3)分组事务:包。 (4)注释事务:注解。 用例图: 用例图是指由参与者(Actor)、用例(Use Case),边界以及它们之间的关系构成的用于描述系统功能的视图。用例图(User Case)是外部用户(被称为参与者)所能观察到的系统功能的模型图。用例图是系统的蓝图,用于需求分析阶段。用例图呈现了一些参与者,一些用例,以及它们之间的关系,主要用于对系统、子系统或类的功能行为进行建模。 用例之间的关系 (1)包含 (include) 关系 父用例包含子用例,父用例执行,子用例必然被执行 当两个或多个用例中共用一组相同的动作,这时可以将这组相同的动作抽出来作为一个独立的子用例,供多个基用例所共享。因为子用例被抽出,基用例并非一个完整的用例,所以include关系中的基用例必须和子用例一起使用才够完整,子用例也必然被执行

Do you still use UML? How? What for? [closed]

僤鯓⒐⒋嵵緔 提交于 2019-11-29 20:45:36
Few years back everybody in our shop was crazy with UML . Now everybody seems to have cooled off. I am curious if there is still widespread use of UML in software projects. If so, is this usage limited to whiteboarding? Do you use it for documentation? Do you use tools to generate code from it? Related: Is UML Practical? I prefer the agile adoptation of UML (e.g. white board sketches) over the waterfall adaptation of UML (e.g. excessive documents of elaborate diagrams drawn in Visio). UML is still useful for explaining a design to someone else. E.g. the composite design pattern is easy to

What kind of UML diagrams do you use? [closed]

蓝咒 提交于 2019-11-29 20:44:33
UML2 offers different kinds of diagrams. Up to now I only used class diagrams. What kind of UML diagrams do you use? What kinds of diagrams do you recommend for design & documentation of a software project? I use following diagrams more frequently: class diagrams : To explain the class relationship Sequence Diagrams : To capture object interactions Activity diagrams : To explain the activities (algorithm flow). EDIT: Added links as per comment from @Smith325. I use none. I have hardly seen them since university times and my diploma projects. Have an impression mainly students/profs are