velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Eden" <ae...@signaturedomains.com>
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 ( http://www.jython.org/ ).  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.

Sincerely,
Anthony Eden

> -----Original Message-----
> From: Tommy Svensson [mailto:tommy.svensson@askus.se]
> Sent: Tuesday, March 26, 2002 2:31 AM
> To: 'velocity-user@jakarta.apache.org'
> 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:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message