【问题标题】:When to use Spring Web Flow?何时使用 Spring Web Flow?
【发布时间】:2014-11-19 09:14:48
【问题描述】:

我对这个框架(spring web flow)很感兴趣,我想知道什么时候最好使用spring flow,如果它有帮助,什么时候真的很方便?

还有,还有其他解决办法吗?

问候

【问题讨论】:

标签: spring flash spring-webflow


【解决方案1】:

当您的应用程序遵循某种特定类型的流程来实现某些目标时,您应该选择 Spring webflow。否则在简单的应用程序中不需要它。

例如,如果您需要按以下多个步骤执行用户注册过程。

  1. 个人资料。
  2. 教育详情。
  3. 公司详情。
  4. 联系方式。

如果您需要在另一个步骤中获取每个步骤的数据,那么使用 Spring webflow 是可以接受的。

希望这对您有所帮助。 干杯。

【讨论】:

    【解决方案2】:
    Spring Web Flow is allowing you to represent the UI flow in a web application
    in a clear and simple way. This has several advantages:
    
    The UI flow in a web application is clearly visible by looking at the 
    corresponding web flow definition (typically in an XML file).
    
    Web Flows can be designed to be self contained.
    
    This allows you to see a part of your application as a module 
    and reuse it in multiple situations.
    
    
    <transition on="enrollCustomer" validate="false" to="redirectToEnrollCustomer" />
    
    <action-state id="redirectToEnrollCustomer">
        <evaluate expression="customerAction.redirectPersonalDetails(flowRequestContext)"/>
        <transition on="success" to="toPersonalDetails"/>
            <transition on="educationSuccess" to="toEducaationDetails"/>
            <transition on="confirmationSuccess" to="toConfirmationDetails"/>
        <transition on="failure" to="enrollCustomer"/>
    </action-state>
    

    【讨论】:

      猜你喜欢
      • 2012-06-15
      • 1970-01-01
      • 1970-01-01
      • 2012-03-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多