0

我喜欢 Spring WebFlow 的想法——尤其是流定义从 Spring Bean Container 中的组件抽象出更高级别的 Web 流的方式。

流定义格式似乎包含了 Web 流中所需的一切——视图、操作、转换、子流、结果等。

您认为 Spring WebFlow 流定义格式是否适合将 Web 流外部化为非 Spring 框架?一些不使用 Spring 甚至 Java 的底层组件。

请记住,我只考虑页面流,而不是一般工作流或 BPEL 类型的东西

4

2 回答 2

1

自从构建第一个 Web 应用程序以来,状态机(如 spring webflow)已被用于描述 Web 应用程序流。所以是的,没关系。为什么不是每个人都这样做?我认为,当使用状态机来描述 Web 流时,形式主义倾向于过度使用。一开始是个好主意,但最终却变得更加痛苦。Ajax 和给定页面上的多个并发活动状态使情况变得更糟。

于 2009-01-13T13:27:29.440 回答
0

The biggest strength of the SWF in my opinion is that centralizes flow (navigation) in a single place and makes it explicit, easy to read, manipulate etc. It is well suited for more complex navigation flows where you might go back and forth between pages, or for wizard-like or step-by-step UIs. It also has some advanced reuse features like subflows and flow inheritance.

The concept of view state and action state well mimics user - web app interaction where transition to action occurs after user has created an event, then the next view is presented to a user and the machine is in a state waiting for next user event. It is important to note that these flows occur on server side. Everythnig seems to be moving to a client side these days and even so state machine can have its role. Flex for example has a concept of states and transitions. These should help programmer manage complex UIs with lots of controls. States can hide or display controls and much more. So, I’d say this can be a very neat paradigm for modeling flows and user interactions.

于 2009-10-19T21:37:32.873 回答