velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@adeptra.com>
Subject Re: Velocity under non-Java environments
Date Mon, 08 Jul 2002 18:59:46 GMT
On 7/8/02 2:52 PM, "Gonzalo Diethelm" <gonzalo.diethelm@diethelm.org> wrote:

> Hello,
> 
> The company I work for develops web apps using several different
> languages, such as Java, PHP and Perl (and supports old CGI-based
> apps, incidentally!). I am totally sold on the templating language
> idea implemented in Velocity, and have been looking for an embodiment
> of this idea in the other programming environments, specifically
> with Perl and PHP. I found Smarty for PHP, but I really find it
> difficult after the simplicity of Velocity.
> 
> 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.

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++)...

-- 
Geir Magnusson Jr. 
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713



--
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