Thymleaf Tech Talk 2013 05-09

  • 563 views
Uploaded on

 

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
563
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
6
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Credera is a full-service management andtechnology consulting firm. Our clients rangefrom Fortune 1,000 companies to emergingindustry leaders. We provide expert, objectiveadvice to help solve complex business andtechnology challenges.Dallas Office15303 Dallas ParkwaySuite 300Addison, TX 75001972.692.0010 Phone972.692.0019 FaxDenver Office5445 DTC ParkwaySuite 1040Greenwood Village, CO 80111303.623.1344 Phone303.484.4577 FaxHouston Office800 Town & Country BlvdSuite 300Houston, TX 77024713.496.0711 Phone713.401.9650 FaxAustin Office9020 N Capital of Texas HwySuite 345Austin, TX 78759512.327.1112 Phone512.233.0844 Fax
  • 2. Discussion document – Strictly Confidential & ProprietaryThymeleaf:Better than JSPDallas, TXMay 09, 2013
  • 3. May 09, 2013Thymeleaf: Better than JSP3Agenda …We will have a brief overview of Thymeleaf followed by a demonstrationAgenda• What is Thymeleaf• Comparison with JSP• Demo• References
  • 4. What is ThymeleafMay 09, 2013Thymeleaf: Better than JSP4
  • 5. May 09, 2013Thymeleaf: Better than JSP5What is Thymeleaf…Thymeleaf is a Java based XML/ XHTML/ HTML5 template engineCore 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 CachingPrimary 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. May 09, 2013Thymeleaf: Better than JSP6What is Thymeleaf…Thymeleaf uses attribute based processing to allow for natural templatingWhat 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. Comparison with JSPMay 09, 2013Thymeleaf: Better than JSP7
  • 8. May 09, 2013Thymeleaf: Better than JSP8Comparison with JSPThymeleaf is an easy to use template engine that serves as a drop inreplacement for JSPThymeleaf• Attribute based processing– Unobtrusive processing which allowstemplates to be use as static templates• Requires document to be valid XML– Promotes well formed HTML and bettercross-browser compatibility• Extensible through Dialects• Built in support for I18N• Standard module for Spring support• Escapes dynamic text by defaultJSP(X)• Tag based processing– Processing is obtrusive and prevents useas static templates• Allows templates to be written in non-valid XML– Allows not well formed HTML which canhave 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. DemoMay 09, 2013Thymeleaf: Better than JSP9
  • 10. May 09, 2013Thymeleaf: Better than JSP10Resources…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