Announcement Announcement Module
Collapse
No announcement yet.
SWF Architecture question 1 - Singleton Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SWF Architecture question 1 - Singleton

    Hi ,
    l would like to ask an architecture question.
    l saw http://www.theserverside.com/news/th...hread_id=33787 , a person ask about support for webwork.

    If SWF integrated with Webwork , it has to make all the Actions a prototype , because of the design of Webwork. l learn Webwork recently and found that Webwork actions have state ( means they store data in properties/fields of the Controllers , then use a demon - ValueStack to pull and push the data out of the Controllers ) . Because it have state , this make them have to be prototypes if u wanna to reuse them.

    Form my previous post in other thread http://forum.springframework.org/vie...342&highlight= , l don't understand why controllers has to be a prototype to get reuse. I like SWF very much because it let me to reuse the same singleton controller many time in a flow ( this won't cause synchronize problem , because it is in a flow )

    Do your think that Controllers need states all the time ?
    If SWF and Webwork integrate this way , it will reduce reusability of the Controllers .

    moon

  • #2
    Well, we're certainly not going to change our Action model, where an action is more like a command than a MVC controller :-)

    You bring up a good point, though. Since in WW the actions are the model AND the controller, integration with SWF might be a bit different. I wonder if its possible to still have one generic WW action class act as a entry point for one or more web flows, but act in a prototype fashion.

    Comment


    • #3
      Actually, a statefull WW controller might map nicely to a SWF FlowExecutionManager. No need to go and store the state of an ongoing flow execution in the session, just store it inside the statefull controller.

      We'll have to see how that turns out once somebody tries WW integration.

      Erwin

      Comment

      Working...
      X