You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear People,
i am a software developer and trainer in Java SE/Java EE. I've been teaching Preparation Courses for all Oracle Java Certifications since 11 Years now.
A few days ago, I startet to learn Thymeleaf, because after some research, it seems to be recommended for Server-Side Generated View.
Another Good Reason is the support from the Spring Projects, especially "Spring Boot".
Now After starting to learn a little bit, i am shocked why the syntax of some expressions is NOT INTUITIVE at all.
For example:
Let's start with
Hyperlinks: <a th:href="@{/users}"></a>
There are no Variables at all, why complicating things? Why not just use this: <a th:href="/users"></a> i can still use <a href="/..."> if i don't want context relative paths
Request Parameters:
You use this Syntax: <a th:href="@{https://www.google.com/search(q=${searchTerm})"></a>
Why not this: <a th:href="https://www.google.com/search?q=${serachTerm}"></a>
Path Variables:
Use use: <a th:href="@{/users/{userId}/edit(userId=${user.id})"></a> <== this one killed me :-)
Why not SIMPLY this: <a th:href="/users/${user.id}/edit"></a>
String Concatenation:
You use this: <div th:id="|container-${index}|"></div>
Why not this: <div th:id="container-${index}"></div>
Expression Inlining:
Thymeleaf: <span>The total price is [[${totalPrice}]]</span>
Why not just: <span>The total price is ${totalPrice}</span>
And i saw much more complicated Stuff in Thymeleaf.
My Recommendation:
I don't know, if my recommendations will reduce the performance of your framework, but if it is not the case, please fix these non-intituive syntaxes asap.
Thank you very much.
Lejmi
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Dear People,
i am a software developer and trainer in Java SE/Java EE. I've been teaching Preparation Courses for all Oracle Java Certifications since 11 Years now.
A few days ago, I startet to learn Thymeleaf, because after some research, it seems to be recommended for Server-Side Generated View.
Another Good Reason is the support from the Spring Projects, especially "Spring Boot".
Now After starting to learn a little bit, i am shocked why the syntax of some expressions is NOT INTUITIVE at all.
For example:
Let's start with
Hyperlinks:
<a th:href="@{/users}"></a>
There are no Variables at all, why complicating things? Why not just use this:
<a th:href="/users"></a>
i can still use<a href="/...">
if i don't want context relative pathsRequest Parameters:
You use this Syntax:
<a th:href="@{https://www.google.com/search(q=${searchTerm})"></a>
Why not this:
<a th:href="https://www.google.com/search?q=${serachTerm}"></a>
Path Variables:
Use use:
<a th:href="@{/users/{userId}/edit(userId=${user.id})"></a>
<== this one killed me :-)Why not SIMPLY this:
<a th:href="/users/${user.id}/edit"></a>
String Concatenation:
You use this:
<div th:id="|container-${index}|"></div>
Why not this:
<div th:id="container-${index}"></div>
Expression Inlining:
Thymeleaf:
<span>The total price is [[${totalPrice}]]</span>
Why not just:
<span>The total price is ${totalPrice}</span>
And i saw much more complicated Stuff in Thymeleaf.
My Recommendation:
I don't know, if my recommendations will reduce the performance of your framework, but if it is not the case, please fix these non-intituive syntaxes asap.
Thank you very much.
Lejmi
Beta Was this translation helpful? Give feedback.
All reactions