« Return to Thread: Configuring RIFE in Spring

Re: Configuring RIFE in Spring

by Freddy D. :: Rate this Message:

Reply to Author | View in Thread

Hi Geert,

> I'm not a Spring user, so I can't anticipate if this API will work, but
> I don't see a reason why it shouldn't.
>
> Can you try it out with the SiteBuilder API and see if it work?
>
> Thanks and good idea!
>
> Best regards,
>
> Geert

Thanks for considering this possibility. I got my example to work by building
a 'bridge' between Spring and the SiteBuilder API in the form of simple beans
and a 'worker class' (the ParticipantSpringCfg), as you saw in my code.

At first thought, I don't think it's possible (or if it is, it would be
difficult/tedious) to get Spring to work directly with the SiteBuilder API.
I could be wrong, but consider that Spring basically instantiates beans, either
with default or parametrized constructor, and then calls setters to establish
the bean's properties.

This does not fit well with something like:

builder
  .setArrival("START")
           
  .enterElement("START")
    .setImplementation("tutorial.numberguess.Start")
    .addInput("gameid")
    .addFlowLink("started", "GUESS")
  .leaveElement()
  .enterElement("GUESS")
    .setImplementation("tutorial.numberguess.Guess")
    .enterSubmission("perform_guess")
      .addParameter("guess")
    .leaveSubmission()

because you are not only calling setters, but also other methods (addXXX,
enter XXX), and not only that, but calling methods on the returned objects
(nested elements, submissions, etc.) and then calling leaveXXX() to continue
working with the parent object.

Maybe it's possible with Spring but as I said I think it would be difficult,
or at the very least it would be less natural than declaring beans such as
in my example, which is structured more like this:

"here is element X":
  -set a property
  -set another property

"here is element Y":
  -set a property

"here is my site":
  "here are its elements":
    -element X
    -element Y

etc.

Here only plain setters on beans are called.

I'll investigate more on this, but I'd like to know what you think?

Thanks again,

Frederic


_______________________________________________
Rife-devel mailing list
Rife-devel@...
http://lists.uwyn.com/mailman/listinfo/rife-devel

 « Return to Thread: Configuring RIFE in Spring

LightInTheBox - Buy quality products at wholesale price
 
 
 
Google
rifers.org web