22 ms·
Using server-side templating is another layer of complexity on top of your stack, that just glues together your output. These template languages are not easy to
by mzronek 2y ago
Using server-side templating is another layer of complexity on top of your stack, that just glues together your output. These template languages are not easy to learn. Custom code for loops, escaping, template inheritance etc. Sometimes these are also hard to debug. The documentation of Jinja is huge.
Things get worse when you bring Javascript into the mix. You need to create Javascript code with your template engine without any Javascript toolchain.
Hard no to the string concat approach for me.
- TekMol 2y agoHow is React easier to learn and debug?
- mzronek 2y agoWith Full-Stack React you will use JSX to directly render HTML. Logic is done with Javascript, so you don't need to learn an additional language. There is also no mapping to Javascript and you can use the standard toolchain (for debugging).
- TekMol 2y agoHow does JSX "directly" render to HTML? Have you compared the codebase of the React to EJS? EJS is much more direct. And the logic is also Javascript. What do you mean by "no mapping to Javascript"? It is not as if React is part of the Browser API.
- mzronek 2y agoHow do you get the server-side data to client-side Javascript? For example an array of strings or an object.