forked from thymeleaf/thymeleaf.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
features.html
executable file
·242 lines (206 loc) · 10.8 KB
/
features.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Features - Thymeleaf: java XML/XHTML/HTML5 template engine</title>
<link rel="stylesheet" type="text/css" media="all" href="css/thymeleaf.css" />
<link rel="shortcut icon" href="http://www.thymeleaf.org/favicon.ico" />
<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
{lang:'en', parsetags:'explicit'}
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-1276954-9']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script type="text/javascript" src="sh/scripts/shCore.js"></script>
<script type="text/javascript" src="sh/scripts/shBrushXml.js"></script>
<script type="text/javascript" src="sh/scripts/shBrushJava.js"></script>
<link href="sh/styles/shCore.css" rel="stylesheet" type="text/css" />
<link href="sh/styles/shThemeThymeleaf.css" rel="stylesheet" type="text/css" />
</head>
<body lang="en" dir="ltr">
<div id="page">
<div id="menu">
<ul>
<li><a href="index.html" title="Home">Home</a></li>
<li><a href="features.html" title="Features">Features</a></li>
<li><a href="download.html" title="Download">Download</a></li>
<li><a href="documentation.html" title="Documentation">Documentation</a></li>
<li><a href="ecosystem.html" title="Ecosystem">Ecosystem</a></li>
<li><a href="http://forum.thymeleaf.org" title="User Forum">User Forum</a></li>
<li><a href="issuetracking.html" title="Issue Tracking">Issue Tracking</a></li>
</ul>
</div>
<div id="header">
<a href="index.html" title="Thymeleaf home"><img src="images/thymeleaflogonameverysmall.png" class="logo" alt="Thymeleaf Template Engine"/></a>
</div>
<div id="breadcrumb">
<a href="index.html">thymeleaf</a>
::
<span class="current">features</span>
</div>
<div id="content">
<h2>Core Features</h2>
<ul>
<li><b>Java template engine for XML, XHTML and HTML5</b>. Extensible to other template formats.</li>
<li>Works both in web and non-web (<i>offline</i>) environments. No hard dependency on the Servlet API.</li>
<li>Based on modular <i>feature sets</i> called <b>dialects</b>.
<ul>
<li>Dialect features (e.g.: evaluation, iteration, etc.) are applied by linking them to template's tags and/or attributes.</li>
<li>Two dialects available out-of-the-box: <i>Standard</i> and <i>SpringStandard</i> (for Spring MVC apps, same syntax as <i>Standard</i>).</li>
<li>Developers can extend and create custom dialects.</li>
</ul>
</li>
<li>Several <i>template modes</i> out-of-the-box (extensible):
<ul>
<li><b>XML</b>: validating against a DTD or not.</li>
<li><b>XHTML 1.0 and 1.1</b>: validating against standard DTDs or not.</li>
<li><b>HTML5</b>: both XML-formed code and <i>legacy-based HTML5</i>. Legacy non-XML code will be automatically
cleaned and converted to XML form.</li>
</ul>
</li>
<li>Full (and extensible) <b>internationalization</b> support.</li>
<li>Configurable, high performance <b>parsed template cache</b> that reduces input/output to the minimum.</li>
<li>Automatic DOCTYPE translations —from template DTD to result DTD— for (optional) validation of both
template and result code.</li>
<li>Extremely extensible: can be used as a <i>template engine framework</i> if needed.</li>
<li>Complete <a href="documentation.html">documentation</a> including several example applications.</li>
</ul>
<h2>Standard and SpringStandard Dialects</h2>
<ul>
<li>XML, XHTML 1.0, XHTML 1.1 and <b>HTML5</b> support.</li>
<li>Complete substitute for view-layer web technologies such as <b>JSP</b>.</li>
<li>Easy-to-use, elegant syntax based on attributes only (these dialects include no tags).
<ul>
<li>Great for web templates: <kbd><input type="text" th:field="*{name}" /></kbd> instead of <kbd><mylib:text field="name" /></kbd></li>
</ul>
</li>
<li><b>Natural templating</b> for easy prototyping: display your templates statically in a browser (without running your app server).</li>
<li>Expression evaluation: <b>OGNL</b> (Standard) and <b>Spring Expression Language</b> (SpringStandard).</li>
<li>Complete <b>integration with Spring MVC</b> (SpringStandard): form binding, property editors, internationalization, etc.</li>
<li><b>Spring Security</b> support.</li>
<li><b>Spring WebFlow</b> support (including AJAX events).</li>
<li>Fully-featured template logic: iteration, conditional evaluation, context variable declaration, etc.</li>
<li>Several options for layout (<i><b>Composite View</b></i> pattern):
<ul>
<li>A <i>builtin</i> mechanism (Thymeleaf's native fragment inclusion).</li>
<li>Specific Apache Tiles integration (through <i>extras</i> package).</li>
<li>Can be used along with SiteMesh.</li>
</ul>
</li>
<li><b>Internationalization</b> support: easy inclusion of externalized messages into templates.</li>
<li><b>URL rewriting</b> capabilities for adding context and session information to URLs.</li>
<li>JavaScript and Dart inlining: intelligent evaluation of expressions inside javascript/dart code.</li>
<li>Template <b>validation support</b> for XML, XHTML 1.0 and XHTML 1.1.</li>
</ul>
<h2>Extensibility</h2>
<ul>
<li>Dialects:
<ul>
<li>Out-of-the-box: <i>Standard</i> and <i>SpringStandard</i> dialects.</li>
<li>New custom dialects can be created, and existing ones can be extended.</li>
<li>Several dialects can be applied at the same time.</li>
</ul>
</li>
<li>Template resolution:
<ul>
<li>Out-of-the-box: templates can be read as classloader or ServletContext resources,
as well as files (from the filesystem) and by calling URLs.</li>
<li>Custom template resolvers can be developed.</li>
</ul>
</li>
<li>Message resolution (for internationalization):
<ul>
<li>Out-of-the-box:
<ul>
<li><i>Standard dialect</i>: Resolution of messages from <kbd>.properties</kbd> files for each template.</li>
<li><i>SpringStandard dialect</i>: Resolution of messages from Spring <kbd>MessageSource</kbd> objects.</li>
</ul>
</li>
<li>Custom message resolvers can be developed.</li>
</ul>
</li>
<li>Template modes:
<ul>
<li>Out-of-the-box: <kbd>XML</kbd>, <kbd>VALIDXML</kbd>, <kbd>XHTML</kbd>, <kbd>VALIDXHTML</kbd>, <kbd>HTML5</kbd> and <kbd>LEGACYHTML5</kbd>.
<li>Can be extended to process anything that can be modelled as a DOM tree, as long as both a <i>parser</i> and a results <i>writer</i> are provided.</li>
</ul>
</li>
<li>Cache management:
<ul>
<li>Out-of-the-box: comprehensive set of robust caches for templates, code fragments, messages and expressions.</li>
<li>Can be extended to modify (or disable) standard cache strategies, and also create new ones for specific purposes.</li>
</ul>
</li>
<li>Advantages obtained through extension:
<ul>
<li>Addition of required specific features to existing dialects.</li>
<li>Creation of view-layer reusable components (à la <i>JSP taglibs</i>).</li>
<li>Creation of custom templating systems for user-customizable applications.</li>
</ul>
</li>
</ul>
<h2>Testing</h2>
<p>
Thymeleaf has its own specialized testing library, compatible with most general testing frameworks
like JUnit. This library allows you to test your application's view layer, as well as any thymeleaf
extensions you develop.
</p>
<p>
Learn more at the <a href="https://github.com/thymeleaf/thymeleaf-testing">testing library page in GitHub</a>.
</p>
<h2>Main Integrations</h2>
<p>
The Thymeleaf team and community have created a series of integrations for the following technologies:
</p>
<ul>
<li><b>Apache Tiles 2.x</b>: <a href="https://github.com/thymeleaf/thymeleaf-extras-tiles2">https://github.com/thymeleaf/thymeleaf-extras-tiles2</a></li>
<li><b>Spring Security 3.x</b>: <a href="https://github.com/thymeleaf/thymeleaf-extras-springsecurity3">https://github.com/thymeleaf/thymeleaf-extras-springsecurity3</a></li>
<li><b>Eclipse IDE</b>: <a href="https://github.com/thymeleaf/thymeleaf-extras-eclipse-plugin">https://github.com/thymeleaf/thymeleaf-extras-eclipse-plugin</a></li>
<li><b>Play Framework 1.2</b>: <a href="http://www.playframework.org/modules/thymeleaf">http://www.playframework.org/modules/thymeleaf</a></li>
</ul>
<p>
See more at the <a href="ecosystem.html">ecosystem</a> page.
</p>
<h2>Other Integrations</h2>
<p>
Thymeleaf is also supported by:
</p>
<ul>
<li><b>JRebel 5.2</b>: <a href="http://zeroturnaround.com/software/jrebel/">http://zeroturnaround.com/software/jrebel/</a></li>
</ul>
<h2>Community</h2>
<ul>
<li>User forums: <a href="http://forum.thymeleaf.org">http://forum.thymeleaf.org</a></li>
<li>Issue tracking: <a href="issuetracking.html">Issue Tracking page</a></li>
<li>Twitter: <a href="http://www.twitter.com/thymeleaf">@thymeleaf</a></li>
</ul>
</div>
<div id="footer">
<div id="googleplus">
<div id="plusone-div" class="plusone"></div>
<script type="text/javascript">
gapi.plusone.render('plusone-div',{"size": "small", "count": "true", "href": "http://www.thymeleaf.org"});
</script>
</div>
<div id="twitter">
<a href="http://twitter.com/thymeleaf" class="twitter-follow-button" data-show-count="false">Follow @thymeleaf</a>
<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
</div>
<div id="copy">
Copyright © The <a href="team.html">THYMELEAF Team</a>. See <a href="documentation.html">applicable licenses</a>.
</div>
</div>
</div>
<script type="text/javascript">
SyntaxHighlighter.all();
</script>
</body>
</html>