« Return to Thread: Configuring RIFE in Spring

Configuring RIFE in Spring

by Freddy D. :: Rate this Message:

Reply to Author | View in Thread

Dear fellow RIFERS,

Just wanted to run this idea by you and get your comments. I hope this
is the correct place to do so.

I'd like to present to you a simple idea to add a configuration
option to RIFE.

If you're already groaning (oh no, not YET another configuration
option!), please know that I don't think there is anything wrong
with the available options. In fact I like the XML files myself.

To save you time, though, I'll tell you right now not to read this
post if you don't care for Spring (or similar DI containers) or for
another configuration option in RIFE.

Now, if you're still here..

Just like what happened with the template syntax, it may be good to
provide options which could appeal to certain developers, in hopes of
increasing the number of RIFE users. (By the way, while at first,
like many, I didn't like the original template syntax, after working
with RIFE for a while, I actually find the original syntax to be the
best, it's very easy to highlight differently in VIM and it stands
out from the rest of the template. For what it's worth.. I'm one of
those who do like the original syntax :)

So about the different configuration options, it was in fact
recently discussed here:

http://www.theserverside.com/news/thread.tss?thread_id=39731

My proposal is to add an option that enables you to configure your
RIFE site and elements in Spring (or possibly another DI container.)
This may appeal to fans of Spring, to be able to define their RIFE
components in a Spring XML file with the rest of their beans, and
this may bring such developers to 'get' RIFE as a framework that lets
you assemble your web apps with RIFE components and connect them with
flow links and data links. Being able to integrate the configuration
of RIFE components along with the rest of the program, instead of
having another separate set of config files, could be appealing to
Spring users.

To do so would be simple: define Spring-friendly configuration
classes, and use them to build your site.

I've included a (very) simple example as a 'proof of concept'. It
includes 3 config options: original RIFE XML files, Java code, and
Spring. Simply by changing the commenting out in rep/participants.xml
you can switch between each. The Spring config is in
applicationContext.xml. To run the example, you have to add
the RIFE jar and spring.jar in WEB-INF/lib.

Of course, this option is considerably MORE verbose than original
RIFE XML files. As I mentioned earlier, I DO prefer the original
config myself. But, it can't hurt to make a Spring config option
available....can it?

By the way, my implementation is most probably not optimal, so if you
have any suggestions about this, I'd like to learn. Especially on the
configuration of the participants.. right now I have a property to
tell what is the name of the SpringWeb participant, and a parameter
to tell what is the name of the root bean that contains the site
config. If there is a better way to achieve this, by all means, please
let me know.

Of course, additional *Cfg classes and their properties would be
needed, I just wrote a small subset to start.

It's also possible that this is already possible with RIFE and I
didn't know.. if so please enlighten me!

So I'd appreciate your thoughts..
Thanks in advance for your feedback!

Frederic
--
 
  xf2697@...



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

rifespring.war (27K) Download Attachment

 « Return to Thread: Configuring RIFE in Spring

 
 
 
Google
rifers.org web