Hacker News new | ask | show | jobs
by jsnk 3363 days ago
Glimmer looks awesome! Is it easy switch out handlebars for some other templating language?
2 comments

The typical strategy is to design a language that compiles to Handlebars, e.g. http://emblemjs.com/.

It would be possible to support other languages more directly but they will tend to have a Handlebarsy flavor.

Write in a language that compiles to another language that itself compiles to markup...

The web frontend world is crazy to a backend engineer. We have hard problems to solve too, but ours usually arise from well-understood problems, such as CAP theorem.

It's somewhat jarring when people use "we" as if they're in a faction and they're the spokesperson of that faction. It's almost as bad as using "you guys" when faced with a single commenter.

Anyways, you can't think of a single analogue for the emblem->handlebars example?

It's because my colleagues generally consider the frontend landscape to be the Wild West.

The only analog I can think of is statically typed SQL, which is in fact awesome.

It's crazy, sometimes web frontend is an echo chamber and you will get burned to the stake if you suggest doing anything simpler like just writing markup instead of a template language that translates to markup or a language that translates to that language that translates to markup. But it keeps people employed.
Some days, I can handle the front-end world. Other days, I just want to go back to writing old-school desktop clients in VB6 or WinForms. Mostly, this state has to do with whether the Goldbergian accretion of tooling on the front-end side is working today, or if somebody has deprecated a package and brought the whole Jenga tower down.
I don't believe so. However the rendering engine is optimised for Handlebars, it can statically analyse what parts of your template are dynamic and what are not. I think the performance benefits are worth learning a new template syntax.