class-diagram

How to represent a static relationship in an UML class diagram

南楼画角 提交于 2020-01-24 07:29:04
问题 I'm having trouble finding a good answer for how to represent a relationship between two classes A and B, where an instance of A is a static (class scope) variable in B. For example: class A { } class B { static A a; } I'm not even sure if it is a regular association or a dependency (or something else?). One idea would be to use a stereotype on the role name of A in the relationship, but I have never seen that done. And since I understand that it is 'rule' not to use both an attribute and a

When to use UML Association Classes?

南楼画角 提交于 2020-01-21 01:44:12
问题 Can I improve my design on these 2 diagrams below? If so, how? I am confused by the use of association classes in my diagrams. Should I use them? Figure 1 Figure 2 回答1: For association classes, they make sense only if they represent associations with some behaviour and state. Look at Article'sSubject. It has nothing more than source, target and identity. You don't need a class for such a association, just use plain association, which has all those properties. There are more such unnecessary

How to get a nice class diagram for built-in .net classes?

只谈情不闲聊 提交于 2020-01-13 10:21:46
问题 To get an overview for the CodeDom classes in .Net I tried to create a class diagramm using Visual Studio 2010 built-in class designer, but I did not find the way how I could feed the .Net built-in classes and types into it, the only I can get is to add my own classes from Class View window. I also tried it with UML diagramms in VS2010, and I couldn't import the classes. I was looking for a similar option in MS Visio and though it does provide support for class diagramm I could not generate

Can I programmatically export class diagrams from Visual Studio 2008?

落爺英雄遲暮 提交于 2020-01-04 09:18:32
问题 I can export a class diagram as an image from Visual Studio by right-clicking on the surface and choosing "Export Diagram as Image..." Is there a way to do this through command line? I'd like to be able to generate all of my class diagrams as images so I can include it in the .chm I am building w/ Sandcastle. 回答1: Found it after a full day of searching. In case anyone ever comes across this again: Two ways to do this: Microsoft.VisualStudio.Modeling.Diagrams.Diagram.CreateBitmap() lets you

MVC UML class diagram

两盒软妹~` 提交于 2020-01-01 02:46:10
问题 I've have to work on a new project,written in C# mvc,the first thing i would like to do is create an UML class diagram. Is there somewhere an example of how to do this? Most examples show one controller with one view and one model. But in this project there is per controller multiple Views and multiple ModelDto's Thanks. 回答1: You can do like below by using MS visio or any other UML tool. Just a sample looks like below (methods and properties should differ) Like above you can extend the above

How to show Dependency Injection on a UML class diagram?

只谈情不闲聊 提交于 2019-12-31 10:31:25
问题 How do I show Dependency Injection of an object or class in a UML class diagram? 回答1: Martin Fowler shows it like this: 回答2: You display class dependencies by using a dashed line with a pointed arrow that points from the client model element to the supplier model element. I think that how you provide the dependencies to the client is irrelevent at the UML level. 来源: https://stackoverflow.com/questions/4488481/how-to-show-dependency-injection-on-a-uml-class-diagram

How to show Dependency Injection on a UML class diagram?

蓝咒 提交于 2019-12-31 10:31:12
问题 How do I show Dependency Injection of an object or class in a UML class diagram? 回答1: Martin Fowler shows it like this: 回答2: You display class dependencies by using a dashed line with a pointed arrow that points from the client model element to the supplier model element. I think that how you provide the dependencies to the client is irrelevent at the UML level. 来源: https://stackoverflow.com/questions/4488481/how-to-show-dependency-injection-on-a-uml-class-diagram

Javadoc Inserting UML Diagrams

喜欢而已 提交于 2019-12-31 08:24:32
问题 Is there a way to embed images into my JavaDoc? Basically i want to include some UML diagrams explaining the hierarchy of my classes in some of the documentation. Thanks! 回答1: Check out this section of the Javadoc documentation, which explains how to embed images in your Javadoc. Also, here is an article describing how to reverse engineer UML diagrams and embed them in your Javadoc using UMLGraph. 回答2: Yes. The documentation explains how to embed arbitrary images to javadoc documentation. If

what is the differences between class and dataType

做~自己de王妃 提交于 2019-12-30 08:14:51
问题 As i read through UML specification that: class has a set of attributes/operations and data type has a set of attributes/operations 1)with regards to attributes/operations of data type what this means? because i don't know how such a data type has attributes and operations? 2)What’s the main difference between a class and a datatype? 回答1: according to UML 2.4.1 specification A data type is a special kind of classifier, similar to a class. It differs from a class in that instances of a data

JavaScript code to Class Diagram

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-29 20:03:06
问题 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? 回答1: http://jsuml.org/ 回答2: 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