It is worth noting that the OP is calling this tool pithy (terse, meaningful). In an application I'm working on [1] I have several lines of jQuery and string concatenation to build some simple content.<p>It's probably overkill to use a full-blown client-side templating engine, but my current code leaves much to be desired. I think pithy.js might be a great fit.<p>[1] <a href="https://github.com/crabasa/seattlehacks/blob/gh-pages/calendar.html" rel="nofollow">https://github.com/crabasa/seattlehacks/blob/gh-pages/calend...</a>
This is almost identical in operation to laconic <a href="https://github.com/joestelmach/laconic" rel="nofollow">https://github.com/joestelmach/laconic</a> what advantages does this have?
Nope. Avoid. Switch to templates at the moment you think you need this kind of a solution. Use for example super comoact <a href="http://archan937.github.com/templayed.js/" rel="nofollow">http://archan937.github.com/templayed.js/</a>
Compared to almost full blown mustache implementation, pithy.js, surprise, is a bloat.
Sorry of being harsh, as a positive note, the code itself, in abstract way is my liking. Very good. May even steal some snippets.
Almost identical functionality appears as part of MochiKit, and I've found it very useful for quick and clean DOM creation:<p><a href="http://mochi.github.com/mochikit/doc/html/MochiKit/DOM.html" rel="nofollow">http://mochi.github.com/mochikit/doc/html/MochiKit/DOM.html</a>
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?
Why is everyone so afraid of HTML that they insist on starting projects like this? I've seen them come and go for 15+ years now and they're never useful. Even less so in the case of using JS to generate HTML because that makes the browser actually work harder.<p>This isn't a knock against OP or the project creator (if they're not one and the same) because projects like these can be useful exercises. But I would never use something like this in production and I would hope nobody else would either.
Also there is DOMBuilder <a href="https://github.com/insin/DOMBuilder" rel="nofollow">https://github.com/insin/DOMBuilder</a> which has separate modes for using HTML mock elements on (node.js) server-side or DOM elements in browsers. The mock elements are implementing only a very small set of the DOM functions, but if you extend it a little then it can be useful to share Backbone-like views between server and client.
I prefer <a href="https://github.com/jed/domo" rel="nofollow">https://github.com/jed/domo</a> to create DOM elements in browser. Its output is a real DOM element whereas in pithy.js, its string.
This is quite interesting, thank you for open sourcing it.<p>I can see how this can be helpful cleaning up e.g. common string concatenation snippets in code bases.