Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thymeleaf HTML5 compliance and consistency #3

Open
shinedeveloper opened this issue Apr 11, 2020 · 0 comments
Open

Thymeleaf HTML5 compliance and consistency #3

shinedeveloper opened this issue Apr 11, 2020 · 0 comments

Comments

@shinedeveloper
Copy link
Contributor

shinedeveloper commented Apr 11, 2020

  1. Consider data-th-attributes instead of th:attributes

  2. Consider renaming iter to status or stat

  3. Make sure you use stat.index instead of stat.count-1 and stat.count instead of stat.index+1

  4. Decide whether minimize or maximize size of SpEL ${} when Thymeleaf evaluation can work as well. That is particularly important for single text values like th:text="'sample'" or th:text="${'sample'}" and stick with the strategy

  5. Make sure URLs are all absolute using @{/sample}.

  6. Decide whether you should use ModelAndView as a return type or Model or ModelMap as an input parameter while returning just String viewName. The other strategy is more validation friendly and probably more common in the wild.

  7. Decide whether you want to use .html in the URLs or not and stick with it consistently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant