Hello fellow jellyists,
 
Is anyone interested in a contribution of strategy support for Tags? I
have something that I think is *quite* useful.  It is simple, and
elegant (as Jelly is).  Extending TagSupport (StrategicTagSupport), and
TagLibrary (StrategicTagLibrary), plus the addition of a TagStrategy
interface, you can easily plugin the implementation you would like to
execute.  For example:
 
I am trying a simple, lean execution of xforms syntax on the server
side.  Adding an 'outgoing' TagLibrary that has the appropriate
strategies, jelly will walk the syntax (and my tags), executing the
strategy.  In addition, I can use the same tags, different strategies,
for the 'incoming' posted parameters.
 
I was struggling with my original solution of having tags populate an
object model, then writing the code to visit that model for either
outgoing or incoming requests.  Since I don't need that object model for
any other reason, and I don't want to write the tedious code to visit it
(especially since it won't be dynamic and change with the new tags), I
simply applied the strategy pattern, which cleaned it up quite a bit,
not to mention the flexibility of any implementation.
 
If you are interested, let me know and I'll ship the classes
(somewhere).
 
 
Kevin Ross

Reply via email to