This week's book giveaway is in the Open Source forum.
We're giving away four copies of Programmers Guide to Apache Thrift and have Randy Abernethy on-line!
See this thread for details.
Win a copy of Programmers Guide to Apache Thrift this week in the Open Source forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Does it make sense to use ThymeLeaf in a REST/web client?  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wonder if there is any use at all to use ThymeLeaf for web pages in a REST client? I see mostly examples of REST combined with web pages and Javascript.

It seems like the whole point with a combined web/REST GUI is to make the backend part of the system smoother, so it does not have any references to web pages. It can then instead have references to the REST URI's instead and the presentation client layer can be easily changed to something else, like from Angular to React. We also get an interface without any visual stuff in our backend system and we can call this from other backend apps. Wouldn't this be impossible if there was Thymeleaf pages on the backend system? It seems like Thymeleaf would ruin the whole point of a combined web/REST solution.
 
Saloon Keeper
Posts: 10206
216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure, it can make sense.

You can choose to let your client load the data with AJAX calls to your REST services, but sometimes you just want to build parts of your web-page at the server-side, especially when they don't change after loading.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!