Hacker News new | ask | show | jobs
by lmm 721 days ago
> It sounds like your issue is with the syntax of Jinja, and the hellscape of HTML email. I'm not sure how 20 MB of inscrutable JavaScript would help, considering it's also just template rendering with extra steps

20MB of inscrutable JavaScript allows you to have a) a sane structured component system where you can actually build up UIs compositionally rather than a flat glorified string substituter (i.e. not actually "just template rendering"), and b) the control and abstractions needed to make good UIs out of nested tables.

2 comments

you can compose UI on the backend without string substituting. Are you under the impress that JSX is some sort of thing exclusive to Frontend?
> you can compose UI on the backend without string substituting.

Sure, but you're still going to be using "20 MB of inscrutable JavaScript". (Unless you use Wicket, but I'm not sure that's an option for emails, and would likely trigger the same complaints anyway). I mean, I hope you're not using the component style rendering layer for Python that I published ~10 years ago, because I haven't maintained it, and as far as I know there aren't any others.

20 MB JavaScript is much less bad when you’re not sending it to the client.
And all this for marketing emails nobody reads anyway.