Results 1 to 3 of 3

Thread: SWF Architecture question 1 - Singleton

  1. #1
    Join Date
    Sep 2004
    Posts
    133

    Default 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. #2
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    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.
    Keith Donald
    Core Spring Development Team

  3. #3
    Join Date
    Sep 2004
    Location
    Leuven, Belgium
    Posts
    1,853

    Default

    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

Similar Threads

  1. Is a 'singleton' flow a bad idea?
    By akw in forum Web Flow
    Replies: 4
    Last Post: Oct 6th, 2005, 01:16 AM
  2. Replies: 4
    Last Post: Oct 5th, 2005, 11:04 AM
  3. EHCaching Hibernate
    By dencamel in forum Data
    Replies: 3
    Last Post: Sep 6th, 2005, 09:03 PM
  4. Replies: 6
    Last Post: May 25th, 2005, 01:56 AM
  5. DefaultAdvisorAutoProxyCreator skipping beans
    By youngm in forum Container
    Replies: 6
    Last Post: Apr 12th, 2005, 04:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •