SlideShare una empresa de Scribd logo
1 de 10
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
May 09, 2013
May 09, 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
May 09, 2013
Thymeleaf: Better than JSP
4
May 09, 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
May 09, 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
May 09, 2013
Thymeleaf: Better than JSP
7
May 09, 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
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
May 09, 2013
Thymeleaf: Better than JSP
9
May 09, 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

Más contenido relacionado

Similar a Thymleaf Tech Talk 2013 05-09

Teradata Professional Services Overview
Teradata Professional Services OverviewTeradata Professional Services Overview
Teradata Professional Services OverviewTeradata
 
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)Pat Patterson
 
Using neo4j for enterprise metadata requirements
Using neo4j for enterprise metadata requirementsUsing neo4j for enterprise metadata requirements
Using neo4j for enterprise metadata requirementsNeo4j
 
From big data to AI, power your data with OVHcloud solutions
From big data to AI, power your data with OVHcloud solutionsFrom big data to AI, power your data with OVHcloud solutions
From big data to AI, power your data with OVHcloud solutionsOVHcloud
 
Deepika Mittal , BCA Third Year
Deepika Mittal , BCA Third YearDeepika Mittal , BCA Third Year
Deepika Mittal , BCA Third Yeardezyneecole
 
OLAP on the Cloud with Azure Databricks and Azure Synapse
OLAP on the Cloud with Azure Databricks and Azure SynapseOLAP on the Cloud with Azure Databricks and Azure Synapse
OLAP on the Cloud with Azure Databricks and Azure SynapseAtScale
 
Analyzta_Presentation V1
Analyzta_Presentation V1Analyzta_Presentation V1
Analyzta_Presentation V1Anayzta Team
 
Lightning Talk: Get Even More Value from MongoDB Applications
Lightning Talk: Get Even More Value from MongoDB ApplicationsLightning Talk: Get Even More Value from MongoDB Applications
Lightning Talk: Get Even More Value from MongoDB ApplicationsMongoDB
 
interworks Presentation from 20th April 2017 - Tech Startup Job Fair Berlin
interworks Presentation from 20th April 2017 - Tech Startup Job Fair Berlininterworks Presentation from 20th April 2017 - Tech Startup Job Fair Berlin
interworks Presentation from 20th April 2017 - Tech Startup Job Fair BerlinTechMeetups
 
OSA Con 2022 - Tips and Tricks to Keep Your Queries under 100ms with ClickHou...
OSA Con 2022 - Tips and Tricks to Keep Your Queries under 100ms with ClickHou...OSA Con 2022 - Tips and Tricks to Keep Your Queries under 100ms with ClickHou...
OSA Con 2022 - Tips and Tricks to Keep Your Queries under 100ms with ClickHou...Altinity Ltd
 
Go further ds 2465
Go further ds 2465Go further ds 2465
Go further ds 2465Accenture
 
Gulabs Ppt On Data Warehousing And Mining
Gulabs Ppt On Data Warehousing And MiningGulabs Ppt On Data Warehousing And Mining
Gulabs Ppt On Data Warehousing And Mininggulab sharma
 
Teradata Customer Services
Teradata Customer ServicesTeradata Customer Services
Teradata Customer ServicesTeradata
 
Pricing and packaging for MSPs
Pricing and packaging for MSPsPricing and packaging for MSPs
Pricing and packaging for MSPsSolarwinds N-able
 
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLBit...
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLBit...Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLBit...
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLBit...Cathrine Wilhelmsen
 
Lightning Talk: Get Even More Value from MongoDB Applications
Lightning Talk: Get Even More Value from MongoDB ApplicationsLightning Talk: Get Even More Value from MongoDB Applications
Lightning Talk: Get Even More Value from MongoDB ApplicationsMongoDB
 
Sod Technologies Corporate Profile
Sod Technologies Corporate ProfileSod Technologies Corporate Profile
Sod Technologies Corporate Profilefindfaizal
 
US Tech Solutions, Inc line card of services 2013
US Tech Solutions, Inc line card of services  2013US Tech Solutions, Inc line card of services  2013
US Tech Solutions, Inc line card of services 2013Venkat K.Anumakonda
 

Similar a Thymleaf Tech Talk 2013 05-09 (20)

Teradata Professional Services Overview
Teradata Professional Services OverviewTeradata Professional Services Overview
Teradata Professional Services Overview
 
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
 
Using neo4j for enterprise metadata requirements
Using neo4j for enterprise metadata requirementsUsing neo4j for enterprise metadata requirements
Using neo4j for enterprise metadata requirements
 
From big data to AI, power your data with OVHcloud solutions
From big data to AI, power your data with OVHcloud solutionsFrom big data to AI, power your data with OVHcloud solutions
From big data to AI, power your data with OVHcloud solutions
 
Deepika Mittal , BCA Third Year
Deepika Mittal , BCA Third YearDeepika Mittal , BCA Third Year
Deepika Mittal , BCA Third Year
 
OLAP on the Cloud with Azure Databricks and Azure Synapse
OLAP on the Cloud with Azure Databricks and Azure SynapseOLAP on the Cloud with Azure Databricks and Azure Synapse
OLAP on the Cloud with Azure Databricks and Azure Synapse
 
PHPTAL with CakePHP
PHPTAL with CakePHPPHPTAL with CakePHP
PHPTAL with CakePHP
 
Analyzta_Presentation V1
Analyzta_Presentation V1Analyzta_Presentation V1
Analyzta_Presentation V1
 
Lightning Talk: Get Even More Value from MongoDB Applications
Lightning Talk: Get Even More Value from MongoDB ApplicationsLightning Talk: Get Even More Value from MongoDB Applications
Lightning Talk: Get Even More Value from MongoDB Applications
 
interworks Presentation from 20th April 2017 - Tech Startup Job Fair Berlin
interworks Presentation from 20th April 2017 - Tech Startup Job Fair Berlininterworks Presentation from 20th April 2017 - Tech Startup Job Fair Berlin
interworks Presentation from 20th April 2017 - Tech Startup Job Fair Berlin
 
HTML
HTMLHTML
HTML
 
OSA Con 2022 - Tips and Tricks to Keep Your Queries under 100ms with ClickHou...
OSA Con 2022 - Tips and Tricks to Keep Your Queries under 100ms with ClickHou...OSA Con 2022 - Tips and Tricks to Keep Your Queries under 100ms with ClickHou...
OSA Con 2022 - Tips and Tricks to Keep Your Queries under 100ms with ClickHou...
 
Go further ds 2465
Go further ds 2465Go further ds 2465
Go further ds 2465
 
Gulabs Ppt On Data Warehousing And Mining
Gulabs Ppt On Data Warehousing And MiningGulabs Ppt On Data Warehousing And Mining
Gulabs Ppt On Data Warehousing And Mining
 
Teradata Customer Services
Teradata Customer ServicesTeradata Customer Services
Teradata Customer Services
 
Pricing and packaging for MSPs
Pricing and packaging for MSPsPricing and packaging for MSPs
Pricing and packaging for MSPs
 
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLBit...
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLBit...Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLBit...
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLBit...
 
Lightning Talk: Get Even More Value from MongoDB Applications
Lightning Talk: Get Even More Value from MongoDB ApplicationsLightning Talk: Get Even More Value from MongoDB Applications
Lightning Talk: Get Even More Value from MongoDB Applications
 
Sod Technologies Corporate Profile
Sod Technologies Corporate ProfileSod Technologies Corporate Profile
Sod Technologies Corporate Profile
 
US Tech Solutions, Inc line card of services 2013
US Tech Solutions, Inc line card of services  2013US Tech Solutions, Inc line card of services  2013
US Tech Solutions, Inc line card of services 2013
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 

Último (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

Thymleaf Tech Talk 2013 05-09

  • 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. Discussion document – Strictly Confidential & Proprietary Thymeleaf: Better than JSP Dallas, TX May 09, 2013
  • 3. May 09, 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. What is Thymeleaf May 09, 2013 Thymeleaf: Better than JSP 4
  • 5. May 09, 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. May 09, 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. Comparison with JSP May 09, 2013 Thymeleaf: Better than JSP 7
  • 8. May 09, 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 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. Demo May 09, 2013 Thymeleaf: Better than JSP 9
  • 10. May 09, 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