Skip to content

Commit d0b7203

Browse files
authored
Include Pebble in template engine ADR
1 parent 6ead49e commit d0b7203

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

docs/decisions/0039-use-apache-velocity-as-template-engine.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Chosen option: "Apache Velocity", because "Velocity's goal is to keep templates
3636
Furthermore, Apache Velocity is lightweight, and it allows to generate text output. This is a good fit for the AI feature.
3737

3838
Update from 01.10.2025: more promising options were added (Handlebars and Jinja), but the final decision was not discussed and updated.
39+
Update from 20.10.2025: added pebble
3940

4041
## Pros and Cons of the Options
4142

@@ -137,6 +138,7 @@ Here are the papers you are analyzing:
137138
* Good, because it is powerful and flexible.
138139
* Good, because it has a simple API.
139140
* Neutral, as custom functions needs to be added manually. You cannot pass an ordinary Java object and use it as you want.
141+
* Bad, because as a Java port it lacks behind mainline development.
140142

141143
### Jinja
142144

@@ -161,6 +163,31 @@ Here are the papers you are analyzing:
161163
* Neutral, as it was developed for web and Python, not for Java.
162164
* Neutral, as the Java port is quite young (in comparison to other options).
163165
* Neutral, as custom functions needs to be added manually. You cannot pass an ordinary Java object and use it as you want.
166+
* Bad, because as a Java port it lacks behind mainline development.
167+
168+
### Pebble
169+
170+
- Main page: <https://pebbletemplates.io/>
171+
- Repository and developer guide: <https://github.com/PebbleTemplates/pebble>
172+
- User guide: <https://pebbletemplates.io/wiki/>
173+
174+
```text
175+
{% for entry in entries %}
176+
{{ entry.title }}
177+
{{ entry.author }}
178+
{% else %}
179+
There are no entries.
180+
{% endfor %}
181+
```
182+
183+
* Good, because supports plain text templating.
184+
* Good, because it is possible to use `String` as a template.
185+
* Good, because it supports template inheritance, includes, and custom functions (`macros`).
186+
* Good, because it is actively maintained.
187+
* Good, because it provides a simple API that integrates easily with Java.
188+
* Good, because has tooling support for common IDEs.
189+
* Neutral, because its feature set is smaller than FreeMarker’s, but sufficient for text-based generation.
190+
* Neutral, because it is less widely adopted than Thymeleaf or FreeMarker.
164191

165192
## More Information
166193

0 commit comments

Comments
 (0)