But wouldn't it be better to also consider what is essential and what
is optional? Isn't *.velocity.app the place for application tools?
Of course that my interpretation can be wrong, but one thing I would
really like (and I hope not to be alone on that) is a clear separation
from what is essential and what is optional, on a package basis.
And, believe me, I already have a lot of trouble with this separation
since my framework provides a lot of functionality that is redundant
(for me) in Velocity. A clear separation between "core" and "optional"
(and this has various levels in Velocity) would make its reuse
simpler for a wider range of usages.
Some extra remarks on the Event Handlers:
- In NullSetEventHandler, why is the method called
"nullSetLogMessage()"? One does not have to log the message and no
message is directly involved. What about "nullSetAttempt()"?
- Why having
NullReferenceEventHandler.nullReferenceRender() (1)
and
ReferenceInsertionEventHandler.referenceInsert() (2)
AFAIK, they do a similar thing, one for non silent null values and
the other for non null values. Following the pattern of the first
(1) case, we should have (instead of the second (2))
ReferenceEventHandler.referenceRender()
or
NonNullReferenceEventHandler.nonNullReferenceRender()
For some people (not you Geir) this might look like a detail, but the
names of classes and methods are the first (most immediate) level of
documentation. They can make reading further documentation unnecessary
or they can induce confusion.
In my case, at a 1st look, I thought that
ReferenceInsertionEventHandler.referenceInsert()
was a #set() related event (a bit like in NullSetEventHandler) since
#set can be used to "insert" a value in the context's hash table.
BTW, since I started making big and complex XML exports, I just fell
in love for these events. I am starting to use them now and it sure
avoids a lot of template mess... or data structure code mess.
Thanks for all the good work
...and have fun,
Paulo Gaspar
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Geir Magnusson Jr.
> Sent: Friday, May 18, 2001 2:14 PM
> To: velocity-dev
> Subject: [1.1 issue] event handler
>
>
> the event handling stuff is currently in org.apache.velocity.context,
> which is the wrong place. It is there simply because that's where it
> was convenient to play with it.
>
> Anyone have a big problem if we move it? It's new to 1.1, so we have
> the chance now.
>
> org.apache.velocity.event ?
>
> org.apache.velocity.app.event ?
>
> I am more inclined towards the latter one, as we don't need more top
> level packagenames, I believe, and it is an application API
>
> geir
>
> --
> Geir Magnusson Jr. [EMAIL PROTECTED]
> System and Software Consulting
> Developing for the web? See http://jakarta.apache.org/velocity/
> "still climbing up to the shoulders..."
>