You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Kasper Nielsen <ka...@kav.dk> on 2001/11/17 16:39:36 UTC

velocity in jsp

Now you can use velocity in JSP (kind-of).

 http://www.caucho.com/products/resin/ref/velocity.xtp

- Kasper



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: velocity in jsp

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 11/18/01 9:19 AM, "Henning P. Schmiedehausen" <ma...@hometree.net>
wrote:

> "Geir Magnusson Jr." <ge...@optonline.net> writes:
> 
>> Here's what they say on their front page :
> 
>> "The Resin-2.0.3 release allows an alternate JSP expression syntax similar
>> to the Apache Velocity project that many find more maintainable than the JSP
>> pointy brackets. Resin's syntax extension is compatible with the usual JSP
>> features like tag libraries. "
> 
>> That's a quote - 'pointy brackets'. :)
> 
>> Think about it - a J2EE vendor is extending the JSP expression syntax beyond
>> the spec.
> 
>> From what I understand, they added two things from Velocity :
> 
>> 1) our 'expression language', i.e.
> 
>>  $foo.bar()
> 
>> 2) and a single control structure, the #if()
> 
> Uhm, excuse me, but I thought that they simply run the page through
> the normal velocity engine if the JSP property is set and they use a
> velocity.jar somewhere in their distribution.

I don't know.  Haven't had the time to look into it.

> So this is somehow
> equivalent to the veltags stuff in JSP only more comfortable for the
> average user. Do you say, that they _reimplemented_ Velocity syntax?
> 
> (...ducks in horror)
>
Don't know.  But from the looks of it, if it's just #if() and the expression
language, it appears they re-implemented.


> So we will have two strands of "velocity like" syntaxes and if Caucho
> decides not to follow some design decisions, we get _two_ different
> velocity like syntaxes?

If it is as described, its a subset.

And we already have two, WebMacro and Velocity. That would be a third - lets
not forget our roots.
 
> That would IMHO be indeed a really bad decision.
> 

Yep - I think so.  That's where I see opportunity for us :)

geir

-- 
Geir Magnusson Jr.     geirm@optonline.net
System and Software Consulting
"Whoever would overthrow the liberty of a nation must begin by subduing the
freeness of speech." - Benjamin Franklin



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: velocity in jsp

Posted by "Henning P. Schmiedehausen" <ma...@hometree.net>.
"Geir Magnusson Jr." <ge...@optonline.net> writes:

>Here's what they say on their front page :

>"The Resin-2.0.3 release allows an alternate JSP expression syntax similar
>to the Apache Velocity project that many find more maintainable than the JSP
>pointy brackets. Resin's syntax extension is compatible with the usual JSP
>features like tag libraries. "

>That's a quote - 'pointy brackets'. :)

>Think about it - a J2EE vendor is extending the JSP expression syntax beyond
>the spec.

>>From what I understand, they added two things from Velocity :

>1) our 'expression language', i.e.

>  $foo.bar()

>2) and a single control structure, the #if()

Uhm, excuse me, but I thought that they simply run the page through
the normal velocity engine if the JSP property is set and they use a
velocity.jar somewhere in their distribution. So this is somehow
equivalent to the veltags stuff in JSP only more comfortable for the
average user. Do you say, that they _reimplemented_ Velocity syntax?

(...ducks in horror)

So we will have two strands of "velocity like" syntaxes and if Caucho
decides not to follow some design decisions, we get _two_ different
velocity like syntaxes?

That would IMHO be indeed a really bad decision.

	Regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen       -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH     hps@intermeta.de

Am Schwabachgrund 22  Fon.: 09131 / 50654-0   info@intermeta.de
D-91054 Buckenhof     Fax.: 09131 / 50654-20   

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: velocity in jsp

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 11/18/01 1:33 AM, "Nick Bauman" <ni...@cortexity.com> wrote:
 
> I hate to rain on anyones parade here but.... In my book, Caucho just
> forked Velocity. They made something else. I personally see no value in
> adding scriptlet functionality to Velocity. I seriously suggest they call
> their "Velocity Style" this: "Mud".

First, note I haven't used it.

Second, lets face it - they forked *JSP*.  They haven't forked Velocity
because they didn't make another templating engine, they extended JSP by
adding different, 'concurrent' syntax that they want their users to mix in
with JSP.

Here's what they say on their front page :

"The Resin-2.0.3 release allows an alternate JSP expression syntax similar
to the Apache Velocity project that many find more maintainable than the JSP
pointy brackets. Resin's syntax extension is compatible with the usual JSP
features like tag libraries. "

That's a quote - 'pointy brackets'. :)

Think about it - a J2EE vendor is extending the JSP expression syntax beyond
the spec.

>From what I understand, they added two things from Velocity :

1) our 'expression language', i.e.

  $foo.bar()

2) and a single control structure, the #if()

Why is this good?  It appears to me that they are recognizing that the
Velocity syntax offers something over JSP, as they are willing to implement
and support it.

The fact that you can add scriptlets doesn't really bother me, as you can do
that in JSP, and using the Velocity tag library, you can mix Velocity and
JSP together already.

That said, after a night of sleep, there are some issues that do bother me,
and there are some opportunities for us.... :)

geir


On 11/18/01 1:41 AM, "Saimon Moore" <sa...@yahoo.co.uk> wrote:

> On Dom 18 Nov 2001 07:33, Nick Bauman wrote:
>>> On Sáb 17 Nov 2001 18:42, Geir Magnusson Jr. wrote:
>>>> On 11/17/01 10:39 AM, "Kasper Nielsen" <ka...@kav.dk> wrote:
>>>>> Now you can use velocity in JSP (kind-of).
>>>>> 
>>>>> http://www.caucho.com/products/resin/ref/velocity.xtp
>>>> 
>>>> I can't decide if this is too weird or too cool.  I suspect too cool
>>>> 
>>>> :)
>>>> 
>>>> This is a great thing either way... As it supports our contention that
>>>> Velocity (and its inspiration, WebMacro) are valid alternatives to JSP
>>>> in the J2EE environment.
>>>> 
>>>> I'll put it up as news on the site..
>>>> 
>>>> Also, by the way, you *can* use Velocity in JSP - use the veltag tag
>>>> library.
>>>> 
>>>> http://jakarta.apache.org/velocity/veltag.html
>>>> 
>>>> geir
>>> 
>>> Did you notice though that they have added scriptlet functionality #{
>>> ... }#  at the same time...Goes a bit against why you would use
>>> velociity in the  first place...
>>> They don't mention that the reason you would use Velocity is to force
>>> java  code OUT of the templates...I think I would make them state that
>>> clearly on  that page otherwise you might get people getting confused
>>> about what Velocity  is and is not...
>> 
>> I hate to rain on anyones parade here but.... In my book, Caucho just
>> forked Velocity. They made something else. I personally see no value in
>> adding scriptlet functionality to Velocity. I seriously suggest they call
>> their "Velocity Style" this: "Mud".
>> 
>> http://www.joeyoder.com/papers/patterns/BBOM/mud.html
>> 
>>> Cheers...
>>> 
>>> Saimon
> 
> Yikes...they turned Velocity back into....JSP!!! God save us from the JSP
> mongers... ;)
> <justjoking>You don't think this is some evil plan by ... to undermine JSP
> alternatives by assimilating them into JSP <very large grin/></justjoking>
> 
> Saimon
> 
> 
> _________________________________________________________
> 
> Do You Yahoo!?
> 
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 

-- 
Geir Magnusson Jr.                       geirm@optonline.net
System and Software Consulting
You're going to end up getting pissed at your software
anyway, so you might as well not pay for it. Try Open Source.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: velocity in jsp

Posted by Saimon Moore <sa...@yahoo.co.uk>.
On Dom 18 Nov 2001 07:33, Nick Bauman wrote:
> > On Sáb 17 Nov 2001 18:42, Geir Magnusson Jr. wrote:
> >> On 11/17/01 10:39 AM, "Kasper Nielsen" <ka...@kav.dk> wrote:
> >> > Now you can use velocity in JSP (kind-of).
> >> >
> >> > http://www.caucho.com/products/resin/ref/velocity.xtp
> >>
> >> I can't decide if this is too weird or too cool.  I suspect too cool
> >>
> >> :)
> >>
> >> This is a great thing either way... As it supports our contention that
> >> Velocity (and its inspiration, WebMacro) are valid alternatives to JSP
> >> in the J2EE environment.
> >>
> >> I'll put it up as news on the site..
> >>
> >> Also, by the way, you *can* use Velocity in JSP - use the veltag tag
> >> library.
> >>
> >> http://jakarta.apache.org/velocity/veltag.html
> >>
> >> geir
> >
> > Did you notice though that they have added scriptlet functionality #{
> > ... }#  at the same time...Goes a bit against why you would use
> > velociity in the  first place...
> > They don't mention that the reason you would use Velocity is to force
> > java  code OUT of the templates...I think I would make them state that
> > clearly on  that page otherwise you might get people getting confused
> > about what Velocity  is and is not...
>
> I hate to rain on anyones parade here but.... In my book, Caucho just
> forked Velocity. They made something else. I personally see no value in
> adding scriptlet functionality to Velocity. I seriously suggest they call
> their "Velocity Style" this: "Mud".
>
> http://www.joeyoder.com/papers/patterns/BBOM/mud.html
>
> > Cheers...
> >
> > Saimon

Yikes...they turned Velocity back into....JSP!!! God save us from the JSP 
mongers... ;)
<justjoking>You don't think this is some evil plan by ... to undermine JSP 
alternatives by assimilating them into JSP <very large grin/></justjoking>

Saimon

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: velocity in jsp

Posted by Nick Bauman <ni...@cortexity.com>.
> On Sáb 17 Nov 2001 18:42, Geir Magnusson Jr. wrote:
>> On 11/17/01 10:39 AM, "Kasper Nielsen" <ka...@kav.dk> wrote:
>> > Now you can use velocity in JSP (kind-of).
>> >
>> > http://www.caucho.com/products/resin/ref/velocity.xtp
>>
>> I can't decide if this is too weird or too cool.  I suspect too cool
>> :)
>>
>> This is a great thing either way... As it supports our contention that
>> Velocity (and its inspiration, WebMacro) are valid alternatives to JSP
>> in the J2EE environment.
>>
>> I'll put it up as news on the site..
>>
>> Also, by the way, you *can* use Velocity in JSP - use the veltag tag
>> library.
>>
>> http://jakarta.apache.org/velocity/veltag.html
>>
>> geir
> 
> Did you notice though that they have added scriptlet functionality #{
> ... }#  at the same time...Goes a bit against why you would use
> velociity in the  first place...
> They don't mention that the reason you would use Velocity is to force
> java  code OUT of the templates...I think I would make them state that
> clearly on  that page otherwise you might get people getting confused
> about what Velocity  is and is not...
> 

I hate to rain on anyones parade here but.... In my book, Caucho just 
forked Velocity. They made something else. I personally see no value in 
adding scriptlet functionality to Velocity. I seriously suggest they call 
their "Velocity Style" this: "Mud". 

http://www.joeyoder.com/papers/patterns/BBOM/mud.html

> Cheers...
> 
> Saimon

-- 
Nick Bauman 
Cortexity Development
Intellectual Process is more important than
Intellectual Property -- you'll see.
http://www.cortexity.com/


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: velocity in jsp

Posted by Saimon Moore <sa...@yahoo.co.uk>.
On S�b 17 Nov 2001 18:42, Geir Magnusson Jr. wrote:
> On 11/17/01 10:39 AM, "Kasper Nielsen" <ka...@kav.dk> wrote:
> > Now you can use velocity in JSP (kind-of).
> >
> > http://www.caucho.com/products/resin/ref/velocity.xtp
>
> I can't decide if this is too weird or too cool.  I suspect too cool :)
>
> This is a great thing either way... As it supports our contention that
> Velocity (and its inspiration, WebMacro) are valid alternatives to JSP in
> the J2EE environment.
>
> I'll put it up as news on the site..
>
> Also, by the way, you *can* use Velocity in JSP - use the veltag tag
> library.
>
> http://jakarta.apache.org/velocity/veltag.html
>
> geir

Did you notice though that they have added scriptlet functionality #{ ... }# 
at the same time...Goes a bit against why you would use velociity in the 
first place...
They don't mention that the reason you would use Velocity is to force java 
code OUT of the templates...I think I would make them state that clearly on 
that page otherwise you might get people getting confused about what Velocity 
is and is not...

Cheers...

Saimon

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: velocity in jsp

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 11/17/01 10:39 AM, "Kasper Nielsen" <ka...@kav.dk> wrote:

> Now you can use velocity in JSP (kind-of).
> 
> http://www.caucho.com/products/resin/ref/velocity.xtp
> 

I can't decide if this is too weird or too cool.  I suspect too cool :)

This is a great thing either way... As it supports our contention that
Velocity (and its inspiration, WebMacro) are valid alternatives to JSP in
the J2EE environment.

I'll put it up as news on the site..

Also, by the way, you *can* use Velocity in JSP - use the veltag tag
library.

http://jakarta.apache.org/velocity/veltag.html

geir

-- 
Geir Magnusson Jr.                                     geirm@optonline.net
System and Software Consulting
Be a giant.  Take giant steps.  Do giant things...


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>