Hi
What is Sightly?
Sightly is an HTML templating language, introduced with AEM 6.0. It takes the place of JSP (Java Server Pages) and ESP (ECMAScript Server Pages) as the preferred templating system for HTML. The name “Sightly” (meaning “pleasing to the eye”) highlights its focus on keeping your markup beautiful, and thus maintainable, once made dynamic.
As in all HTML server-side templating systems, a Sightly file defines the output sent to the browser by specifying the HTML itself, some basic presentation logic and variables to be evaluated at runtime.
But, Sightly differs from other templating systems in three main ways:
- Security by Default: Sightly automatically filters and escapes all variables being output to the presentation layer to prevent cross-site-scripting (XSS) vulnerabilities. As Sightly understands the HTML syntax, it is capable to automatically detect the scope in which variables are placed, and automatically do proper context-aware escaping and XSS protection. Yet, it is possible to manually control the display context if needed.
- Separation of Concerns: The expressiveness of the Sightly template language is purposely limited, in order to make sure that a real programming language is used to express the corresponding presentation logic. This optional logic is invoked from Sightly expressions with the Use-API pattern, making it easy to understand what is called for a given view, and to potentially have different logic for different views of the same resource.
- Sightly is HTML5: A Sightly file is itself a valid HTML5 file. All Sightly-specific syntax is expressed either within adata attribute, or within HTML text. Any Sightly file opened as HTML in an editor will automatically benefit from any features provided by that editor for regular HTML.
Sightly aims to reduce the time to market and the total cost of ownership for AEM projects:
- Reducing project costs
by making components editable for front-end developers. - Reducing operational costs
by securing the templates against XSS injections. - Reducing maintenance costs
by keeping templates readable and valid HTML5.
Documentation Link:- https://docs.adobe.com/docs/en/aem/6-0/develop/sightly.html
PDF Sightly Component Development :- http://dev.day.com/content/ddc/en/gems/introduction-to-sightly/_jcr_content/par/download/file.res/Sightly%20Component%20Development.pdf
Link:- http://www.aemcq5tutorials.com/tutorials/sightly-new-features-vs-jsp-aem/
//Difference between Sightly vs JSP
Link:- http://labs.6dglobal.com/blog/2014-05-22/sightly-vs-handlebars-vs-jsp-comparing-scripting-languages/
//Sightly vs Handlebars vs JSP
PS: we can not use it beyond the scope of AEM as of now.
I hope this would help you.
Thanks and Regards
Kautuk Sahni