100 Reasons Why NOT HTL
It's no secret that I'm not in love with HTL, but since it's Adobe's preferred templating language, I have to use it anyway. This is my outlet to document the many and various deficiencies in HTL as I struggle with it on a daily basis.
#1
It's the uncanny valley of languages it looks like HTML, but it's not.
#2
The world needs another templating language like it needs more diseases
#3
The syntax is difficult to read, what is just a Data attribute and what is HTL? Hard to tell.
#4
It has no extensibility if you don't like the out of the box behavior? Too bad
#5
It's a dead-end technology, no other tool or product uses it besides AEM or has any reason to do so
#6
It was designed to work with Apache Sling but it fails to provide basic hooks to leverage the framework
#7
You can’t even control the adapter is when adapting a model
#8
The Expression Language syntax in HTL is similar to JSP but not the same, so yeah, get ready to re-learn what you already knew, now with fun new quirks!
#9
Sly tags don’t work within scripts, because why would you ever want to control output in scripts?
#10
HTL? Sightly? SLY? Why so many names?
#11
Within scripts, HTL will just silently output nothing if you don’t specify a context because unexpected behavior is awesome!!
#12
HTL uses context sensitivity, which sucks when you want it to just do what you tell it, regardless of the surrounding HTML
#13
Adobe Engineering doesn't even use HTL internally. The guts of AEM, Granite, etc? JSP.
#14
Since you can't do many things in HTL you can do in JSP, it contributes to the death by Sling Models issue on AEM projects
#15
HTL uses namespace mangling on external / absolute links. So I hope there are no colons in your links!
#16
No support for else / else if. Because everyone likes restating the negative of a condition, right?
#17
Because HTL didn't originally have control tags (and doesn't require them) you have to deal with the whole unwrapping mess.
#18
Since HTL can be written in any HTML tag and there's no reason that the HTL control attributes need to be first, it's easy to add hard to find controls
#19
Theoretically, HTL is supposed to make it easier for non-Java developers to learn AEM, but then why not pick a language they already use like Handlebars instead of bastardizing HTML?
#20
HTL: better security from the makers of the Flash / PDF Reader weekly vulnerability update