• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Spring User Group Thymeleaf 08-21-2013
 

Spring User Group Thymeleaf 08-21-2013

on

  • 1,148 views

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

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

Statistics

Views

Total Views
1,148
Views on SlideShare
1,148
Embed Views
0

Actions

Likes
0
Downloads
11
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Spring User Group Thymeleaf 08-21-2013 Spring User Group Thymeleaf 08-21-2013 Presentation Transcript

    • 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
    • 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 demonstration Agenda • What is Thymeleaf • Comparison with JSP • Demo • References
    • 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 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
    • 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>
    • 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 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
    • 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 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