DEV Community

Discussion on: Are template engines still relevant in 2020?

Collapse
 
alaindet profile image
Alain D'Ettorre

Any template engine is just an abstraction or a derivative product of HTML, so when the HTML spec changes the template engine becomes obsolete or redundant unless it gets updated. It's always better to stick to standards instead of hoping for maintainers to update a library, my honest opinion

Collapse
 
rzeczuchy profile image
rzeczuchy

You're generally right: a library is updated only as long as it's useful, and it's useful only as long as it's updated. But it's not entirely a closed circle 🤔

There were real benefits to using these standalone engines that we can't overlook - just as there are benefits to using other libraries now (thinking about React here). There is always a chance of something being superseded by newer tech, which is probably what's happening to these template engines at the moment, but I don't think that means you should avoid using libraries altogether. It's just a question of where you place your bets :)

Collapse
 
alaindet profile image
Alain D'Ettorre

After a couple of months, I'd like to add that JS template engines are usually targeted to MVC fullstack applications which are kind of NOT the point of using Node in the backend. It's much better to either go full JSON-only (as in APIs) or use something else for a fullstack MVC app, like PHP. In fact, PHP template engines are much more relevant and used compared to Node's.