Godmar,

to be honest, we didn't have you (the users) in mind when introducing
Velocity to the game. If you looked at the current solution (print()
methods in the J* classes), you'll come to realize that that is .. well,
a solution we didn't want to support and maintain anymore. Hence the
switch to a template engine such a s Velocity.

Second, when we started to look into JAXB compliance, we thought that
providing a second set of templates would be easier for us to develop,
design and maintain.

But let's try to answer your questions first ....

Godmar Back wrote:
Thanks.

Could you quickly outline how users will benefit from the template
engine? Is it possible, for instance, for users to easily provide
their own templates that override or modify the templates Castor would
normally use?
Yes, that should be quite easy. See below.

If so, is such replacement possible
- incrementally (that is, I only change what I need to change)
- without changing any of Castor's jar files?
Yes, and no. No need to change any Castor JARs, but (at the moment) no
way to do this incrementally. It's all or nothing. Simple provide your
own JClassPrinter and register it with Castor via the relevant property
in castor.properties. Let me know whether you'd need more help.


 - Godmar

On Feb 5, 2008 3:39 AM, Werner Guttmann <[EMAIL PROTECTED]> wrote:
Godmar,

when we looked at template engines, we looked at other projects as well,
and Velocity seems to be used in quite many places (successfully). It is
well maintained, etc. No other specific reasons ...

But as there's now a factory for selecting the way we print J*
instances, there's nothing that (in theory) prevents you from
implementing your own. And feel free to donate this back, should you
choose to go about this.

Regards
Werner


Godmar Back wrote:
Excellent!

One quick question to Werner: why did you decide to use Velocity
rather than other template engines? Specifically, is there a reason to
not use Terence Parr's StringTemplate engine?

 - Godmar

On Feb 4, 2008 5:57 PM, Werner Guttmann <[EMAIL PROTECTED]> wrote:
Dear users

I am very pleased to announce that Castor 1.2 has just been made
available and can be downloaded from the Codehaus at
http://dist.codehaus.org/castor/1.2/.

This release is a feature release with a couple of non-trivial
changes/enhancements in selected areas (mainly XML code generation,
support for Java 5) we'd like to bring to your attention:

- Castor XML code generator now (optionally) uses Velocity as template
engine.
- New binaries packaging: XML schema support has been moved to a
separate (and new) JAR.
- Native Java 5 code generation has been improved (mainly for enumerations).
- The usage of XML parsers has been completely refactored, incl. the
run-time dependencies.
- A new Maven archetype has been created to ease bug reporting.

In addition, a lot of work has been done to prepare for a first
(partial) alpha release of the new JAXB support for Castor XML. More on
this in a separate email later on.

As always, for details about features added and bugs fixed, please have
a look at the release notes at
http://castor.codehaus.org/release-notes.html.

For information about future releases, please have a look at the project
road map (http://jira.codehaus.org/browse/CASTOR), and please report any
regression issues at http://jira.codehaus.org/browse/CASTOR.

Regards
Werner Guttmann
Castor, committer

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email






---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to