Kirzilla
Kirzilla

Reputation: 16596

Need critics, UML activity diagram (image inside)

Here is my question Interaction between HTML/Javascript coder and server scripting language coder?

I've decided to make activity diagram to describe this process

  1. user is clicking "edit" button
  2. preloader is shown to user
  3. ajax request is sent to url /ajax_request/category/{category_id}/; we are expecting answer in json format
  4. timer has started; if answer is not recieved within 10 seconds - show alert "Connection timeout, please try to refresh page and try one more time."
  5. ajax request is recieved into var data
  6. hide preloader
  7. check if data.success is false then show alert "Something goes wrong."
  8. put data.html in container

Here is my diagram ( my first UML diagram :) )

alt text http://img2.pict.com/a4/77/73/2821248/0/screenshot2b106.png

How do you think is it suitable for describing interaction between Javascript coder and PHP coder this way?

Any help is appreciated.

PS: Now I'm looking the way to describe data passed to server and recieved to server. Any ideas?

Thank you.

Upvotes: 2

Views: 1078

Answers (1)

djna
djna

Reputation: 55937

Your diagram does represent what you are trying to communicate - the sequence of actions the Java script programmer should implement. Look at the diagram does it say much more than the text? Do you think it's so much easier to read? Personally, I find diagrams like this not too useful. My suugestion would simply be to use a storyboard, drawn in Vision or powerpoint or whatever.

You can use state diagrams to represent screen flows, but in todays Web 2.0 Ajax world things are not so screen oriented, so I'm inclined to use the storyboard instead.

I would use class diagrams to design significant objects: the service you are calling and the data passed to the service and from the service. If the screens are complex I might also have a class diagram for each screen making very clear what data is to be represented.

Upvotes: 1

Related Questions