By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,713 Members | 1,265 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,713 IT Pros & Developers. It's quick & easy.

UML to Python/Java code generation

P: n/a
Hi,

Is there any UML tools that is able to take UML and generate Python codes?

Cheers
Maurice
Jul 19 '05 #1
Share this Question
Share on Google+
9 Replies

P: n/a
There is tool to generate UML from Python Code...

"Maurice LING" <ma*********@acm.org> wrote in message
news:d8**********@domitilla.aioe.org...
Hi,

Is there any UML tools that is able to take UML and generate Python codes?

Cheers
Maurice

Jul 19 '05 #2

P: n/a
Enterprise Architect (http://www.sparxsystems.com.au/) supports an
add-in that will generate Python from UML diagrams. Once you install
EA, follow the instructions for adding the Python technology resource,
which is a free download from the EA website.

Will also generate UML from Python source.

You'll need to buy the Professional Edition to get code import/export,
US$189, but it is an excellent tool!

-- Paul

Jul 19 '05 #3

P: n/a
> Is there any UML tools that is able to take UML and generate Python codes?

Dia2code generates Python from UML.
Boa Constructor generates UML from Python.
PyUt.
Object Domain's UML Tool (Commercial)

You need to use Google.

Jul 19 '05 #4

P: n/a
Thanks James. I've googled a few times and it is always tools that
generates UML from Python codes that comes up in the top hits, which
brings me to wonder if there is something that does the opposite.

maurice

James wrote:
Is there any UML tools that is able to take UML and generate Python codes?

Dia2code generates Python from UML.
Boa Constructor generates UML from Python.
PyUt.
Object Domain's UML Tool (Commercial)

You need to use Google.

Jul 19 '05 #5

P: n/a
"Grigoris Tsolakidis" <gc*********@hotmail.com.spam-remove> writes:
There is tool to generate UML from Python Code...


The best is human brain.
Jul 19 '05 #6

P: n/a
Peter Dembinski wrote:
"Grigoris Tsolakidis" <gc*********@hotmail.com.spam-remove> writes:
There is tool to generate UML from Python Code...


The best is human brain.


No! It isn't. In fact, it's the worst.

The brain may be fine for generating Python from UML but it is MANY
MANY orders of magnitude harder to generate UML from code with just
your brain than using a tool (usually zero effort and error free) no
matter how good you are at Python.

Jul 19 '05 #7

P: n/a
James wrote:
The brain may be fine for generating Python from UML but it is MANY
MANY orders of magnitude harder to generate UML from code with just
your brain than using a tool (usually zero effort and error free) no
matter how good you are at Python.


I've really only used Rational Rose, but that tool is
really limited in both directions. Class structure to
class diagrams work both ways (not for Python, but for
Java and C++ at least) but that's just a tiny part of
UML.

I don't expect any tool to do anything meaningful about e.g.
use case diagrams, but what about activity diagrams, sequence
diagrams, collaboration diagrams and state diagrams?

I agree that the brain is poor at such things, but I doubt
that any current tool is much better except for trivial
subsets of UML.
Jul 19 '05 #8

P: n/a

"Magnus Lycka" <ly***@carmen.se> wrote in message
news:42**************@carmen.se...
James wrote:
The brain may be fine for generating Python from UML but it is MANY
MANY orders of magnitude harder to generate UML from code with just
your brain than using a tool (usually zero effort and error free) no
matter how good you are at Python.


I've really only used Rational Rose, but that tool is
really limited in both directions. Class structure to
class diagrams work both ways (not for Python, but for
Java and C++ at least) but that's just a tiny part of
UML.

I don't expect any tool to do anything meaningful about e.g.
use case diagrams, but what about activity diagrams, sequence
diagrams, collaboration diagrams and state diagrams?

I agree that the brain is poor at such things, but I doubt
that any current tool is much better except for trivial
subsets of UML.


Have a look at Enterprise Architect from Sparx Systems
(http://www.sparxsystems.com.au).
It is a really nice UML tool that is also affordable. I have also used
Rational Rose since about 96-97, and although it doesn't have Python support
for code generation, it most likely isn't a huge job to modify one of the
existing code generation templates (say the Java one) to generate Python
from the class diagrams.

Enterprise Architect has a separate free downloadble plug-in which can
generate Python.
See: http://sparxsystems.com.au/resources/mdg_tech/

Enterprise Architect is also much cheaper than Rose, and they can both do
C++ and Java.

Also, both of these tools have VBA/COM interfaces. What this means is that
you can control them and read data directly from them using the win32 python
extension models.

I haven't tried it with EA, but a couple of years ago I wrote Python scripts
that controlled Rose.
I did stuff like creating UML diagrams on the fly including changing colours
and shapes, and also reading data from UML models. The Rose Extensibility
Interface (REI) is very well documented.

One could potentially write Python scripts coupled with some Python
introspection/reflection code to automatically generate and reverse engineer
(and document) Python <-> UML. It was always something I wanted to do but
never got around to it.

Mike
Jul 19 '05 #9

P: n/a
Try this:
http://uml.sourceforge.net/index.php

Regards,

Philippe

Maurice LING wrote:
Hi,

Is there any UML tools that is able to take UML and generate Python codes?

Cheers
Maurice


Jul 19 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.