velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Colson \(tcolson\)" <>
Subject RE: macro library
Date Mon, 04 Apr 2005 16:52:02 GMT
> I don't know personally, but I imagine if you were to create such a 
> thing, it would be better as a Tool than a set of macros:

Here's another perspective...

>   - it's faster, which if you start rendering lots of simple 
> HTML tags  like this could be relevant
Got data on that? I'm not aware of any slow-downs incurred by having
lots of macros.

>   - you have a lot more flexibility in pure Java 
Hmm... a macro can always -use- tools if they really need java.

And if they don't need it (see below)... then an advantage of Macro's is
that the HTML author can easily see and change the specific HTML -
without a recompile, and without understanding Java. Separation of roles
is a good thing. :-)

> > #macro (html_href $link $text)
> > <a href='$link'>$text</a>
> > #end

To answer the original question... people talk about it a lot, but not a
lot of activity. I believe there are a few macros on the wiki. 

Some of my colleagues have created velocity macros for rendering
"corporate standard" html widgets using the same Velocity templates via
Velocimacros AND JSP taglibs. 

I am encouraging them to contribute that bit of code back to the main
Velocity project. :-)


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

View raw message