file What kind of diagrams, besides classes, do you need to do to generate code?

1 month 3 weeks ago #6512 by plo
Hello. I study programming and UML. Please tell me, from which diagrams, besides the class diagram, can I generate code for creating software? If I make a class diagram, what other diagram should I make along with it for the same project to make good software?

Please Log in or Create an account to join the conversation.

1 month 3 weeks ago #6513 by aleb
Hi plo,

Class diagram are enough to generate code.

BR
aleb
The following user(s) said Thank You: plo

Please Log in or Create an account to join the conversation.

1 month 3 weeks ago #6515 by Robert Hairgrove
As already mentioned, you can create some code already just with class diagrams. This will allow you to define some structures, classes, and namespaces.

But in order to create implementations that actually do something, you'll need some behavioral aspects which are usually defined by sequence, collaboration, or activity diagrams.
The following user(s) said Thank You: aleb, plo

Please Log in or Create an account to join the conversation.

1 month 2 weeks ago #6518 by plo
Thanks for the information. A diagram of components may be needed when generating code?

Please Log in or Create an account to join the conversation.

1 month 2 weeks ago #6519 by Robert Hairgrove
It depends perhaps on how many (or how important they are) third-party libraries, etc. you use in your application. If everything is self-contained, you might not need them. Otherwise, one could make a case for having a few component diagrams showing the dependencies between your application and the libraries you are using.

If you are writing a library instead of an executable application, the perspective might be reversed: i.e. one would want to show how other applications could use your library, perhaps without actually generating the code for that use case.

I did not mention use case diagrams before, but this would also help to visualize the user-interactions (even if the "user" is some other component, e.g. the operating system or an external application). They would also fall under the category of behavioral modeling.
The following user(s) said Thank You: plo

Please Log in or Create an account to join the conversation.

1 month 2 weeks ago #6520 by plo
Is it possible to generate code from a diagram that depicts functions rather than classes? What type of diagram can be used to depict analogs of a function, or just to end up with code without classes and functions that we wrote too?

Please Log in or Create an account to join the conversation.

Moderators: tma
Time to create page: 0.041 seconds
^ Back to Top