Unify template engine behavior across engines
Currently, we support several template engines, but there are a few behavior changes that are not consistent. This umbrella issue is about unifying them.
template reference should use the engine default naming conventions
Engines need to know the template default file extension and are appending or removing them from the requested filename to allow the rendering with or without extension. This has several implications:
- extra logic is run before each render to either add or slice the extension
- it can create ambiguity with files named like
name.ext.extwhich means that a call toname.extcan not really be uniquely identified
template default root
The base root is currently guessed from the "first" directory (string before /) of the path. This again requires some string manipulation operations which could lead to ambiguity. Engines should explicitly have a base path to resolve files.
caching
Not all engines have their cache. Other use a generic cache. We should either disable all engine cache or decide to use the engine internal one. The drawback of using the engine internal one is that we lack control on features like DEVELOPMENT mode which are managed by the generic cache for example.
context
This change has been addressed in 4.0.0 the routing context data is now the root level of the template. This means we don't force Json types, but we use a java.util.Map instead.