4 ms·
The "point" is server-side vs client-side templating. It's easiest to keep everything in one templating system and language. (Note: I said easiest, not most ro
by paulddraper 10y ago
The "point" is server-side vs client-side templating.
It's easiest to keep everything in one templating system and language. (Note: I said easiest, not most robust or ideal.)
Options:
1. Isomorphic code. This requires either NodeJS or compile-to-JS tooling.
2. Client-side-only: bad for SEO and usability.
3. Server-side-only: You either write several lives of boilerplate every time line your example, or use intercooler and write a single-liner.
- throwawayReply 10y agoWhat's wrong with "boilerplate with code-generator"? For smaller sites, the number of parts often isn't huge, so boilerplate isn't a big deal.
- paulddraper 10y agoI probably don't understand what you mean. Generating code in a Turing-complete language use a program written in another Turing-complete language can get messy.
- throwawayReply 10y agoI mean scaffolding. Just because something is turing complete doesn't mean that a generator has to be able to generate anything possible. If boilerplate is an issue, scaffolding / code generators can be a quick fix.
- paulddraper 10y agoCan I have intercooler do that scaffolding for me?