Which notation or diagram can I use for description of the functions' structure?

97 views Asked by At

I want to know how I can put the following logic description into a notation or diagram:

The Search function one is the main function and gets triggered by it's Button:

An ajax call passes the Parameter to the Button handler Method in the back end. This Method calls 2 other Methods:

  • The first one check the parameter for values which are dangerous because of sql injection
  • the second Method is the FindAdressby Searchtext Web service. It creates on object of the dataquality server and uses it'S own webservices. It calls four of them.......
2

There are 2 answers

0
Geert Bellekens On

There are a lot of options in UML, but in this case I would probably go for a sequence diagram.

The sequence diagram can nicely show the different operations you call. You can add constraints or fragments to indicate special conditions, loops etc...

0
Gangnus On

UML can show structural information (classes, objects, components...) or behavioral information. (sequence, timing, state...). Your problem is that you want to show the structure of functions. There is no special UML diagram for it. But the problem is frequent enough, so, IMHO, it is a very useful question.

You have two ways:

  1. to include in the diagram the behavioral logic and show it by any of the behavioral diagrams. Thus the structure you are thinking about, will be somehow in the diagram, too. But there will be much more additional info and your real target will be somewhat or even totally hidden. It is not good.

  2. To use UML structure diagram in an uncommon way. It is normal. Nobody ever postulated that the class block means a Java class or a component block means a group of classes. It is for us to decide, what implementation we mean by a diagram element.

Let us decide for a component diagram. If you are planning functions structure, for you these functions are the components you are analyzing. And the task becomes a trivial one - you easily can show what function belongs or is called by another one by connecting components by usage and containment connections. As for buttons, they can be shown as classes blocks.

Only don't forget to write a legend below, for somebody will read your diagrams.