Tools which can draw a project's architecture? - java

I have one product which is developed in J2EE, the technology that I used as Java, JSF, and for the back end I used AS400 (DB2 database). I am using eclipse IDE. Are there any tools which can help me draw the flow of my product, UML diagrams and the class diagrams.

A UML tool that I like is plantuml It lets you write a text description of a diagram, so you have a lot of flexibility in what you include or exclude. There are plugins for everything from Eclipse to Microsoft Word and even an online servlet. There are tools to reverse engineer classes and you can also embed diagrams into javadoc if you wish.

This is good one. It can draw class, activity,sequence and Usecase diagrams.
http://amateras.sourceforge.jp/cgi-bin/fswiki_en/wiki.cgi?page=AmaterasUML

StarUML is a very good option. It is free and supports most of UML2. This is not being maintained but it is rock solid for what you need.
Use interaction diagrams to document high level flow of your product
Use class/object diagrams to provide static view
Use activity diagrams to document workflow/algorithms

Take a look at Visual Paradigm SDE for Eclipse
Link: http://www.visual-paradigm.com/product/sde/ec/
you can capture requirements, design databases, generate code, implement software and generate reports. SDE supports UML, entity relationship diagram, BPMN and SysML.
Also there are different versions a good version is the Comunity one which is for free..!

You need to create an UML model from your database.
You can use Dali without EclipseUML but database annotations would be lost during the UML reverse engineering if not using Omondo.

Related

generate diagrams from hibernate models

I have the codebase and SQL creation script of a legacy Spring+Hibernate app, to be retired and migrated. I have limited knowledge of Java (and legacy frameworks), so generating a model diagram may be helpful to understand the old data (and logic).
The SQL script has no foreign keys, but noticed XMLs annotated with models with fields and their relationships for Hibernate.
What's the easiest way to generate model diagrams from these Hibernate XMLs? DjangoGraphviz could be installed to generate models diagrams in a moment. Is there a similar method/tool with Hibernate?
With Hibernate you have Java references between the entities, so any tool visualizing class dependencies might help.
I'm the author of it so I obviously recommend Degraph, but there are many out there. Just google java dependency visualization.
i don't now of any tools to do that in a straight forward way.
you could of course do it on your own. for example use xslt to transform your xml-mapping files to the graphml (xml) format and use a tool like 'yed' (https://www.yworks.com/en/products/yfiles/yed/) to layout and draw a nice diagram.
as a tool to understand legacy code doxygen has served me well because it allows you to browse the package structure, the source, the javadoc and generated UML Diagrams at the same time.
if you need to understand the structures at a database level ... i found
Schemacrawler quite helpful.

Regarding generating diagrams of flows between the different java classes

I have a project in which there are many different packages, and in those packages there are different Java classes along with interfaces.
I want to draw the class diagram and the relationships between the classes and interfaces, and how the methods flow.
So please advise me a tool which I can install in my Eclipse that will generate those diagrams specially the freeware plugin..!!
Check Visual Paradigm. It is very user friendly and free tool.Since you are using eclipse you can use the Eclipse Plugin for visual paradigm.
I use ObjectAid to reverse engineer the java classes to generate UML diagrams and it works pretty well, has an option to export the diagrams to image format as well.
If you are okay to NOT reverse-engineer the code and generate diagrams on your own from scratch, then [Violet UML Editor plugin for Eclipse] is a free UML tool. There is a jnlp version of this that can be run as an independent application, outside eclipse, too.

Generate UML from Java source

Because I have a big project I must generate the UML for this. Writing UML for 300 classes is overkill.
So is there any solution to generate the diagrams for me?
P.S.
I am using Netbeans.
Depending what you need the UML diagrams for, you might want to extract the concepts out of your "300 classes" and make the UML diagrams yourself- it probably helps finding architectural flaws also.
Mass converting Code to UML just for the purpose to have UML is usually not very desirable.
If you really need it, yes Enterprise Architect is a good way to go. - classic.
I think that Enterprise Architect by sparxx systems can create UML from Java classes
Try http://netbeans.org/features/uml/ It supports Reverse Engineering of code. Of course all you are going to get is Class Diagrams.
I prefer using Sybase Power Designer because it supports all types of UML diagrams. Please see wikipedia at http://en.wikipedia.org/wiki/PowerDesigner
PS: I am neither advertising nor associated with this company, but Power Designer has several features that I am fond of.
I found easyUML useful. It's really easy to use.

Generating Class Diagram

HI All I am at the end of the release of my project.So in order to keep working our manager asked us to generate Class Diagrams for the code we had written.Its medium project with 3500 java files .So I think we need to generate class diagrams.First I need to know how reverse engineering works here. Also I looked for some tools in Google(Green, Violet) but not sure
whether they are of any help.Please suggest me how to proceed.Also a good beginning tutorial is appreciated.
I strongly recommend BOUML. Its Java reverse support is absolutely ROCK SOLID.
BOUML has many other advanteges:
it is extremely fast (fastest UML tool ever created, check out benchmarks),
has rock solid C++, Java, PHP and others import support,
it is multiplatform (Linux, Windows, other OSes),
has a great SVG export support, which is important, because viewing large graphs in vector format, which scales fast in e.g. Firefox, is very convenient (you can quickly switch between "birds eye" view and class detail view),
it is full featured, impressively intensively developed (look at development history, it's hard to believe that such fast progress is possible).
supports plugins, has modular architecture (this allows user contributions, looks like BOUML community is forming up)
The tool you want to use is Doxygen. It's similar to Javadoc, but works across multiple languages. If figures out the dependencies, and can call graphviz to render the class diagrams. Here's an example of a few Java classes run through Doxygen.
This is more a toolchain than a tool and I haven't tried it out myself. But it maybe a starting point. Using UMLGraph, ant and GraphViz. Explained step by step: in this article.
I ve used Visual Paradigm for UML for what you want to do and it was quite good.
See here for details.
Just go Tools -> Instant reverse and select your packages.
You may be able to reverse engineer class diagrams with the open source modelleing tool ArgoUML http://argouml.tigris.org/
ObjectAid is pretty nice. You can drag classes into a diagram and arrange them the way you want.
Visual Paradigm for UML Standard Edition (or Better) will reverse engineer Java files in to Class Diagrams.
I guess if your boss just wants to keep you busy until the next project starts then there's no harm in it, but you will find pretty quickly that creating a class diagram with 3500 classes will tell you exactly NOTHING about your system. In fact, you don't really want a diagram with more than about 10 classes on it. So once you have reversed all the code into your modelling tool, you will want to start organizing and arranging to find the meaning. Create a new diagram, drop a single important class onto it and bring in all the classes that are directly related to that class. Repeat for maybe the 300 most significant classes. Don't worry, it isn't as horrible as it sounds, maybe a week's work.
For the record, my modelling tool of choice is Enterprise Architect by Sparx Systems. It will reverse java sources or .jar files. There is a free 30 day trial edition.
There are some tools available that will help you generate these diagrams. These cost money.
Otherwise you could to try to parse your Java files. This could be as simple to create a simple parser that reads the Java files and writes the name of the class and all the import statements to a file and generates a class diagram from there, graphviz can help you there.
I've been using Enterprise Architect for a number of years. A JBoss developer suggested it to me. It works very well for all types of UML modeling including the reverse engineering of class models (Java, C# and others). The basic version is currently $120 per seat, but it has most of the capabilities of much more expensive tools and it is much easier to learn. I particularly like its ability to generate HTML and RTF documentation.
It is very easy to synchronize code between the tool and your source code. Even bi-directional if you want.
Your PM may also like the activity and sequence diagrams that it can create. I also frequently use the deployment diagrams. It's very helpful to have all of this in one tool.

Does anyone have any experiences with Eclipse GMF?

I've just started to play around with Eclipse GMF.
Has anyone used the framework?
Any good or bad experiences you had using it?
Any alternatives for graphical modeling you could suggest?
EDIT: What good examples are available?
Has anyone used the framework? Yes, I am using it right now. It works, but it is typically quite a bit of coding for the graphical figures. I currently am struggling to leverage the IBM RSA/RSM UML editparts/figures/nodes etc built on top of GMF.
Any good or bad experiences you made using it? Looking back on my initial dives into GMF/EMF/GEF etc I can say for certain, study the examples. There are important patterns that you have to pick-up on from the examples and not the documentation. I would also suggest a new book (Eclipse Modeling Project: A Domain-Specific Language (DSL)) specific for GMF Modeling in Eclipse. I paged through it and it seemed to be the missing manual to some of the more basic concepts. Why the book is good is that is focuses on the key to making UML/Models useful through constraining it to a specific domain and providing a tool that only allows for valid models to be created. There is not a lot of documentation online and the API only tells you so much. WATCH OUT for repaint/paint loops caused by calling setBounds() or other set methods on children, it crashes the eclipse instance, not fun. Oh yes and the APIs are split between eclipse help documentation versions or not included at all.
Any alternatives for graphical modeling you could suggest?
Consider UML profiles with custom images and icons rather than full shape generation. It takes about 2 hours to put together a pretty good Image/Icon editor building on top of UML graphical objects and UML profiles. The IBM RSM tool UML Profile tooling project does this quickly. There is a lot you can do with constrained UML profiles (via Eclipse plug-ins or OCL). Entering GMF land is more than a order of magnitude effort increase, from 1 to 10 hours no problem.
Consider pure DSL (Domain specific language) tools out there. Google will provide a good list. From what I have seen the main reason to use GMF is eclipse integration and leveraging existing ecore/UML models, this is why I use GMF.
Ask yourself do I need model which is easy, or do I need a tool for creating instances of this model. If there are only 1-5 expert users there may not be a need for a sleek tool.
The TOPCASED project makes use of GMF. It provides various graphical editors for UML and other diagrams.
With GMF, most of the editor code is generated for you, but the main complexity arises from having to modify it.
As most recent alternatives, you might try Graphiti and Spray. Here is a comparison and another between GMF and Graphiti.

Categories

Resources