blob: 7386029c83247844383b0c071893d3eabfec0cbf [file] [log] [blame]
<HTML><HEAD><TITLE>Velocity Todo</TITLE></HEAD><BODY alink="#023264" bgcolor="#ffffff" leftmargin="4" link="#023264" marginheight="4" marginwidth="4" text="#000000" topmargin="4" vlink="#023264"><TABLE border="0" cellpadding="0" cellspacing="0" width="100%"><TR><TD align="left" valign="top"><A href="http://jakarta.apache.org/index.html"><IMG border="0" hspace="0" src="resources/jakarta-logo.gif" vspace="0"></A></TD><TD align="left" bgcolor="#ffffff" valign="top" width="100%"><IMG align="right" alt="" border="0" hspace="0" src="resources/header.gif" vspace="0"></TD></TR><TR><TD><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="5"></TD></TR><TR><TD background="resources/line.gif" colspan="2" height="2" width="100%"><IMG alt="" border="0" height="2" hspace="0" src="resources/line.gif" vspace="0" width="1"></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="100%"><TR><TD valign="top" width="1%"></TD><TD nowrap="1" valign="top" width="14%"><BR>
<P></P>
<FONT face="arial,helvetica,sanserif" size="-1"><LI><A href="index.html">Overview</A></LI></FONT>
<FONT face="arial,helvetica,sanserif" size="-1"><LI><A href="getting-started.html">Getting Started</A></LI></FONT>
<FONT face="arial,helvetica,sanserif" size="-1"><LI><A href="install.html">Install</A></LI></FONT>
<FONT face="arial,helvetica,sanserif" size="-1"><LI><A href="design.html">Design</A></LI></FONT>
<FONT face="arial,helvetica,sanserif" size="-1"><LI><A href="contributors.html">Contributors</A></LI></FONT>
<FONT face="arial,helvetica,sanserif" size="-1"><LI><A href="code-standards.html">Coding Standards</A></LI></FONT>
<FONT face="arial,helvetica,sanserif" size="-1"><LI><A href="license.html">License</A></LI></FONT>
<FONT face="arial,helvetica,sanserif" size="-1"><LI><A href="todo.html">TODO</A></LI></FONT>
<P></P>
<FONT face="arial,helvetica,sanserif" size="-1"><LI><A href="user-guide.html">User's Guide</A></LI></FONT>
<FONT face="arial,helvetica,sanserif" size="-1"><LI><A href="developer-guide.html">Developer's Guide</A></LI></FONT>
<FONT face="arial,helvetica,sanserif" size="-1"><LI><A href="vtl-reference-guide.html">VTL Reference Guide</A></LI></FONT>
</TD><TD align="left" valign="top" width="*"><TABLE border="0" cellpadding="3" cellspacing="0"><TR><TD><BR>
<DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="0" width="98%"><TR><TD bgcolor="#023264" width="100%"><FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="5"><B>Todo</B></FONT></TD></TR><TR><TD><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="98%"><TR><TD><FONT color="#000000" face="arial,helvetica,sanserif">
<P align="justify">
This is an informal document describing what needs to
be done in the Velocity code base and the
Velocity documentation. If you need more detailed help, or have specific
questions, please send mail to the mailing list
(<A href="mailto:velocity-dev@jakarta.apache.org">velocity-dev@jakarta.apache.org</A>).
The Todo list that follows is roughly in order of importance.
</P>
</FONT></TD></TR></TABLE></DIV><BR>
<DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="0" width="98%"><TR><TD bgcolor="#023264" width="100%"><FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="5"><B>The List</B></FONT></TD></TR><TR><TD><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="98%"><TR><TD><FONT color="#000000" face="arial,helvetica,sanserif">
<B>Runtime API</B>
<BR>
The Velocity Runtime is the single access point for all
Velocity's functionality. A standard API for the
Runtime should be defined so that in the span between
the 0.5 Milestone release and a 1.0 release, the Runtime
API changes as little as possible.
<P align="justify"></P>
<B>JUnit Test Suite</B>
<BR>
A JUnit test suite would allow Velocity developers to
aggressively add, refactor, and optimize code. We need
a comprehensive test suite so that we can
be assured changes in the code base have no adverse
effects for users. <A href="mailto:dlr@collab.net">Daniel L. Rall</A>
has started us off with some code so you may want to contact
him if you are interested in working on a JUnit test suite.
<P align="justify"></P>
<B>Directive Interface</B>
<BR>
Right now there is a very thin interface for directives, but
some knowledge of JavaCC is required. The directive
interface is not intended to be used outside core Velocity
developers (it is not intended to be a public API), but it
probably makes sense to shield directive creators from JavaCC.
<P align="justify"></P>
<B>Context</B>
<BR>
The Velocity Context class is still fairly primitive. It
loosely adheres to a Map, but it definitely needs some
thinking. It works fine now, but it might be good to
think about: how to load standard tools and how to
make that process efficient; how to stamp items in
the context with expiry durations so that items can
be cached and how this might work.
<P align="justify"></P>
<B>Sample Applications</B>
<BR>
Any type of sample application would be useful to
help new developers get acquainted with
Velocity. Any suggestions are welcome.
<P align="justify"></P>
<B>User's Guide</B>
<BR>
This would be a guide for designers who would
be using the Velocity Template Language (VTL) to
create templates. The users guide would give
example usage and a definitive description
of the VTL syntax. <A href="mailto:jvanzyl@periapt.com">Jason van Zyl</A>
has started work on this with John Castura, but any and all
suggestions are welcome.
<P align="justify"></P>
<B>Developer Guide</B>
<BR>
This would be a guide for developers who would use
Velocity as a standalone servlet tool, or in conjuction
with a servlet controller framework like Turbine.
<A href="mailto:jvanzyl@periapt.com">Jason van Zyl</A> is
currently working on this guide, but any and all suggestions
are welcome.
<P align="justify"></P>
<B>Template Loader System</B>
<BR>
The template loader system is functional but could probably use an
overhaul. There is currently a double template instantiation
problem. It is not causing any serious problems, but it
should be corrected. We could utilize some
object caching/pooling code from Turbine, or JServ, or the
Avalon Server Framework.
<P align="justify"></P>
<B>Caching</B>
<BR>
It would be good to have a discussion about how objects
in the context should be cached, how the caching
should be specified, and who should control the
caching: the designer, by specifying something in the template;
the developer,
by placing expiry times on objects placed in the context;
or a third party, such as a content manager. For example,
say an array consisting of a top 10 list of books is
placed in the context. This top 10 list might be valid
for a 24 hour period: how should that be specified? Say
a content manager later decides this list will be valid
for a week. Do they tell the designer, who in turn changes
the template, or could we provide a mechanism that would
allow a content manager to change the default expiry time
for that particular context object with the aid of a webapp
of some sort? The groundwork has be laid for a flexible
caching system in Velocity, but this discussion would be
one of usage and policy.
<P align="justify"></P>
<B>Parser Pool</B>
<BR>
It would be good to create a pool of parsers that could
be utilized by the Runtime. Right now there is only a single
parser and the parsing is synchronized. The parsing doesn't
happen all that often in production, but a small pool of
parsers might alleviate any potential bottlenecks. Again,
object caching/pooling code could be borrowed from Turbine,
JServ, or the Avalon Server Framework.
<P align="justify"></P>
<B>UML Overview</B>
<BR>
It would great to include a set of comprehensive
UML diagrams that describe Velocity. This would
allow new developers to get up to speed quickly.
<P align="justify"></P>
<B>Velocity Profiling</B>
<BR>
If someone is handy with one of the standard profilers,
it would be great to start hunting for bottlenecks. No
serious optimization has been started. But in conjuction
with the presence of a JUnit test suite, optimization
changes could be made with confidence. It would be nice
to have a configuration of a setup for a common profiler
so that anyone who wanted to do some profiling could do
so in a consistent manner.
<P align="justify"></P>
<B>Encoding Caching</B>
<BR>
What would this entail? And how could we implement an
efficient encoding caching mechanism.
<P align="justify"></P>
<B>Plugins</B>
<BR>
It would be good to allow plugins in the form of JAR files
to be picked up the Velocity Runtime during startup. This
would be a good way for Velocity developers to share tools
that could be used in a context. For example there are some
utilities in Turbine that allow email to be sent from within
a template. It might be good to package this sort of utility
in a JAR file so that there are no dependencies in the
Velocity build for a specific utility.
<P align="justify"></P>
<B>Context Tools</B>
<BR>
What kind of tools might be good to add to Velocity? There
are several utilties that have been created in Turbine that
might be good to move over to the Velocity code base.
<P align="justify"></P>
<B>Syntax Dumper</B>
<BR>
Right now there is a primitive syntax dumper in the Velocity
code base, and it could be improved. This tool is very helpful
in debugging, and it is also good for creating directives.
It basically has a simple dump method that is used for all
the AST node types. It would be good to tailor dump methods
for particular AST node types so that the structure produced
is a little clearer.
<P align="justify"></P>
<B>Syntax Checker</B>
<BR>
It would be good to have a standard syntax checker, something
that would find all syntax errors and report them to the
designer in some intelligible format. This tool could be
hooked into various designer tools like DreamWeaver.
<P align="justify"></P>
<B>Extended Properties</B>
<BR>
There are classes that are present in JServ, Turbine and Cocoon
that allow a more flexible properties mechanism. It allows properties
files to be 'included', and allows the concatentation of the values
of multiply defined properties. These classes are very good and
should be integrated into Velocity.
<P align="justify"></P>
<B>Compiler</B>
<BR>
It would be great to have a template compiler. There is a great
utility called JavaClass that provides a very clean and simple way
to create class files, and there is also some byte code generating
code present in the DynamicJava package that could be utilized.
<P align="justify"></P>
<B>IDE Integration</B>
<BR>
How could Velocity be integrated into standard IDEs like
JBuilder and VisualAge?
<P align="justify"></P>
<B>Scripting Language Integration</B>
<BR>
This is something that has been discussed on the Turbine
list. Allowing Context building classes to be written
in JPython, Rhino or other scripting languages would
dramatically improve development time and might allow technically
proficient web designers who are familiar JavaScript to create
an entire servlet solution with Velocity. As most of these
scripting solutions provide a compiler, performance would still
remain at an acceptable level.
<P align="justify"></P>
</FONT></TD></TR></TABLE></DIV><BR>
</TD></TR></TABLE></TD></TR></TABLE><BR><TABLE border="0" cellpadding="0" cellspacing="0" width="100%"><TR><TD bgcolor="#023264"><IMG height="1" src="resources/resources.gif" width="1"></TD></TR><TR><TD align="center"><FONT color="#023264" face="arial,helvetica,sanserif" size="-1"><I>
Copyright &copy; 2000 The Apache Software Foundation.
All Rights Reserved.
</I></FONT></TD></TR></TABLE></BODY></HTML>