diff --git a/README.md b/README.md index f27e8d379..fddedac97 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ Raptor Templates is an extensible, streaming, asynchronous, [high performance](h # Table of Contents +- [Another Templating Language?](#another-templating-language) - [Design Philosophy](#design-philosophy) - [Sample Code](#sample-code) - [Installation](#installation) @@ -68,6 +69,59 @@ Raptor Templates is an extensible, streaming, asynchronous, [high performance](h +# Another Templating Language? + +Most front-end developers are familiar with, and comfortable with, templating languages such as [Handlebars](https://github.com/wycats/handlebars.js), [Dust](https://github.com/linkedin/dustjs) or [Mustache](http://mustache.github.io/) so why was Raptor Templates introduced? + +What makes Raptor Templates different is that it is an HTML-based templating language that does not rely on a custom language grammar. Any HTML file is a valid Raptor Template and vice-versa, and the Raptor Templates compiler uses an off-the-shelf HTML parser. Because Raptor Templates understands the HTML structure of the templates, it can do more powerful things that would not be possible in a text-based templating languages such as Handlerbars, Dust or Mustache. Raptor Templates allows developers to _extend the HTML language_ by introducing custom HTML elements and attributes. On top of that, utilizing the HTML structure for applying templating directives makes templates more readable and allows input templates to more closely resemble the final HTML structure. + +Let's compare Raptor Templates with Handlebars (a text-based templating language): + +__Handlebars:__ + +```html +Hello {{name}}! + +{{#if colors}} +