views:

313

answers:

1

Here is my question http://stackoverflow.com/questions/2251813/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

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.

+1  A: 

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.

djna
Frankly speaking the main idea is to describe the process for javascript coder. I'm looking for way to describe what should happen if user clicks some buttons etc.Please, could you tell me a little more about class diagram. Maybe some web-oriented examples? I always thought that class diagram will only show available classes and methods, but not the way they interact.Thank you
Kirzilla
I've found good examples at http://www.agilemodeling.com/artifacts/classDiagram.htm
Kirzilla