Question

I want to design my program with UML modeling but my programming language paradigm is procedural not object oriented. I hear many programmers say "UML is not only for object oriented programming." Is this True?

So, from where should I start? What diagrams are to be used for procedural programming. Please mention which UML diagrams are helpful.

Was it helpful?

Solution

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.

OTHER TIPS

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.

You could use a structured design, something like Jacksons is a good model to use. there are many software tools that know how to draw Jacksons structured Programming diagrams but you can't beat a pencil a rubber and a lot of paper, or even better a few white boards :)

Read more here

http://en.wikipedia.org/wiki/Jackson_structured_programming

UML may be useful to you for helping to design the entities in your database but it is not for structured programming it is an OO design tool.

Alternatively just use flow charts but they are not very structured and lead to lots of messy code but that's purely my opinion. Read more here

http://en.wikipedia.org/wiki/Flowchart

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top