Procedural Programming with UML Modelling

UML has many diagrams. Only class diagrams are done directly for OOP conception. Object and Composite structure diagrams are not so strict already.

All other diagrams can be used without and apart from the OOP. Sequence, Timing, Activity, Communcation, Use case, Interaction Overview, State Machine, Package, Deployment, and Component diagrams work OK.

So, the only diagram not for the direct use is the class diagram, that you simply needn't in the functional programming.


Yes, it is true, all of the diagrams in UML can be used for procedural languages. In fact, some UML modeling tools can actually generate C code from class diagrams!

I have diagrammed module interactions in C programs using sequence diagrams (modules are swim lanes, function calls are transitions). I have modeled structs in C and operations that change those struct's state with class diagrams. There are really endless possibilities.

The trick to making this work is to realize that these diagrams are used to help you think about the problem you are solving, and to help explain to others how you plan to solve it. If it accomplishes this task, then you are "doing it right" no matter what programming language you end up coding in.

Tags:

Uml