soma-template seamless dom manipulation

| 1 min read

soma-template is a web template engine. The library aims to help developers insert data in their html applications using native DOM capabilities.

Most web template engine today are "string-based", which means they will compute a string with a set of data, JSON data very often, and insert the result using the innerHTML DOM element property.

While this is completely fine, soma-template has another goal. The library will help you insert content in your html application with a minimal DOM node destruction, updating only what is needed. This is opening new capabilities, such as updating only some nodes, or being able to browse the template as you would browse the DOM.

Another goal has been the ease-of-use as having several templates can become messy and confusing. For that very reason, the template can be fully part of the DOM, without having to inject a template source into the DOM.

The template syntax will feel natural, the engine is customizable and it has a very flexible API that can be enhanced using custom functions or external libraries such as underscore.string.

The engine has been tested in all modern browsers and from IE7 to IE10, mobile and desktop.

Feel free to use it anywhere you like, send issues on Github, and feedback appreciated!

vimeo demo