You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Geir Magnusson Jr." <ge...@optonline.net> on 2001/05/13 19:27:36 UTC

[PROPOSAL] Velocity 1.1 Release

Since the 1.0 release, we have added quite a few nice things to
Velocity, and I think we should do an official 1.1 release to let people
use them and be comfortable that they don't have to depend upon the CVS
state du jour...

The biggest additions :

* The new event handling system - EventCartridge and related interfaces
* The performance improvements
* Encoding support for templates

The smaller, but just as important, additions :

* Enhancements to the MIE's
* Improvements to VelocityServet - new handleContext() method
* Texen enhancements
* Support for the Jakarta Commons collections class
* and more

So, I propose that we do this release - I am happy to do it, but want
some community feedback.  

I don't see it as a big event like the 1.0 - just a few nips and tucks,
a release candidate period, and then bless it as 1.1.  If all in favor,
I will get the release candidate put to bed and 'out' this week, let it
run for 1 week, and unless problems surface push out the 1.1 release.  I
don't think this needs a JavaOne timing - I actually think that's
pointless.  

It also might be nice to have a 1.1 release out, tested and ready for
our Turbine brethren to include in their 2.1 release, which will be
timed with JavaOne, as I understand it.  It would help them with their
internationalization support.

Now, aside from some little minutae I am doing, the two big ongoing
pieces seem to be Daniels ongoing battle with the regexp for the
Webmacro conversion utility, and Jason will be adding some improvements
to  Texen.  Neither of these affect the Velocity core, so I believe that
if all is well, we should include them in the 1.1 release, and do any
subsequent fixes to the release candidate if need be.

Comments?

geir

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
"still climbing up to the shoulders..."

Re: [PROPOSAL] Velocity 1.1 Release

Posted by Jason van Zyl <jv...@apache.org>.
"Geir Magnusson Jr." wrote:
> 
> Since the 1.0 release, we have added quite a few nice things to
> Velocity, and I think we should do an official 1.1 release to let people
> use them and be comfortable that they don't have to depend upon the CVS
> state du jour...
> 
> The biggest additions :
> 
> * The new event handling system - EventCartridge and related interfaces
> * The performance improvements
> * Encoding support for templates
> 
> The smaller, but just as important, additions :
> 
> * Enhancements to the MIE's
> * Improvements to VelocityServet - new handleContext() method
> * Texen enhancements
> * Support for the Jakarta Commons collections class
> * and more
> 
> So, I propose that we do this release - I am happy to do it, but want
> some community feedback.
> 
> I don't see it as a big event like the 1.0 - just a few nips and tucks,
> a release candidate period, and then bless it as 1.1.  If all in favor,
> I will get the release candidate put to bed and 'out' this week, let it
> run for 1 week, and unless problems surface push out the 1.1 release.  I
> don't think this needs a JavaOne timing - I actually think that's
> pointless.
> 
> It also might be nice to have a 1.1 release out, tested and ready for
> our Turbine brethren to include in their 2.1 release, which will be
> timed with JavaOne, as I understand it.  It would help them with their
> internationalization support.
> 
> Now, aside from some little minutae I am doing, the two big ongoing
> pieces seem to be Daniels ongoing battle with the regexp for the
> Webmacro conversion utility, and Jason will be adding some improvements
> to  Texen.  Neither of these affect the Velocity core, so I believe that
> if all is well, we should include them in the 1.1 release, and do any
> subsequent fixes to the release candidate if need be.
> 
> Comments?

Go for it! +1

> geir
> 
> --
> Geir Magnusson Jr.                           geirm@optonline.net
> System and Software Consulting
> Developing for the web?  See http://jakarta.apache.org/velocity/
> "still climbing up to the shoulders..."

-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://jakarta.apache.org/velocity
http://jakarta.apache.org/turbine
http://jakarta.apache.org/commons
http://tambora.zenplex.org

Re: [PROPOSAL] Velocity 1.1 Release

Posted by Daniel Rall <dl...@finemaltcoding.com>.
"Geir Magnusson Jr." <ge...@optonline.net> writes:

> Now, aside from some little minutae I am doing, the two big ongoing
> pieces seem to be Daniel's ongoing battle with the regexp for the
> Webmacro conversion utility, and Jason will be adding some improvements
> to  Texen.  Neither of these affect the Velocity core, so I believe that
> if all is well, we should include them in the 1.1 release, and do any
> subsequent fixes to the release candidate if need be.

I hesitate to say anything before actually running the
WebMacro-converted-to-VTL templates in the context of Helm, but the
conversion program *appears* to be working as desired now.  I should
know in the next few days.  :)

> Comments?

+1 on a release.

Dan

Re: [PROPOSAL] Velocity 1.1 Release

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
"Geir Magnusson Jr." wrote:
> [SNIP]
> 
> The smaller, but just as important, additions :
> 
> * Enhancements to the MIE's
> * Improvements to VelocityServet - new handleContext() method

Clarification - I meant the new handleRequest() method.  Thanks Timothy.

geir

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
"still climbing up to the shoulders..."

Re: [PROPOSAL] Velocity 1.1 Release

Posted by Daniel Rall <dl...@finemaltcoding.com>.
"Geir Magnusson Jr." <ge...@optonline.net> writes:

> Now, aside from some little minutae I am doing, the two big ongoing
> pieces seem to be Daniel's ongoing battle with the regexp for the
> Webmacro conversion utility, and Jason will be adding some improvements
> to  Texen.  Neither of these affect the Velocity core, so I believe that
> if all is well, we should include them in the 1.1 release, and do any
> subsequent fixes to the release candidate if need be.

I hesitate to say anything before actually running the
WebMacro-converted-to-VTL templates in the context of Helm, but the
conversion program *appears* to be working as desired now.  I should
know in the next few days.  :)

> Comments?

+1 on a release.

Dan

Re: [PROPOSAL] Velocity 1.1 Release

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Fixed.

Technically this is a bug - however, since we supported the
functionality in 1.0, we will also continue to also support it as a
deprecation in 1.1, but will chatter to the log when it's used, and will
disappear after 1.1

So to summarize, when specifying the resource path for the
JarResourceLoader, it is now the same as the FileResourceLoader :

jar.resource.loader.path

The javadocs have been updated with this, and the developer docs as
well.

geir

Ilkka Priha wrote:
> 
> Geir,
> 
> I remind about one more patch, the path property of JarResourceLoader, which
> would be nice to have in 1.1.
> 

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
"still climbing up to the shoulders..."

RE: [PROPOSAL] Velocity 1.1 Release

Posted by Ilkka Priha <ex...@nokia.com>.
Geir,

I remind about one more patch, the path property of JarResourceLoader, which
would be nice to have in 1.1.

In documentation:

JarResourceLoader : This loader gets resource from specific jar files. It is
very similar to the FileResourceLoader, except that you have the convenience of
bundling your templates into jars. The properties are identical, except for
jar.resource.loader.path, where you provide the full location of the jar(s) you
wish to load resources from.

In code:

public class JarResourceLoader extends ResourceLoader
{
    /**
     * Called by Velocity to initialize the loader
     */
    public void init( ExtendedProperties configuration)
    {
        Vector paths = configuration.getVector("resource.path");

Which means that the actual path property for the JarResourceLoader is
currently:

jar.resource.loader.resource.path

instead of the documented one and the one used in FileResourceLoader.

-- Ilkka


Re: [PROPOSAL] Velocity 1.1 Release

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Jason Grant wrote:
> 
> Hi Geir,
> 
> This goes back to a thread of approx 1 month ago, entitled "Invalid
> references on HttpSession Object".  Back then, I was unable to invoke
> a public method on a superclass via Velocity, e.g.:
> 
> $data.getSession().getId()
> 
> could not be invoked, even though getSession() returns a HttpSession
> derivative here.  It turned out that the concrete HttpSession object
> (here, the Tomcat implementation) had restricted access to the method,
> and this effectively masked out the method from the Velocity
> perspective.
> 
> I was wondering if there are any plans to address this issue.  I know
> that the fix to velocity is not trivial.

If I got it right, it wasn't bad - I just checked in an attempt to solve
the problem.  It's very simple, its not optimal, but it appears to
work.  I will prollie back it out of 1.1 unless it is deemed ok by
substantial independent verification.

geir

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
"still climbing up to the shoulders..."

Re: [PROPOSAL] Velocity 1.1 Release

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Jason Grant wrote:
> 
> Hi Geir,
> 
> This goes back to a thread of approx 1 month ago, entitled "Invalid
> references on HttpSession Object".  Back then, I was unable to invoke
> a public method on a superclass via Velocity, e.g.:
> 
> $data.getSession().getId()
> 
> could not be invoked, even though getSession() returns a HttpSession
> derivative here.  It turned out that the concrete HttpSession object
> (here, the Tomcat implementation) had restricted access to the method,
> and this effectively masked out the method from the Velocity
> perspective.
> 
> I was wondering if there are any plans to address this issue.  I know
> that the fix to velocity is not trivial.

It's something I am working on.  Was actually working on earlier today. 
By sheer coincidence, it was because of HttpSession access that I was
doing it.

I don't think it will be a big deal, but as it's something core, we need
to bash it around a bit.  So I assume that would be something we do with
a 1.1.x or 1.2 release.

I think this is very important and isn't being ignored - but there are a
few people relying on the features we have added since 1.0, namely the
internationalization via encoding and the event cartridge stuff, so we
shouldn't hold it up.

Since I believe that smaller, incremental releases are a good thing, I
would be 100% behind getting another release out there with this as soon
as we are sure things are good.

geir

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
"still climbing up to the shoulders..."

Re: [PROPOSAL] Velocity 1.1 Release

Posted by Jason Grant <ja...@logular.com>.
Hi Geir,

This goes back to a thread of approx 1 month ago, entitled "Invalid
references on HttpSession Object".  Back then, I was unable to invoke
a public method on a superclass via Velocity, e.g.:

$data.getSession().getId()

could not be invoked, even though getSession() returns a HttpSession
derivative here.  It turned out that the concrete HttpSession object
(here, the Tomcat implementation) had restricted access to the method,
and this effectively masked out the method from the Velocity
perspective.

I was wondering if there are any plans to address this issue.  I know
that the fix to velocity is not trivial.

Jason.

On 2001.05.14 03:27:36 +1000 Geir Magnusson Jr. wrote:
> 
> Since the 1.0 release, we have added quite a few nice things to
> Velocity, and I think we should do an official 1.1 release to let
> people
> use them and be comfortable that they don't have to depend upon the
> CVS
> state du jour...
> 
> The biggest additions :
> 
> * The new event handling system - EventCartridge and related
> interfaces
> * The performance improvements
> * Encoding support for templates
> 
> The smaller, but just as important, additions :
> 
> * Enhancements to the MIE's
> * Improvements to VelocityServet - new handleContext() method
> * Texen enhancements
> * Support for the Jakarta Commons collections class
> * and more
> 
> So, I propose that we do this release - I am happy to do it, but
> want
> some community feedback.  
> 
> I don't see it as a big event like the 1.0 - just a few nips and
> tucks,
> a release candidate period, and then bless it as 1.1.  If all in
> favor,
> I will get the release candidate put to bed and 'out' this week, let
> it
> run for 1 week, and unless problems surface push out the 1.1
> release.  I
> don't think this needs a JavaOne timing - I actually think that's
> pointless.  
> 
> It also might be nice to have a 1.1 release out, tested and ready
> for
> our Turbine brethren to include in their 2.1 release, which will be
> timed with JavaOne, as I understand it.  It would help them with
> their
> internationalization support.
> 
> Now, aside from some little minutae I am doing, the two big ongoing
> pieces seem to be Daniels ongoing battle with the regexp for the
> Webmacro conversion utility, and Jason will be adding some
> improvements
> to  Texen.  Neither of these affect the Velocity core, so I believe
> that
> if all is well, we should include them in the 1.1 release, and do
> any
> subsequent fixes to the release candidate if need be.
> 
> Comments?
> 
> geir
> 
> -- 
> Geir Magnusson Jr.                           geirm@optonline.net
> System and Software Consulting
> Developing for the web?  See http://jakarta.apache.org/velocity/
> "still climbing up to the shoulders..."
> 


Re: [PROPOSAL] Velocity 1.1 Release

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Timothy Colson wrote:
> 
> Gier -
> 
> Happy to hear of a 1.1 release, but since I only subscribe to the
> velocity-user list some of these items are new to me at least.
> 
> > * The new event handling system - EventCartridge and related interfaces
> Just had a look at the docs - and, excuse me for being dense, but could you
> explain when I'd use this feature?

The idea is to give you as the Java programmer an opportunity to
participate in the rendering process in a little more fine-grained
manner.

Take as an example the feature of velocity to render a reference-like
template entity such as $foo when foo isn't in the context.  You could
always do something like $!foo to quench any output, but that's a very
broad brush - you may want to do it on an instance by instance basis.

So, you could construct a 'NullReferenceEventHandler', attach it to your
context, and then have code provided by you tell Velocity, for each
instance where $foo is null, whether or not to render $foo as '$foo', or
as something else.

It's clear than an example is needed. :)

> 
> > * The performance improvements
> Cool.
> 
> > * Enhancements to the MIE's
> What's an MIE?  Mostly Ingenious Enhancement? :-)

MethodInvocationException : if the method invocation of an object in the
context

  $foo.getBar()

throws an exception, that exception is wrapped in a MIE and propogated
up to the application / servlet, to allow intelligent, proactive
handling of the problem, rather than simply producing garbage output, or
an inelegant 'Sorry, problem with website' type of error handling
approach.

Note that there is a MethodExceptionEvent handler for the
EventCartridge, so in theory, you could catch this during the render,
and deal w/ it right then and there if you so desired.

 
> > * Improvements to VelocityServet - new handleContext() method
> What's handleContext do? Didn't see that in the docs.

My mistake - handleRequest().... sorry :)  There is now a handleRequest(
HttpServletRequest, HttpServletResponse, Context) method that will allow
you to return null, indicating that you have fully handled the request,
and that velocity will not do anymore output processing.

> > * Support for the Jakarta Commons collections class
> Again - being dense, what does that mean exactly?

It means nothing to the end user - there is a class that is a more
advanced Properties class called Configuration that was included in
Velocity.  Now, this is a general purpose class that came from JServ, I
think, that was being used by Turbine and could be used by anyone.

So it was moved to the Jakarta Commons project for inclusion into the
Collections component, and now Velocity uses that, deprecating the use
of the Configuration class.  This should have no affect on end users at
all.

geir

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
"still climbing up to the shoulders..."

RE: [PROPOSAL] Velocity 1.1 Release

Posted by Timothy Colson <tc...@cisco.com>.
Gier -

Happy to hear of a 1.1 release, but since I only subscribe to the
velocity-user list some of these items are new to me at least.

> * The new event handling system - EventCartridge and related interfaces
Just had a look at the docs - and, excuse me for being dense, but could you
explain when I'd use this feature?

> * The performance improvements
Cool.

> * Enhancements to the MIE's
What's an MIE?  Mostly Ingenious Enhancement? :-)

> * Improvements to VelocityServet - new handleContext() method
What's handleContext do? Didn't see that in the docs.

> * Support for the Jakarta Commons collections class
Again - being dense, what does that mean exactly?

Thanks!
Timothy


Re: [PROPOSAL] Velocity 1.1 Release

Posted by Dennis Doubleday <dd...@mail.yourfit.com>.
At 01:27 PM 5/13/01, you wrote:

>Since the 1.0 release, we have added quite a few nice things to
>Velocity, and I think we should do an official 1.1 release to let people
>use them and be comfortable that they don't have to depend upon the CVS
>state du jour...

You also at one time indicated that you were very close to adding the 
'null' (or 'NULL') token to VTL, but I don't see it in the change list. Is 
that back-burnered, harder than you thought, impossible....?



-------------------------------------------------------------
Dennis Doubleday          email: dday@yourfit.com
yourfit.com, Inc.           web: http://www.yourfit.com/


Re: [PROPOSAL] Velocity 1.1 Release

Posted by Jon Stevens <jo...@latchkey.com>.
on 5/13/01 10:27 AM, "Geir Magnusson Jr." <ge...@optonline.net> wrote:

> Comments?
> 
> geir

+1

-jon

-- 
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/ymtd/ymtd.html>