HTL (HTML Template Language), formerly known as Sightly, is Adobe Experience Manager's (AEM) preferred templating system for HTML. It's designed to replace JSP (JavaServer Pages) as the standard way to create the presentation layer of AEM components.
Key Features and Principles of HTL:
How is HTL different from JSP?
Feature | HTL (Sightly) | JSP (JavaServer Pages) |
---|---|---|
Logic | Logic-less, encourages separation of concerns | Allows embedding Java code directly in the template |
Syntax | HTML-centric, uses HTML attributes and elements | XML-based, uses special tags and scriptlets |
Security | Built-in XSS protection | Requires manual escaping to prevent XSS |
Maintainability | Easier to maintain and update | Can be difficult to maintain due to embedded logic |
Testability | Easier to test | Can be harder to test due to embedded logic |
Performance | Can be more performant in some cases | Performance can vary depending on implementation |
Why did AEM switch to HTL?