AW: [opencms-dev] On how to integrate OpenCMS and velocity:

Michael Emmerich emmerich at german-navy.de
Mon Apr 1 17:48:30 CEST 2002


Werner,

> Another thing someone pointed out is the usage different template
> mechanisms (aka xml or velocity alone)
> The problem is that both template mechanisms don´t exclude each other
> they can complement each other.

Of course not - as you have shown with your sample code. And especially
the idea of reusing existing components - either Velocity or
XMLTemplates - is a reason for mixing both template mechanisms. 

> This basically means you could fill existing XML templates with
> velocity content and both systems wouldn´t interfere,

You just have to take care that the caching of both templates mechanisms
is working correctly.

> so I think an
> all or nothing approach (aka either XML or Velocity) is
> contraproductive a complementive approach should be targetet at least
> optionally.

My point was that if you start a new site from scratch, it would be good
to have the alternative to build it completly with velocity templates
alone (if you want to use it), so you do not have
to learn the OpenCms template mechanism. The problem in mixing both
mechanisms I see is that it could make a site more complex to understand
using two mechanisms that follow quite different ideas how to seperate
layout and logic.

This would give you the opportunity to select the template mechanism
which fits best to your problem, either XML templates or Velocity, or an
integrated mixture of both.

Bye,
Michael

-- 
Home   : emmerich at german-navy.de
Work   : michael.emmerich at framfab.de
ICQ    : 18897063
WWW    : German Naval History http://www.german-navy.de




More information about the opencms-dev mailing list