Generating UML Class Diagram (UML Static Structure) from C# source code in Visio? - visio

Say I've got some C# source code, and I want to generate a UML Class diagram from it. In Visio I believe a UML Class diagram is called "UML Static Structure" from what I read in the Shapes accordion.
I'm using Visual Studio 2010 Premium and MS Visio 2007 (12.0.6536.5000) SP2 MSO (12.0.6545.5004)
How can source code be imported into Visio?

Just about every UML tool that I know of includes an import/export facility for reading in source code and generating class diagrams. JUDE, Enterprise Architect,, Argo, Magic Draw - all of them can do it if Visio can't.

Related

Create class diagram with doxygen

I'm using Doxygen to create a class documentation from my code, which is written in C++. I want to create a UML for the whole code in a single graph? Is it possible? Because Doxygen is trying to create a UML for each class but the thing I'm trying to create is to create a big graph for the entire code. Any idea or suggestion is appreciated. BTW I use doxywizard for generating the class diagrams and documentations.

How can I convert FlowChart to PHP Code and vise versa in Enterprise Architect?

I'am new to Enterprise Architect, and I need to know if EA supports converting flowchart to php code and vise versa?, and if it doesn't are there any alternatives?
Furqan.
Here is a link to the Sparx web page on generating code from behavioral models.
http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/software_engineering/code_generation_from_behaviora.html
EA includes native support for PHP (see under Tools | Options | Source Code Engineering). The nearest thing to a traditional flowchart in EA is the Activity Diagram. You could try creating an Activity Diagram then use the information on the Sparx web page to generate PHP from that. Good luck.
I have Found this tool which convert Flow Chart to pseudo code, and export pseudo code to multiple languages, but it Does not support PHP.
and the other tool is converting code to Flowchart
You can do that with PSeint, (you work with pseudocode that then translates to php), it's free but in spanish, unfortunately.
http://pseint.sourceforge.net/

Adding Attributes to Visio UML Interface Like a Class

Is it possible to add attributes to a Visio (in my case 2007) UML diagram Interface object? It shows operations in its properties dialog, but alas no Attributes section. I am really hoping someone has thought of a way around this (without looking at third-party apps).
It is possible to achieve the same visual Effect: An interface is represented like a class with a stereotype <<interface>>. So you can go to UML/Stereotypes/New and enter "interface" as Stereotype name, then select Class as base. Now you can Create a new Class, edit it and select the new interface stereotype. After doing so you have a visual representation of an interface which can hold attributes.
Maybe this suites your needs. Still the internal representation of these models is not UML 2 compliant (but Visio has other flaws regarding that either way).

Reverse engineering in Bouml for php project

My php project using Zend framework. i want to generate class diagram for that php(zendframwork). i try to generate class diagram using Bouml project.
I go through this link Boumal java reverse engineering video
but problem is when i drag and drop every php class but that don't show relationship between class
You could give UML Lab (http://uml-lab.com) a try (Note: I'm biased as I'm working for Yatta Solutions ;) ). There is a tutorial explaining how to reverse engineer existing source code: http://www.uml-lab.com/en/uml-lab/tutorials/reverse-engineering-tutorial/. Basically, just create a new Model and Class Diagram and all available PHP source files are imported automatically. Otherwise you can import a PHP file by dragging it onto the diagram editor.
The tool supports Java and PHP, and has build-in support for Zend Framework. It may not understand each PHP source file - but files containing a class should work fine. If there is something the tool doesn't understand you'll be notified and can directly file a bug.
It's a commercial tool, but there is a 30 days trial and a free academic edition. If you have any questions don't hesitate asking them in the forum, bug tracker or by mail.
each time you add a class in a class diagram the relations with the already present classes are shown, except of course if you modified the "drawing settings" to not draw automatically the relations.
but this supposes there are relations to draw ;-)
Php is a not typed language, so the reverse can only create inheritances, the types of the attributes are unknown contrarily to C++ or Java

Creating entity diagrams from code first classes

I was just reading Asp.net MVC3 tutorials (Models (Data))
On this page tutorial 4 of 10 on the ASP.NET website, it is shown that an entity diagram is created from code first classes. How to generate them?
This can be done very easily by using the Class Diagram. Add New Item > Class Diagram. Then drag and drop your code first classes into the diagram from the solution explorer.
A Class Diagram is OK, but it doesn't automatically show the relationships between classes. The slickest way that I have used is Entity Framework Power Tools. Their description of the tool:
When right-clicking on a C# project, the following context menu function is supported: 1) Reverse Engineer Code First - Generates POCO classes, derived DbContext and Code First mapping for an existing database.
Assuming your schema has been created from the Code First classes you can reverse the db into a an edmx to visualise the Model. Any classes generated from this obviously won't be related to your Code First classes though.
Create a copy of your project. Open the copy and add a new item/ADO.NET Entity Data Model. Edit the diagram for layout and print to a .pdf file. Delete the copy of the project.
Anytime you make a change you will have to re-create the diagram and edit the layout, but I can usually get through the whole process in about 15 minutes.