Actually it’s a version of Google Closure Templates (.soy templates) with HAML syntax.
Why you need this?
In modern web development it’s very common to update some parts of current page by data received from server, but the problem that it’s annoying to write and support same HTML view two times – for Client and for Server. Just breaks DRY principle.
Hsoy Templates gives you a way to write such templates just once, and use it on client-side, and on backend.
- one template (a *.hsoy file)
- HAML syntax (see http://haml.info/)
- compiled into Java (so can be used from Groovy, Scala, Clojure, etc)
- based on Google Closure Templates library
- commercial friendly (Apache 2.0 licence)
- maven-hsoy-templates – a Maven plugin
- compile into JS/Java on compile phase
- recompile into JS after each modification (watching for changes)
- grails-hsoy-templates – a Grails plugin, as a Resource Plugin extension (http://grails.org/plugin/hsoy-templates)
- and documentation
- test test test
- support most Google Closure Templates features
- JSP taglib
- native OS listener for sources modification
- a Gradle plugin
If you met HAML syntax first time, take a look at http://haml.info/tutorial.html
and use it
As a result you’ll get
Same HTML on server and client side, generated from same template file.
See full documentation at http://splix.github.io/hsoy-templates/
Currently the project consists of following parts: