I don't want my PHP coder to write Javascript anymore. I want to separate javascript coding and php coding. How should I write documentation about this interaction?
Let's imagine really simple ajax request. As for me documentation should contain sequence flow diagram.
- user is clicking "edit" button
- preloader is shown to user
- ajax request is sent to url /ajax_request/category/{category_id}/; we are expecting answer in json format
- 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."
- ajax request is recieved into var data
- hide preloader
- check if data.success is false then show alert "Something goes wrong."
- put data.html in container
As you see, it is really difficult to explain this flow in text format. I know there is UML for describing such things, but I have no experience. All UML samples are too simple and I can't understand how to build more complicated diagrams.
Please, anyone (UML expert), could you show me how UML diagram will look for my example.
I really appreciate any help. Thank you!