A diagram for Procedural PHP pages?

折月煮酒 提交于 2019-12-24 12:02:40

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!