views:

3124

answers:

6
+3  Q: 

UML for Ruby

Could any one recommend some good UML/modeling tools for Ruby and Ruby on Rails? Edit: would be nice to generate code from UML diagrams as well as generate diagrams from existing code.

A: 

What do you mean by "for Ruby"? UML is language-agnostic.

Based on your comment - UML is a generic, language-independent model. It's designed (from my understanding) to be used before an implementation language is chosen, so not all of the UML elements have corresponding elements in all languages (eg - interfaces in Ruby). However, that doesn't mean that you can't make UML models and implement the system they describe in Ruby.

I recommend StarUML for all UML needs.

Thomas Owens
Ruby does not have interfaces but does have mixin.. im not sure any UML tools support that. Also it would be nice to generate diagrams from the code, so it needs to work with ruby code and many tools are not language-agnostic.
Jimmy
+1  A: 

Do you meant to ask for a tool which transforms UML into ruby code?

I dont think there is any at the moment. But its a very good application idea :)

I have found the ruby-uml

Generates uml diagrams by tracing the run of an application for analysation of an existing application and to provide support for refactorisations.

Prakash
+2  A: 

Visual Paradigm is a Mac application and will do this for you.

Somewhat OT, but the best UML tool I've found is called Enterprise Architect -- it's a Windows application, and it costs around $130 for a basic license. It doesn't do Ruby, but it does do Java, C++ and a host of other languages, including full database to SQL, both generation and reverse engineering. It's worth a look.

Will Sargent
+1  A: 

Railroad generates UML class diagrams for Rails applications, including Models and Controllers, you might want to take a look at http://railroad.rubyforge.org/

Federico Builes
A: 

I think you might get some mileage from http://yuml.me all you would need to do is output some text.

A: 

I personally use Enterprise Architect for C++, C# and JAVA. It's probably the best UML tool out there.

If I understand the requester correctly, he is looking for a UML round-trip tool for Ruby (and probably Ruby on Rails). I'm looking for just that myself. By round-trip I mean able to forward and reverse engineer Ruby on Rails so I can define my classes (controllers, views and models) in UML, forward engineer them, play in the code, and then reverse engineer it back into UML (sync the model to the code). Ideally, the tool could use the XMI standard (UML XML).

Anyone have any ideas on this?

Devin Hedge