In Visual Studio 2012 Ultimate, there are two class diagram document types:
Class Diagram (extension .cd)
UML Class Diagram (extension .classdiagram)
Why are there two different class diagrams ?
What are the differences?
In what case should I use each?
Adding a class diagram to a code project
Adding an UML class diagram to a modeling project
First, creating a modeling project:
Then adding the diagram to it:
Differences
I noticed several differences:
The looks are different
Basic functionality is hidden in different menus or buttons
I can't add an UML Class Diagram to a code project
I can't add a Class Diagram to a modeling project
I can add classes to a Class Diagram diagram directly from the solution explorer
But to add classes to an UML Class Diagram from the solution explorer, I first have to drag'n'drop them onto a Code Map
I can also add classes to an UML Class Diagram by dragging them from the Architecture Explorer (Architecture menu -> Windows -> Architecture Explorer)
Related
I am looking for an UML modeling tool (e.g. uml designer, papyrus, modelio or such) with a support for collaboration diagrams (as described here : http://www.uml-diagrams.org/collaboration-diagrams/collaboration.html and here http://www.uml-diagrams.org/collaboration-diagrams/collaboration-use.html)
I am especially interested by the ability to draw this kind of schema:
I would also appreciate it if somebody could link me to a good tutorial about this.
PS : To give some context, I am mostly interested in collaboration diagrams in order to describe which part of a class diagram are taking part in a given design pattern (from example which classes of a class diagram are the observer/subject of an observer pattern).
To create a composite structure diagram under Modelio, you have to:
Create a project.
Select UML root project under the model explorer.
Create a Class.
Select the created Class and create a Composite Structure diagram.
The following screenshot show the required steps.
I created a Rational Rhapsody project with Project Type set to SysML. After creating the project I added HarmonySE profile into the project. I also created a Block Definition Diagram and a Requirement Diagram in the project. But I can't find a way to create a Class Diagram in my project. If I click on Tools menu -> Diagrams, Class Diagram is not in the list of diagrams:
Can someone please suggest how to include Class Diagram in a Project?
There is no Class Diagram in SysML, thus Rhapsody prohibts its usage in a project having the SysML profile. If you want to use class diagrams (i.e., UML in general) for your SW domain, you can add an UML project to your workspace, via File->Add new project. This project can use a different profile, and thus you can create your classical UML diagrams there.
In simple terms, a UML class is a block in SysML. What you are looking for is a Block Definition Diagram. There is no Class Diagram in SysML.
PhpStorm has a feature to create UML diagrams based on existing classes
But I need to create and save my own diagrams, that will have objects for not existing classes. For example, I need to create a database diagram and a UML diagram for some classes of new feature.
Can I do it via phpstorm?
No, going by the Documentation Jetbrains Confluence on UML Diagrams in Phpstorm and this post phpstorm only allows you to create different UML diagram views of your code base, the only model is your code base itself. Thus you cannot have classes just in a diagram.
If it is still of your interest, you can use an extension like this to write your custom UMLs. You can find the documentation here
I have developed an online web application which uses JSP's and Java classes.
I understand that Java classes would appear on a class diagram but would JSP files ?
My answer is no.
Class diagrams can be utilized for different purposes, at different levels. Two very common usages are design and analysis.
1- Analysis class diagrams show the entities and their relationships and model your problem domain (no solution or technology involved)
2- Design class diagrams model your solution and may contain fabric classes. They are very close to your code. (your Java classes in this case)
Design class diagrams could have different levels of abstraction according to your need. It is very uncommon to include UI details in your class diagrams unless there is a specific reason for it.
Basically you have to make a decision on your scope, for example it is not very useful to include java library classes in your class diagrams unless there is reason for it.
Package model = UMLFactory.eINSTANCE.createPackage();
model.setName("MyPackage");
Class cls = model.createOwnedClass("MyClass", false);
I created some uml2 models by code above, now I want to create a class diagram and some notations for package/class etc. How can I do this by programming? (We can initialize class diagram for .uml by uml2tools in eclipse, but what's the API for it?)
Thanks a lot.
The uml2 model provides you with the entities needed to create uml models. UML diagrams are views of these models and are not part of the mode definition. So you can't create a diagram :-(