How to generate UML diagrams programmatically in Java?

In a Java project, is it necessary to draw UML diagrams before writing code? Or just write your code and then when the project gets bigger, you make more abstractions and draw UML for it?

  • Answer:

    My advice would be to do what's necessary to reach your goal with maximum result and minimal effort. If you're going to build an enterprise application that has to last for decades and must be easily maintainable it makes more sense to design before starting to build. If it's just a piece of code performing a fairly simple task you might want to skip it.

Robin Verlangen at Quora Visit the source

Was this solution helpful to you?

Other answers

As Robin mentioned above, it's depends on the project. If it is bigger and complex or there is a need for multiple personals going to work on it, you need to have the UML diagram. It'll make easy to anyone who is interested in the project to understand the structure. Finally, If you are gonna maintain it for a period of time, provide app supports, you must need this diagram. By the way, it is the easiest method to explain your project to your client.

Anbu Jey

It depends, though I would recommend writing the UML diagram beforehand. The UML diagram will show you how your classes relate and how you will used them, which is even more useful when you have to add on to your code.

Ryan D'souza

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.