问题
I have an application made with php. It is not object oriented. But there is a logic between pages. Example: if connected go to page A , else go to page B
Is there any diagram to represent this logic between php pages? Can I use UML sequence diagram in this case even without POO ?
回答1:
You could use a wireframe profile for this. Each screen is a class (which might consist of classes for widgets). Now you may use controller classes, if if you had coded the, procedural. That could show the static part of the system.
The dynamic part (switch between screens) can be shown with an activity diagram. Just like "this happens" as vertex and "menu shown" as action.
回答2:
"historically", this is modeled by state machine : a state is a screen and transition model how to go to on state to another one.
The events of this states machine are those of the UI. The effect could be the call done by ui element but this is not exactly conform to the norm.
see previous question
回答3:
You have a directed graph where the nodes are pages and the vertices are events. If you look at your pages like objects, then you can create an Object Diagram, even though the implementation is not OO.
来源:https://stackoverflow.com/questions/47486093/a-diagram-for-procedural-php-pages