aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes How to generate Use Case diagrams automatically from java code using Visual Paradigm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "How to generate Use Case diagrams automatically from java code using Visual Paradigm" Watch "How to generate Use Case diagrams automatically from java code using Visual Paradigm" New topic
Author

How to generate Use Case diagrams automatically from java code using Visual Paradigm

murali kankanala
Ranch Hand

Joined: Nov 15, 2004
Posts: 110
Hello friends,

I want to generate the Use Case diagrams by reverse engineering with Visual Paradigm. I already generate the Class diagrams in the reverse engineering.

But i could not found any steps to get the Use Case diagrams. if any one have the solution for this please reply.

advance thanks to all friends here.

regards,
Mr.Lee
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
It's simply not possible.

Class diagrams can automatically be reverse engineered because they reflect the static structure of the code. (Though in my humble opinion, the value of such diagrams that match the structure directly, without any abstractions manually inserted by a developer, is quite questionable.)

Use Cases, on the other hand, reflect the requirements of the users - what they typically want to do with the system. As this isn't encoded in the code, it also can't be reverse engineered from it.

An experienced developer probably can guess some basic use cases from seeing the code and/or the system in action, but the only reliable way is to interview a domain expert/the users.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Udayan Patel
Ranch Hand

Joined: Oct 14, 2004
Posts: 94
Originally posted by murali kankanala:
Hello friends,

I want to generate the Use Case diagrams by reverse engineering with Visual Paradigm. I already generate the Class diagrams in the reverse engineering.

But i could not found any steps to get the Use Case diagrams. if any one have the solution for this please reply.

advance thanks to all friends here.

regards,
Mr.Lee


Can you read my mind?
Sathya Srinivasan
Ranch Hand

Joined: Jan 29, 2002
Posts: 379
In general, I am not even sure if that would make any sense. As Ilja said, Use cases reflect requirements in a relatively abstract manner (Ex. User gets records) and code reflects implementation taking a whole bunch of things into consideration.

The closest approach I can think off-hand would be to look at the controller classes and see what their methods say. These would typically be your triggering methods and hence, might come close to use cases. However, this won't get the universe of use cases.


Cheers, Sathya Srinivasan - SCJP 1.2, SCWCD 1.2, SCMAD 1.0
Co-Author of Whizlabs SCMAD Certification Exam Simulator and SCMAD Exam Guide Book
murali kankanala
Ranch Hand

Joined: Nov 15, 2004
Posts: 110
you are right llja Preuss, But here the reason why i am asking is - we want to purchage Visual Paradigm if it supports reverse engineering for Use Case diagrams as well as Sequence diagrams.

At least can Visual Paradigm support Sequence diagrams generation by reverse engineering ???

Our product is under Beta testing. Coding part is over. So we dont have the time to go back and design the Use Case && Sequence diagrams for all the classes.

Thanks to IIJA PREYSS , SATHYA SRINIVASAN AND UDAYAN PATEL for your kind information
Sathya Srinivasan
Ranch Hand

Joined: Jan 29, 2002
Posts: 379
Originally posted by murali kankanala:

Our product is under Beta testing. Coding part is over. So we dont have the time to go back and design the Use Case && Sequence diagrams for all the classes.


Since you haven't written use cases for your product already, I am assuming that you have some other form of documentation that lists the requirements. I would suggest that you infer use cases from those requirements from that document and draw them using Visual Paradigm.

No tool, Visual Paradigm or otherwise, to my knowledge, can reverse engineer use cases from code.

Sequence diagrams can technically be reverse-engineered from code (say, pointing at a method and asking it to find references). So far, I haven't come across a tool that would do that. You might want to check Visual Paradigm's manual.

If you are intent on purchasing the software, then I suggest that you simply mail the VP folks. I am sure they would be more than happy to explain the virtues of their software!!
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by murali kankanala:
Our product is under Beta testing. Coding part is over. So we dont have the time to go back and design the Use Case && Sequence diagrams for all the classes.


What will the diagrams be used for?
Francis Shillitoe
Greenhorn

Joined: Aug 30, 2002
Posts: 22
Rational XDE can generate sequence diagrams from code. Basically, you use a record function in the tool, which links into the JVM of the running application. Then you run through a scenario in your application and XDE models it as a sequence diagram. You'll just want to run through a few key scenarios to describe the essence of your application. Genrating too many sequence diagrams won't necessarily aid others understanding of your application.

Francis


<a href="http://www.shillitoe.com" target="_blank" rel="nofollow">http://www.shillitoe.com</a>
 
wood burning stoves
 
subject: How to generate Use Case diagrams automatically from java code using Visual Paradigm