Frequently Asked Questions
Clone this wiki locally
What problems Transparency solves?
Transparency is mainly used as a client-side templating solution. A common use case could be where a web browser fetches JSON data via AJAX and renders dynamic parts of a page depending on this data.
Transparency can be used on a server-side with Node.js.
Why should I use Transparency and DOM based templating?
- Transparency templates are valid HTML and play nice with other tools.
- Transparency templates do not need to be compiled and do not contribute to page load latency
- Transparency's method of operating on DOM nodes is faster than strings and innerHTML
- Micro Templates Are Dead
Where can I contact developers for further support?
How fast is it?
Why Transparency.js is so fast?
There are variations between different web browsers and use cases but generally even in the worst scenario Transparency is at least as fast as competing solutions.
How small is it?
The translated .js file is 11 kBytes and minified version 4 kBytes as writing of this.
What license Transparency.js uses?
What to do if the data does not match the templates?
The whole point is to use Ubiquitous Language, so first, take a look on your data and templates and eliminate the differences. If that's not feasible, there's couple of options:
- Use directives to provide the mapping
- Preprocess the data to match the template before feeding it to
Should I use Transparency on server-side?
Probably not. On the server-side the templates would go through string -> DOM -> fill -> string transformation. On the client side the templates go through string -> DOM -> fill transformation. In most cases there would not be benefits running Transparency on the server, unless you simply prefer the API cleanliness.
If you need something similar to Transparency you might want to check Plates (below).
Are there other semantic template engines/frameworks?