Abhay Chennagiri
Abhay Chennagiri

Reputation: 37

Code Generation for Deployment Diagrams

I know that there are tools which can be used to generate code for Class Diagrams and Statechart Diagrams but I wanted to know whether there is any tool that can be used to generate code for deployment diagrams as well.

Upvotes: 0

Views: 327

Answers (1)

nakosspy
nakosspy

Reputation: 3942

No, there is no such tool. And the obvious reason is that a deployment diagram does not describe code, it describes a deployment structure, servers, components etc. Even though usually there are some scripts relevant with any deployment, several other actions are required as well when you deploy something (setting up servers, copying resources etc).

On the other hand, class diagrams and sequence diagrams describe structure and interactions of code artifacts. A class diagram describes class definitions. A sequence diagram describes a method of a class. This is why you can find tools that generate code from those types of diagrams.

There are also tools that generate code from state diagrams, but this is not a generic functionality. You can't generate code from any state diagram, because the elements of a state diagram do not correspond to specific code artifacts by definition. Only if a state diagram is defined in a specific context and then you have tools for code generation specific to this context.

Example: You describe the flow of screens in a UI as a state diagram with each screen represented by a state, and you have a tool that can convert this type of diagram to some type of UI code as web forms or JFrames.

Upvotes: 1

Related Questions