3 ms·
This is getting way too many votes for what amounts to bad advice. I think you should keep subview rendering methods out of your templates (i.e. keep your templ
by jcromartie 14y ago
This is getting way too many votes for what amounts to bad advice. I think you should keep subview rendering methods out of your templates (i.e. keep your templates "dumb"). You can just create placeholder elements in the template, and then pass the placeholder element to the subview constructor. Or you can just append a list of collection-based subviews to a single container element.
You should be able to write Backbone apps without resorting to stuff like $("#row_#{@model.id}")
And for an example, here's a gist https://gist.github.com/2931491 https://gist.github.com/2931491
- slewis 14y agoHN is about interesting discussion, and this article has generated that, so maybe it has just the right amount of upvotes?
- laserDinosaur 14y agoAssuming people read the comments
- koide 14y agoFWIW, I read the comments first to make a decision whether to read or not the linked article.
- BHSPitMonkey 14y agoPart of the problem is that people will inevitably associate upvotes with a consensus of agreement with the author, and thus trust advice they probably shouldn't.
- rudasn 14y agoNot necessarily. I often find my self upvoting articles that either seem interesting or have interesting discussions in order to go back to them and review them. Most often than not I read the comments first and then the article. If someone would implement some code pattern depending on the number of votes that pattern has on HN they have a bigger problem than how HN voting works.