DISQUS

Mat Schaffer: JavaScript templates, build-time lovin’

  • Yves (BeeBole) · 2 months ago
    Hey, I would be very interested in knowing what made you go for Trimpath instead of PURE.
  • Mat Schaffer · 2 months ago
    I'll see if I can get some of my coworkers to comment as well, but the decision largely came down to the use of spans and classes for interpolation and iteration.

    We're pretty comfortable with spans and classes designating style. The general consensus seemed to be that giving them a second purpose (content) was a poor fit. We use a lot of Freemarker so Trimpath's use of ${} was a more comfortable progression. Of course I'm sure you could apply this concept to PURE just as easily, so feel free to fork if it if you find it useful.
  • couchoud · 2 months ago
    Mat pretty much sums it up for me. Using span tags was the deal breaker. I'm fine with using span tags to define content, but feared the id/class name duplication that might come along with PURE. It's too easy for someone to reuse a template variable that might be used as a selector somewhere down the line. Also, I personally don't like seeing a bunch of span tags wrapping content. It just looks a little ugly to me.
  • Yves (BeeBole) · 2 months ago
    Thanks both for your comments. The only answer I can give is that it is difficult to seduce everyone ;)

    But feedback is always good :)