Option 1: Open Source Template Engines in Java
FreeMarker
FreeMarker is a template engine. It provides an easy way to generate textual (HTML, RTF, PostScript, TeX, source code, etc) output from your data and helps you separate design issues from application logic. Integrates with servlets, XML, Python and more.
- Very intuitively
- easy to learn (developer and publisher)
- powerful
- possibility to bundelize FreeMarker
Velocity
Velocity is a Java-based template engine. It permits web page designers to reference methods defined in Java code. Velocity can be used to generate web pages, SQL, PostScript and other output from templates. It can be used either as a standalone utility for generating source code and reports, or as an integrated component of other systems
- Very powerful
- Very mature and wide spread
- Bundle available?
- Tool/Framework necessary for using Velocity. Evaluation necessary
LSP
LSP is an advanced web template language based on XML technology. LSP provides powerful and easy to use presentation logic, but keeps bussines logic and technical details out of templates. LSP is compiled into Java bytecode for efficient execution. LSP integrates with Servlets and other Java EE technology and can be used as an alternative to JSP for building web applications.
SiteMesh
SiteMesh is a web-page layout and decoration framework and web-application integration framework to aid in creating large sites consisting of many pages for which a consistent look and feel, navigation and layout scheme is required. SiteMesh intercepts requests to any static or dynamically generated HTML page requested through the web-server, parses the page, obtains properties and data from the content and generates an appropriate final page with modifications to the original. This is based upon the well-known GangOfFour Decorator design pattern.
- Good for J2EE applications
- Complex
- Building consistent look and feel
- Build a bundle?
Option 2: Script Languages
jython
Jython is an implementation of the high-level, dynamic, object-oriented language Python written in 100% Pure Java, and seamlessly integrated with the Java platform.
Using existing Templating Language (e.g. TAL, Tal4Rdf, ...)
Script Engine bundles available on jython in osgi
jruby
Ruby implemented in pure Java
Result of an performance evaluation: Java, C++, Ruby, Python, Groovy, PHP
Really good sales argument having scripting possibilities available in SCI.
Option 3: Own Tags and Parser
- customizing tags,
- only tags which are useful for us
- performance optimization (only few tags, not a whole framework)
- costs for implementation? (starting from scratch)
- take existing syntax/tags?
- no community availabe