News for hackers. Stuff that matters.
Re:Rivets.js - Binding data to views by ansman on Saturday July 07, 2012 @02:41PM (#4212366)
But on the other hand the view has to know about the template.

Change a tag name or class name (which I think is far more common than attribute names) would then break the relationship.

Re:Rivets.js - Binding data to views by joshontheweb on Saturday July 07, 2012 @02:54PM (#4212385)
This is true. However, the view already has to know about the template. The only difference is the how much it knows. It will add some extra responsibility if you change your classes a lot but I think I might prefer that over muddying the html with attributes and filters. Another thing that would be cool about a hash in the view is you could apply filters and presentation logic to the values there in a DRY way. Hope my tone doesn't come across as combative or dismissive. Thanks for taking the time to open source your code. I've just been thinking a lot about this recently.
Re:Rivets.js - Binding data to views by ansman on Saturday July 07, 2012 @04:02PM (#4212555)
Hehe, it's not actually my code, I just found this gem and I liked it :)