velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gonzalo Diethelm" <gonzalo.dieth...@diethelm.org>
Subject RE: Velocity under non-Java environments
Date Mon, 08 Jul 2002 19:23:06 GMT
> > This got me thinking: both PHP and Perl support (to a certain extent)
> > an object model; how hard would it be to come up with Velocity versions
> > that work with PHP and Perl?
> >
> > I even envision a grandiose future where a given VM template can be used
> > UNCHANGED on a Java, Perl or PHP environment! Now that would be cool!
> > You would need to abstract somehow the way Velocity templates interact
> > with the underlying object system, but at least in theory it look
doable.
> >
> > How hard would this be? Is this even one of the stated Velocity goals?
> > Any comments are welcome.
>
> I was talking with the cheetah developers (python) about this a while
ago -
> I thought it would be great to have portable templates.

Yes!

> The problems, I think, come in when people want to implement idioms from
> their favorite language into the templating system.  I think we've done a
> good job (or the WM guys did a good job :) of keeping Java-ish things out
of
> Velocity/WM.  I would think that if you *started* with velocity, it would
be
> straightforward as long as you could get around some of the problems you
> have in languages w/o reflection/introspection (like C++)...

Forget about any language that does not provide reflection. I think that
still leaves several interesting languages: PHP, Perl and Python (and, of
course, Java). I think it would be great to have something like:

                       +--------------------+
                       |   VM Template      |
                       +--------------------+
                                 |
                       +--------------------+
                       |Velocity Interpreter|
                       +--------------------+
                                 |
+--------------------+ +--------------------+ +--------------------+
|    Java Gateway    | |    PHP Gateway     | |    Perl Gateway    | ...
+--------------------+ +--------------------+ +--------------------+

> Geir Magnusson Jr.


--
Gonzalo A. Diethelm
gonzalo.diethelm@aditiva.com


--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message