Skip to content

Templating

SimonPlanje edited this page Jun 4, 2020 · 7 revisions

Templating engine

What is templating?

"JavaScript templating refers to the client side data binding method implemented with the JavaScript language. This approach became popular thanks to JavaScript's increased use, its increase in client processing capabilities, and the trend to outsource computations to the client's web browser." Kind regards Wikipedia

ejs handlebars
ejs handlebars

EJS vs Handelbars

For the templating engine I decided to choose between the two most common engines that had been discussed in class. Handelbars and EJS. To start my researsch I wanderd around on both of the websites, soon I realised that the two engines have a lot common. They both have the same goal and, at the end, I think you can do the same with both of them. The EJS website was a lot more self explanatory and even helped me out to learn more about how templating engines exactly work. Especially considering the fact that I have never been working with these complicated add ons before. EJS had a very nice documentation, Handlebars on the other hand was little more chaotic and a bit more confusing layout for someone like me who is just getting started. So only that already was for me a good reason for me to pick EJS, more clear, nice documentation and easy to use. After tyring out both handlebars and EJS, EJS also seemed to be a bit more error friendly than handlebars. The second I installed handlebars and started playing around with it I kept running in to errors, so have not even got it work. EJS immediately worked fine for me and it is quite easy to implement the Javascript in the in the EJS files.

So I chose for the EJS templating engine! ejs_templating

Clone this wiki locally