Hi Marcus,
thanks for your suggestions. Doing this completely automatically
doesn't fit with the approach of RIFE. Also, it would prevent certain
functionalities to be implemented, such as the interruption of a
dataflow. It's not because the inputs and the outputs are there, that
the data actually has to be passed on all the time.
However, I can see the benefit in a reduced notation, I therefore
propose this when done fully in the site structure.
Site declaration:
<element id="source" implementation="test.Source">
<output name="id"/>
<output name="name"/>
<autolink srcexit="destination"/>
</element>
<element id="destination" implementation="test.Destination">
<input name="id"/>
<input name="name"/>
</element>
The exit will be automatically created, just as what's currently done
for the flowlinks. However if the elements are in separate files, it
would look like this:
Element declarations:
<element implementation="test.Source">
<output name="id"/>
<output name="name"/>
<exit name="destination"/>
</element>
<element implementation="test.Destination">
<input name="id"/>
<input name="name"/>
</element>
Site declaration:
<element id="source" file="source.xml">
<autolink srcexit="destination"/>
</element>
<element id="destination" file="destination.xml"/>
Optionally, the autolink tag would support a destid to only let the
inputs and outputs be linked automatically and allow the exit to be
pointed elsewhere.
This would fit in the philosophy of RIFE and still offer you want you
are looking for, no?
Best regards,
Geert
PS.: what do others think of this suggestion?
On 27-jan-06, at 14:31, Pazu wrote:
While writing my first RIFE application, I found myself writing too
much configuration. I know all the arguments in favor of the verbose
site structure declaration, but sometimes I feel I'm entering too much
redundant information. Why not apply some defaults:
1) If an element has a declared <exit>, try to automatically link it
to an element with the same name:
Element declaration:
<element implementation="test.Input">
<exit name="output"/>
</element>
Site declaration:
<element id="input" file="input.xml">
<flowlink srcexit="output" destid="output"/> <!-- this seems sooo
redundant to me -->
</element>
2) The same goes for datalinks: if there's a flowlink between two
elements (declared explicitly or as suggested above, why not
automatically link the source element outputs with destination element
inputs with the same name?
Element declarations:
<element implementation="test.Source">
<output name="id"/>
<output name="name"/>
<exit name="destination"/>
</element>
<element implementation="test.Destination">
<input name="id"/>
<input name="name"/>
</element>
Site declaration:
<element file="source.xml">
<flowlink srcexit="destination" destid="destination"/> <!-- duh -->
<datalink srcoutput="id" destid="destination" destinput="id"/> <!--
say again? -->
<datalink srcoutput="name" destid="destination" destinput="name"/>
<!-- I kenna hear ya! -->
</element>
Just think how much cleaner these declarations above would be if
flowlinks and datalinks were "autowired" based on naming conventions.
Please notice that we're not losing track of the site structure: the
inputs, outputs and exits are still declared -- it's just their links
that would be automatically wired.
-- Marcus Brito
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users
--
Geert Bevin Uwyn bvba
"Use what you need" Avenue de Scailmont 34
http://www.uwyn.com 7170 Manage, Belgium
gbevin[remove] at uwyn dot com Tel +32 64 84 80 03
PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9
Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users