Jari Worsley wrote:
> 
> "Geir Magnusson Jr." wrote:

> > I don't know how to avoid having logic - I don't think a tool that spits
> > out a complete table is appropos, as then the generation of markup moved
> > out of View into M or C (the land of the Java programmer anyway).
> >
> 
> yes agree with you there. There will always be a need for some layout
> logic in views, especially when it comes to things like lists, or
> multicolumned layouts etc - just look at the complexity of some fo the
> AWT Layout classes ;). I was just trying to understand what you were
> advocating.

Yep.

> 
> > >
> > > To me
> > > $sometool.apicall($arg1, $arg2) is just as much a programming call as
> > > a JSP style <%= request.getAttribute("foo") %>.
> >
> > 1) In Velocity, you would just do
> >
> > $request.getAttribute("foo")
> >
> > 2) In JSP, you wouldn't have to resort to scriptlets, right?  You could
> > easily access via a bean access tag or a custom tag...
> 
> Yes, bad example on my part I should have said something like:
> <%= ( somevar > 1) ? "foo" : "bar" %>

Right - in velocity

#if( $somevar > 1 ) foo #else bar #end

You can get wacky :

#set($value = "#if($somevar>1) foo #else bar #end" )

as we eval "" strings, but this is getting fancy :)
 
> >
> >
> > The point here is not to engage again in a JSP vs templating discussion
> 
> ! I haven't had that discussion ever, and don't see the need, especially
> on a "commons" list rather than a "religious wars about architecture X"
> list :)
> 

I agree - but will add that if kept rational, it's an interesting
discussion to have, as each side learns, and hopefully the entire
'space' moves forward....

geir

-- 
Geir Magnusson Jr.                           [EMAIL PROTECTED]
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
You have a genius for suggesting things I've come a cropper with!

Reply via email to