Credera is a full-service management and
technology consulting firm. Our clients range
from Fortune 1,000 companies to eme...
Discussion document – Strictly Confidential & Proprietary
Thymeleaf:
Better than JSP
Dallas, TX
August 21, 2013
August 21, 2013
Thymeleaf: Better than JSP
3
Agenda …
We will have a brief overview of Thymeleaf followed by a demonstrati...
What is Thymeleaf
August 21, 2013
Thymeleaf: Better than JSP
4
August 21, 2013
Thymeleaf: Better than JSP
5
What is Thymeleaf…
Thymeleaf is a Java based XML/ XHTML/ HTML5 template engin...
August 21, 2013
Thymeleaf: Better than JSP
6
What is Thymeleaf…
Thymeleaf uses attribute based processing to allow for nat...
Comparison with JSP
August 21, 2013
Thymeleaf: Better than JSP
7
August 21, 2013
Thymeleaf: Better than JSP
8
Comparison with JSP
Thymeleaf is an easy to use template engine that serves a...
Demo
August 21, 2013
Thymeleaf: Better than JSP
9
August 21, 2013
Thymeleaf: Better than JSP
10
Resources…
Thymeleaf has great documentation source which makes it easy to l...
Upcoming SlideShare
Loading in …5
×

Spring User Group Thymeleaf 08-21-2013

1,531 views
1,404 views

Published on

This presentation was used at the Spring User Group to describe the basics of Thymeleaf.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,531
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
19
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Spring User Group Thymeleaf 08-21-2013

  1. 1. Credera is a full-service management and technology consulting firm. Our clients range from Fortune 1,000 companies to emerging industry leaders. We provide expert, objective advice to help solve complex business and technology challenges. Dallas Office 15303 Dallas Parkway Suite 300 Addison, TX 75001 972.692.0010 Phone 972.692.0019 Fax Denver Office 5445 DTC Parkway Suite 1040 Greenwood Village, CO 80111 303.623.1344 Phone 303.484.4577 Fax Houston Office 800 Town & Country Blvd Suite 300 Houston, TX 77024 713.496.0711 Phone 713.401.9650 Fax Austin Office 9020 N Capital of Texas Hwy Suite 345 Austin, TX 78759 512.327.1112 Phone 512.233.0844 Fax
  2. 2. Discussion document – Strictly Confidential & Proprietary Thymeleaf: Better than JSP Dallas, TX August 21, 2013
  3. 3. August 21, 2013 Thymeleaf: Better than JSP 3 Agenda … We will have a brief overview of Thymeleaf followed by a demonstration Agenda • What is Thymeleaf • Comparison with JSP • Demo • References
  4. 4. What is Thymeleaf August 21, 2013 Thymeleaf: Better than JSP 4
  5. 5. August 21, 2013 Thymeleaf: Better than JSP 5 What is Thymeleaf… Thymeleaf is a Java based XML/ XHTML/ HTML5 template engine Core Features • Supports several template modes – XML, XHTML, HTML5 – Extendable to any template type that can be modeled using DOM • Standard I18N support through properties files • Modular feature sets supported as Dialects • Attribute based processing • Built in View Caching Primary Integrations • Standard Spring MVC Integration – Support for Spring form binding and property editors – Supports Internationalization through Spring MessageSource • Apache Tiles • Spring Security 3.x • Eclipse IDE Autocomplete
  6. 6. August 21, 2013 Thymeleaf: Better than JSP 6 What is Thymeleaf… Thymeleaf uses attribute based processing to allow for natural templating What does it look like? <table> <thead> <tr> <th th:text="#{msgs.headers.name}">Name</th> <th th:text="#{msgs.headers.price}">Price</th> </tr> </thead> <tbody> <tr th:each="prod : ${allProducts}"> <td th:text="${prod.name}">Oranges</td> <td th:text="${#numbers.formatDecimal(prod.price,1,2)}">0.99</td> </tr> </tbody> </table>
  7. 7. Comparison with JSP August 21, 2013 Thymeleaf: Better than JSP 7
  8. 8. August 21, 2013 Thymeleaf: Better than JSP 8 Comparison with JSP Thymeleaf is an easy to use template engine that serves as a drop in replacement for JSP Thymeleaf • Attribute based processing – Unobtrusive processing which allows templates to be use as static templates • Requires document to be valid XML – Promotes well formed HTML and better cross-browser compatibility • Extensible through Dialects • Built in support for I18N • Standard module for Spring support • Escapes dynamic text by default • Unit Testing Framework JSP(X) • Tag based processing – Processing is obtrusive and prevents use as static templates • Allows templates to be written in non-valid XML – Allows not well formed HTML which can have compatibility issues (JSP only) • Extensible through Taglibs • Supports I18N through fmt Taglib • Supports Spring MVC through taglibs • Escapes dynamic text through c:out tag
  9. 9. Demo August 21, 2013 Thymeleaf: Better than JSP 9
  10. 10. August 21, 2013 Thymeleaf: Better than JSP 10 Resources… Thymeleaf has great documentation source which makes it easy to learn • Demo application - https://github.com/Credera/talk-thymeleaf • Thymeleaf Resources – – Website – http://www.thymeleaf.org/ – Documentation - http://www.thymeleaf.org/documentation.html – Repositories  Thymeleaf - https://github.com/thymeleaf/thymeleaf  Spring 3 Module - https://github.com/thymeleaf/thymeleaf-spring3  Spring 3 Module - https://github.com/thymeleaf/thymeleaf-testing

×