Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

How effective are automated round-trip tools for UML modeling? Do they help in coding quick, clean, efficient code? In what ways do these tools fit into the Agile methodology?

share|improve this question

closed as not constructive by Tom Squires, P.Brian.Mackey, Yannis Rizos, ChrisF Nov 24 '11 at 23:48

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
What more is there to UML than modeling classes/entities? "Round-trip" tools simply allow generation of code to models or visa-versa. It's still just modeling. I don't see how UML is related to a paradigm. It's just a means of creating a technical design which is a seperate process from the development paradigms used for overall process such as when to hit QA. "Agile" is not an excuse to skip the technical design process. Nor is waterfall's rigidity make it a requirement to have a technical design...its just good practice. –  P.Brian.Mackey Nov 22 '11 at 16:42
2  
@P.Brian.Mackey What more is there to UML than modeling classes/entities? Use case diagrams, activity diagrams, component diagrams all come to mind... –  maple_shaft Nov 22 '11 at 17:17
    
Can you try rephrasing your question? You currently asking for opinions not objective answers and your question risks being closed. –  Tom Squires Nov 22 '11 at 17:18
    
@maple_shaft - Good point, I forgot that those mechanisms belong to UML. The rest of my argument still stands. –  P.Brian.Mackey Nov 22 '11 at 17:21
    
@TomSquires, can there be an objective answer to such a question? It seems to me that it is a matter of opinion, based on relative experience... We are not all the same, and one man's/woman's experience (in our case with Agile programming + UML) is most likely going to be different. I had wished for some input in order to help me to decide. If my question warrants closing, then so be it. On the other hand, if you wish to rephrase it you are more than welcome to do so. –  Yaneeve Nov 22 '11 at 17:41
show 2 more comments

3 Answers

Part of the Agile Manifesto states:

Individuals and interactions over processes and tools
Working software over comprehensive documentation

It all boils down to the reason you're using UML. Everywhere I've worked that used it, it was used as an artifact to "prove" you had completed the design phase, then classes were generated and it was never looked at again because it was too much work to keep the two in sync. If that's how you're using it, that is decidedly non-agile.

On the other hand, if your team is that mythical creature who actually manages to keep their UML in sync, who constantly refers to it throughout the entire lifecycle, and would miss it when it's gone, that definitely fits with agile. Remember that tools and documentation are fine, even encouraged under agile, as long as it doesn't interfere with interactions and working software.

share|improve this answer
add comment

I fail to see how an UML round-trip synchronization tool would "help in coding quick, clean, efficient code".

Since we're talking agile practices, as far as TDD is concerned, what you often see (and it is promoted by people such as Bob Martin) is UML diagrams used merely as a sketching tool to flesh out the main classes before starting your TDD session. But these models more often than not prove totally wrong and become invalid as your code design incrementally emerges through the TDD process.

It's the TDD Refactor step combined with good coding practices that allows you to write "quick, clean, efficient code", not having ready-made UML diagrams and sticking to them while coding.

As for whether the UML models should be perfectly in sync with the code at any given time, I consider the benefits to be far less important than the cost. Unit tests are usually a better way of documenting the code IMO.

That's not to say higher level UML diagrams describing the architecture or use cases of the application aren't useful, though. But these are precisely too high-level to be used in round-trip generation.

share|improve this answer
add comment

I think there is a confusion when talking of live code and model synchronization. It is not a good idea to permanently synchronize your model with your code. I still remeber Togethersoft which was the best round trip tool but it was so slow and if the UML editor was not open then your model was not updated if new classifiers creation at code level etc....

There is a new initiative which is a mix of round trip and code generation on demand with java code and model merge. The mechanism is based on mapping each java classifiers Id to a model element Id. I mean that you reverse first time the project and get a single model. It creates UML Id for each java classifiers and sub-elements which is related to java id. Once this job has been done you can model or code with UML eidtor. When you want to update you just select the merge option which will incrementally creates new classifiers added at code level with existing classifiers already created in your model. You can therefore have as many as needed iteration between code and model.

What I like with this Id approach mapping each java Id to UML id is that UML is now like a java editor and you can graphically change in 5 seconds what will be over 30mn at code level because everything is refactored immediately and model integrity check. It means if what you do is not correct you can immediately get a warning. It is just at model level therefore no other tool to install. Very simple just a click on Model check option.

What I also like is to create a model independent of my code. No tag in my java code because all model information is the UML model which is a single model. I then can just extract model views graphically. These views are built on a model representing the full application and updated on demand when model merge is selected.

This is why UML ids merge with java Ids make UML efficient, faster to write code but don't try to replace the code by using code generation templates. I mean that UML ids are done as if you were codding at graphical level and certainly not try to generate the code.

I would say that traditional UML with code generation templates is like when you try to create HTML page from a word document automatically. It certainly works well but then you are stuck and can not change anything. It is also horrible code HTML quality. To avoid this problem of using code generation templates the UML ids to Java Ids merge make code the same as if hand codded. Really good quality.

Really very few UML initiative has been done on UML ids because the graphical layer is managing mapping (e.g. for example the GMF project used by Topcased or Papyrus) to the metamodel while it should be the model directly managing each UML and java ids working natively with no intermediate layers !!

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.