What for?
“What for?” — that is the key question in any decision. In our case we had several answers to this question.
First – developers. Current template engine was written in C# and making any changes in it required time. The key reason – this template engine was developed by certain people, while used by others.
To my mind, it’s quite a common practice among coders. There is no doubt that coders need tools, but these tools are implemented by people who hardly have any idea of day-to-day tasks we face. I’d even say the approach is often like “let them write conditions and cycles, for coding it’s enough”. Maybe that’s the fault of coders, their skills and experience.
Mail.Ru Group has a team of highly qualified specialists, experts in JS, who are able to write a tool and use this tool.
Second - tasks. Let’s take the project mail.ru. We can’t refuse from a template engine on the sever – we need a quick download at first login. We can’t refuse from a template engine on the client – users should see rapid reaction to their actions, which means AJAX and template engine on the client are essential.
The problem is evident: we have two sets of absolutely different templates on the server and on the client. What is most unfair - they solve the same task. Double work simply crocked us up.
V8 is a JavaScript interpreter, and that means we can have one template for both the server and the client.
Third - speed. After a bulk of articles that say many good words about operation time of v8, we decided to check it. But first we were to understand what we want a new template engine to be.
( Читать дальше... )