Omnigraffle Classes Diagram to code

10,089

Solution 1

I don't think you'll manage this. Special computer-aided software engineering tools like Rational Rose will allow you to do this but OmniGraffle is really just a graphics tool. It can read various formats (like DOT) but that's about as far as it goes.

One reason for this is that proper CASE tools don't just do graphics, but also represent and enforce semantic constraints on the structures you can create. Enforcement is important if your diagram is going to create real, meaningful code. Omnigraffle doesn't really care what you type in text fields, or what you connect to what.

Also, UML is for object orientation, like C++, Java, C#. If you created a class in Rational Rose, it would be obvious that it should create a class in C++/Java/C#.

It's not suitable for C in any case, as OO isn't a feature of the language. How would you expect it to represent a class? Lots of extra boilerplate template code would be required.

Solution 2

I think this is about the best available support for UML in OmniGraffle at the moment, but it's just a stencil, no automatic analysis, obviously.

As for actual UML tools, the most comprehensive and the best value for the price is Enterprise Architect from Sparx Systems.

At the other end of the sophistication (and price) spectrum, but still a "real" UML diagramming tool is WebSequenceDiagrams. This is a pretty amazing tool for turning very concise descriptions (purely textual) into nicely rendered diagrams. The number of different diagram types available is very limited, but within those limits, what it does is actually very impressive, at least to me. Because it includes interaction diagrams (free, with some feature limits), it provides what I consider the most valuable part of UML, since understanding the interactions in an unfamiliar (or formerly familiar) body of code is usually the most important and the most time-consuming aspect of working with that code successfully.

Share:
10,089
Lexandr
Author by

Lexandr

Updated on July 17, 2022

Comments

  • Lexandr
    Lexandr almost 2 years

    I make my UML class diagrams with OmniGraffle Pro tool, but I would like to make C like code from it's diagram automatically. Maybe anyone know how I can make this?
    Thanks.

  • Lexandr
    Lexandr about 11 years
    Thanks for answer and recommendation of program.