velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Eden" <>
Subject RE: Strange use of velocity - question
Date Tue, 26 Mar 2002 15:01:27 GMT
As an alternative you may want to try using Jython ( ).  IMO, Velocity
is best reserved for the
presentation layer in any system.  Jython syntax is extremely easy to understand and you have
almost complete access to
both Python and Java libraries.  While Velocity may be able to do the initial job it will
be a lot easier to grow your
logic in the future if you use a full blown scripting language.

Anthony Eden

> -----Original Message-----
> From: Tommy Svensson []
> Sent: Tuesday, March 26, 2002 2:31 AM
> To: ''
> Subject: Strange use of velocity - question
> Hello Velocity fans,
> I'm considering using velocity as a scripting language for log searches. It
> got the simple logic I need, that almost anybody can learn. For example:
> I'll put an object in the context that has a find method that takes a string
> specifying the search, and returns an Iterator which is passed to a
> #foreach. The Iterator returns LogEntry objects. The script can then use
> data from that LogEntry to do another find using the finder object and pass
> it to another #foreach loop which will generate result data. I'm even
> considering handing the result LogEntry objects to another object in the
> context which will pass them to the selected LogViewFormatter and pass to
> the user, and then make a NullOutputSream to send the velocity output to,
> thus using it purely as a scripting language.
> Is there any reason this is a bad idea ?
> Best Regards, Tommy Svensson

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message