Good modeling/UML tool?

There’s an older thread on this topic but it didn’t lead to any real commendation. Did it?

Is there a good free modeling generator & editor available? It should be able to generate UML class diagrams from an existing source code project.

How do you developers out there manage this task? Usually you start to model some diagrams, then at some point you start to program, but forget to update the diagrams, and later on you see: oh well, 100 classes have been changed, and it takes ages to update the diagrams. :frowning:

So far I’ve worked with the following two free ones (the paradigm one provides a free community edition which lacks some functions) :
http://argouml.tigris.org/ and http://www.visual-paradigm.com/

Altough both look good, they don’t help me much, rather I feel it hinders me: at one point, when there are enough classes with connections, the whole sheet looks like “missile defense” in level 100 - lines all over the sheet etc. :slight_smile: The connector points jump around the class like mad when you take one class and move it around, etc.
Unbelievable. Am I just too silly to use these “tools” or are they … all “difficult to use” ?

I think I’ve to use pen & paper. BUT it’s 2003. So do I really have to do this? Oh dear.

I think it depends on what you use UML for. Personally, I use it as a structuring aid while designing (e.g. it help me think clearly) and as a tool to communicate ideas to other developers before we start coding or early on.

From personal experience, UML isn’t that great as a tool after development for potentionally teaching new comers how the system works, JavaDoc + a really good architecture document does a better job.

Free UML tools are rare, good free UML tools are rarer. I’d recommend the simple tool I started writing, but its not really aimed at doing reverse engineering.

I think you’ve found the two that are actually in any form complete and have free editions. Although I’ve tried them both and the interface alone puts me off.

I’m really glad you started this topic again,

Kev

I think the problem is that there really isn’t that much out there (that I have seen). Even the ones you have to pay (alot of money) for have their problems.

I would reccomend having a look at Kev’s UML editor. It is good for structureing ideas, it’s simple and easy to pick up. But as he said it’s not really aimed at reverse engineering though.

As I posted in another thread there is a tool for taking digital pictures of a white board and changing them to simple diagrams which seems a good idea to me. But it’s not really useful for home/hobbiest development, and it is quite costly :frowning:

Does any one else have any reccomendations/favorties? it seems to be quite an important aspect of design and is so unsuported.

regards,

Dan.

I use arouml (http://argouml.tigris.org/). it’s under the bsd license, but it’s not easy for a beginner :(.

[quote]Is there a good free modeling generator & editor available?
[/quote]
No. No matter how much you spend IMHO there are no good UML tools available. Well maybe pencil and paper… that’s the best so far.

Well thanks for your answers.

I feared it and now you say it…
:slight_smile:

I have used:

http://www.eclipseuml.com

on a number of occasions with great degrees of success. It uses EMF (http://www.eclipse.org/emf) to perform code generation and it uses an XMI repository (which is just dandy for conversions to other formats or enhanced code generation).

Not to turn this into another religious war, but I’m very sceptical about using UML for code generation.
UML is very good for discussing code design with other programmers, as it lets you quickly scetch the design on a piece of paper or a whiteboard… but the whole “gui-drag-windows-to-make-classes” approach of programming really bothers me. I believe the class relations should evolve over time from a bottom-up type design with constant refactoring.
If you spend a month designing everything before starting to implement it, the early showstoppers are going to rip the project apart and make management say nasty things.

Uh, sorry about the rant. :wink:

I do not use UML as code generation tool as of yet…I will be doing that once I have finished my J2ME 2D GameFramework library…

But the one UML tool I have picked up and it has a free community edition is Posiedon from Gentleware.com

Its based on Argos…

Its not integrated with eclipse as of yet however… I use via webstart…

Since it appears that Markus_Persson was aiming his rant in my direction I will footnote my statement slightly.

UML != class diagrams. This is a common misconception.

If I draw a state chart for example, what good is it to code it? I’m going to make 1000 mistakes and at the end of the day the usefulness of the UML is moot. Sure, I was able to visualize the structure but the whole point is to end up with code that produces some known result. So I use the state chart to generate the code in the same way that I use yacc to generate a parser (which is nothing more than an FSM). Not only does the generation guarantee me a result, I do not have the document legacy issue that is common with UML (i.e. the documents lag the implementation).

This same argument can be made for sequence diagrams, etc.

As for the common case, class diagrams, Eclipse UML does something that really no other UML editor has done before (yes, this is obviously my opinion): the diagram is the code and the code is the diagram. If you’ve looked under the covers of Eclipse and the AST you realize that Eclipse (specifically the JDT) isn’t just a glorified text editor; it acutally understands the structure of the code. The first time that you have an Eclipse UML window open and type “public class Blah” in your editor and a picture automatically appears in the window you think: OMG this is the way that it should be. And when you drop a class picture on to your diagram and the class appears in the editor you say something religious. No more documentation legacy issues. No more “did I code this to the UML” issues. The UML becomes part of your development just as a view of the class members or a type hierarchy have become part of development: just different ways of presenting the code to you visually.

When I tried Eclipse UML, code changes, e.g. a simple refactoring, did not update the diagram. That instantly rendered the diagram useless.
Am I missing something, or do you really have to manually regenerate the diagrams after every modification of the code?

TogetherJ has been doing this for years, and causing this same debate. It always seems to come down to opinion. Mine sticks me on Markus’ side.

Generating code from UML tends you towards thinking at too low a level during design stages. “If I just change that in mine design, the code will come out ‘right’”.

Maybe I’m just repeating my post above, oops, sorry…

Kev

[quote]Since it appears that Markus_Persson was aiming his rant in my direction I will footnote my statement slightly.
[/quote]
I wasn’t aiming it at you at all. I triggered mostly on the topic line, actually. =)

kevglass, don’t take this the wrong way, but step outside the box for a moment:

Perform your design phase using UML or rocks and sticks in sand – just make sure that you are performing a design phase. I don’t think that we’re in disagreement here.

Now, use something like Eclipse UML to generate you a diagram as you work and use the UML editor to facilitate writing code. Why should I go through the process of laying out all of the accessor methods, etc that I already know I need from the design phase in code form when I can do it 10x faster in a diagram? (yes, we start another thread about how fast you type and how slow UI’s are for “coding” :D) Ditto for the object structure. Ditto for the object relations. (Or, heck, just use the UML that you already have to create this inital structure for you.) Finish up your code using the synchronized UML view as a tool, just like a members view or a type hierarchy, to show you a more compact representation of the code.

Now the code is complete. Normally you use a set of unit tests and the whatnot to validate your code against the requirements. But lookie here! You have another validation technique! You hand the UML that was produced as you worked and the UML from the design phase to someone else and ask “Do these two look the same?”. (Yes, that’s an oversimplification. Flame me for my use of smilies and not that.)

And yes, Rational, TogetherJ, etc have all had UML ditties that spat out whatever you wanted. The point that I was making is that Eclipse UML is really going the other way; you have an IDE that you’re already working in and it added another view (again, just like a type hierarchy or a members list) of the code. I knew when I wrote that statement that it would be commented on which is why I explicitly stated that it was an opinion. We can debate opinions until the cows come home or just read the threads in which others have already said all that can be said on the topic. I retract my statement so that we can get back to the topic at hand.

Can we get some comments on the non-canonical UML case of class diagrams?

Let me quicly clarify my last statement to read:

Let’s get some comments on the use of code generation in the other UML diagrams (other than class diagrams).

[quote]kevglass, don’t take this the wrong way, but step outside the box for a moment:

Perform your design phase using UML or rocks and sticks in sand – just make sure that you are performing a design phase. I don’t think that we’re in disagreement here.
[/quote]
Actually… I dislike the idea of the designing the code before implementing it.
Sure, you have to design certain things like external interfaces before getting started, but I’m a firm believer in letting the code design itself through constant rewrites.
It takes about as much time overall, but the code is a lot less sensitive to sudden changes.

And, as we all know, sudden and random changes are not that uncommon. :wink:

Stepped :slight_smile:

This medium must be really awful at communicating intention. I wasn’t trying to put down your view, honest.

What I meant about TogetherJ, it does it both ways all the time… UML -> Code -> UML. Infact, its designed to cover the complete lifecycle, iterating over and over. Hence the comparison with what you were saying, about synchronizing both ways.

Coming to the end now, honest. I’m not saying there arn’t some great benefits to be had (time saving wise) by using tools that do this type of synchronising. Just that its not always that great since its easy to misuse.

Talking around subjects often helps me learn about things, so debating opinion is quite useful, at least I find it such. Going off topic seems to be a traditional round here :slight_smile:

I agree, we should probably get back on topic, just didn’t want you to think there was any negative intention hanging about…

Kev

kevglass: No negatives taken in any way. If we didn’t all have different opinions then we’d have nothing to learn from eachother. I “picked on” you as you walked down what I preceived to be a common path and that is that UML should only be used for design.

Markus_Persson: You actually made me shudder. You should really rethink your approach to development. As I tell all of the developers that work for me: coding (the actual sitting down at the keyboard) is the last step in the process of developement. You don’t hammer away at the keyboard until something you want comes out. I’ll stop here as this is a completely separate thread. If you want to “go at it” start up another thread and we’ll rumble :smiley:

swpalmer: classes don’t immediately show up in the diagram and that’s acutally nice as you can add only what you want. As for the internals of a class, the moment you press save they’re all there. It brings tears to ones eyes.

To be fair, often I find you’re starting on something totally new and alien, in which case sitting down and designing the whole thing from scratch tends to be impossible. Time like this the best approach seems to be to just jump in and hack out a quick prototype to get a general feel for the problem, and its particular quirks.

Then again, a few use case diagrams typically come in handy when you’re in this situation, but i don’t really count those as design, more as a list of things to bear in mind.

Orangy Tang: this is off-topic and we should start a different thread, but protoyping is definitely part of the design process. Take a look at RUP (the Rational Unified Process) or other such process to give you some background. Unfortunately, with most programmers the prototypes go directly into production with no other design.