ECT is a logical development of existing approaches to high-performance dressing. At the beginning of the year I published my development -
JUST template engine. ECT began as its development, but after a while the difference in them became too large, so a new product appeared.
Syntax
While working with JUST, which uses an EJS-compatible syntax, it is understood that this is not very convenient. I wanted to simplify, at least, for conditional operators and cycles. I began to develop code in this direction, but stopped on time. I myself am very bad for similar bikes in terms of syntax. When you add such syntactic sugar to your development, it seems to be a very cool and convenient innovation. But the developer, who sees it for the first time, will rather choose a familiar and understandable solution than he will understand the new syntax.
The logical solution in this situation was the use of
CoffeeScript as an embedded language.
')
The same approach is used by the popular
Eco template engine. The implementation of embedded CoffeeScript ECT support is fully backward compatible with Eco, i.e. you can use your Eco templates without modification with the ECT template engine.
Yes, but why do we need a new template engine?
ECT carries a few killer features, without which I can not imagine templating on a more or less large project:
In addition, ECT
runs faster than many other popular JavaScript templating engines of its level of functionality and
keeps pace with Twitter
Hogan.js . His twin - Eco, he goes around in speed by about 2 times.
To whom it is interesting - they can repeat the
performance tests at their place.
Compatibility
ECT
works the same way on the server (node.js / coffee) and on the client. All modern browsers are supported.
For dessert
ECT can be easily
tried . This is one of the key points, because very often, the introduction of new technology stops due to the high threshold of entry. Such a demo is designed to minimize this threshold and help developers make the right choice. Unfortunately, the demo does not work in IE, because
ACE Editor supports only normal browsers. Enjoy!