Re:Pithy.js - An internal DSL for generating HTML in JavaScript
by dropdownmenu on Wednesday April 03, 2013 @11:03AM
(#5486466)
Pretty cool project, but I feel kind of dirty having js and html being so tightly bound to each other. Do you have a specific use case where pithy would perform faster or be more cleanly implemented than standard templates?
[ Parent
| on HN ]
Re:Pithy.js - An internal DSL for generating HTML in JavaScript
by danso on Wednesday April 03, 2013 @11:18AM
(#5486588)
From the OP's documentation, I don't think it's intended to be used for large templates where speed of render is important. It's main benefit seems to be as a more readable, less-error-prone alternative to string concatenation, such as in small snippets that are created by client-side-update methods.
Re:Pithy.js - An internal DSL for generating HTML in JavaScript
by grimtrigger on Wednesday April 03, 2013 @12:21PM
(#5487024)
I work on an enterprise platform where I have client side access, but no server side access. My only options for injecting HTML are:
1) cross domain AJAX via CORS
2) Injecting HTML strings constructed in JS
For small amounts of HTML, I'd much rather go with option #2.