velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@optonline.net>
Subject Re: Standard library
Date Sat, 14 Jul 2001 04:16:54 GMT
Tal Dayan wrote:
> 
> We just implemented few methods for text formatting, current time and date,
> and
> escaping of HTML code (e.g. change "a > 7" to "a &gt; 7"). Nothing really
> significant.
> 

If you want to contribute them, that would be great.  But of course,
that isn't often possible when developed in a commercial setting, do no
worries if its not possible - just know that contributions are always
welcome.

> How do you see this library from the template user's view point? Will
> it be just a set of independent library objects $mylib.method1(),
> $hislib.method2()
> etc ? What about having a single staring point with some plug in mechanism
> such
> as $lib.mylib1.method1(), $lib.hislib.method2(), etc ?
> 

Well....  We could have some sort of light organization, but I
personally really believe, strongly, that this isn't the business of the
template engine to do this.  Really strongly.  (Our WebMacro bretheren
don't agree, I will note...)

The reason is that this is really the domain of the application, or even
better, the web application framework (like Turbine) that you use to
build your webapp.  

> Having some standard or a framework for the library will make it
> easier to integrate contribution from multiple people.

Yep - in Jakarta there are two, Turbine, which offers excellent support
for Velocity as well as other view technologies, and Struts, which is
more JSP centric although Velocity will work there too.

geir

Y> 
> > -----Original Message-----
> > From: gmj@mta4.srv.hcvlny.cv.net [mailto:gmj@mta4.srv.hcvlny.cv.net]On
> > Behalf Of Geir Magnusson Jr.
> > Sent: Friday, July 13, 2001 7:44 PM
> > To: velocity-user@jakarta.apache.org
> > Subject: Re: Standard library
> >
> >
> > Tal Dayan wrote:
> > >
> > > Is there a standard library for Velocity templates for common operations
> > > such as
> > > getting the current date, printing a string to stdout, string
> > > processing, etc ?
> >
> > In velocity, they wouldn't be templates, but 'tools' to put into the
> > context.  We got a few submissions from users and I put them into the
> > Jakarta Commons sandbox, under the mysterious name 'Rupert'.  (I chose
> > rupert because we didn't have a name... :)
> >
> > So thats a start - if you want to use them, grab them.  If you want to
> > start working on the project of organizing and developing more tools,
> > please do.  Take a look and give a shout back here or on the Jakarta
> > commons list.
> >
> > geir
> >
> > --
> > Geir Magnusson Jr.                           geirm@optonline.net
> > 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!
> >

-- 
Geir Magnusson Jr.                           geirm@optonline.net
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!

Mime
View raw message