On Jan 9, 2012, at 9:09 AM, Marius Dumitru Florea wrote:
On Sat, Jan 7, 2012 at 4:49 PM, Vincent Massol
<vincent(a)massol.net> wrote:
Hi Marius,
I think the display module should be independent of the Velocity module.
I see that the VelocityManager is used in DocumentContentDisplayer but I don't think
that's nice. It's used to isolate the velocity context in case velocity is used. I
think we can improve this for the following reasons:
1) We don't always need to render content using velocity
2) Code using the displayer shouldn't need to depend on velocity if it doesn't
need to
I think a better solution would be to have some generic component interface for isolating
content (we might already have this) and then have the displayer call
"registered" components without knowing them.
This would mean that the code isolating the velocity namespace would be located in the
velocity module itself for ex (or in a sub module) which makes more sense IMO.
WDYT?
I agree. I don't remember seeing such an interface in the platform.
Why do you think we might have it already?
I think I was referring to execution context isolation code we already have. I've just
looked at the code now and see I was thinking about ExecutionContextInitializer.
It's probably different though. I haven't read the Display module code but
it's probably already using ExecutionContextManager to clone the execution context
when displaying in isolation (btw shouldn't that be always the case since otherwise
it's called an include?).
Thanks
-Vincent