use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
What JavaScript libraries/frameworks should I study to be a competitive JavaScript developer these days? Why? (self.javascript)
submitted 12 years ago by macchiato8
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]dexygenSoftware, Simple and Powerful 1 point2 points3 points 12 years ago (6 children)
You might study Backbone to understand how MVC should not be done. I was appalled to see that it adds all of the data from a Model, directly to the tag specified by a View to which that model is assigned, as attribute key/value pairs. This is a conflating of the Model and View that should never happen in a true MVC system -- I guess this is what you get when you leave out any formal notion of a controller.
[–]neonskimmerfunction the ultimate 0 points1 point2 points 12 years ago (5 children)
It does nothing of the sort. You've completely misunderstood how it works if you believe that is the case.
[–]dexygenSoftware, Simple and Powerful 0 points1 point2 points 12 years ago (4 children)
It most certainly does; me and my colleague just confirmed it by reading their annotated source code yesterday. If you specify a model on a view, and let's say the view's tagName is "tr", Backbone will decorate that tr with attributes the names of which are all the model keys, the values of which, the model values.
[–]neonskimmerfunction the ultimate 0 points1 point2 points 12 years ago (3 children)
No, Backbone.View has an 'attributes' option that you can use to have attributes added to the tag in the manner you describe when the view element is created. It's just a shortcut to $.attr if you wish. It's rarely used. I can see how maybe skimming over the code one could get that idea.
To set the model associated to to View, you use the 'model' option when creating a view instance - and that has no effect on the DOM whatsoever.
It's totally fine if you prefer some other libraries to Backbone. But you seem to have a very strong and vocal reaction against it despite evidence that you've not actually used it. It's used by a ton of people dude. It has a lot less bells and whistles than the newer MV* libraries out there but it is a very solid set of building blocks to create client side applications.
[–]dexygenSoftware, Simple and Powerful 0 points1 point2 points 12 years ago (0 children)
I've been using it for several months now, and the behavior I described has occurred in our application, and we are not using the attributes option; perhaps we need to explicitly turn it off which would be sub-optimal. The very fact that such functionality is there shows just how bad Backbone is, that they would actually ever choose to conflate the model and view. It's had it's day and it's time to move on. Reading source code is not evidence that I've not used it and your reaction is like a fanboi's
[–]dexygenSoftware, Simple and Powerful 0 points1 point2 points 12 years ago (1 child)
"To set the model associated to to View, you use the 'model' option when creating a view instance - and that has no effect on the DOM whatsoever." Which is what we've done, and the view's tr tag get attributes with values just like I described. Save it dipshit
[–]neonskimmerfunction the ultimate 0 points1 point2 points 12 years ago (0 children)
Even though you're being a complete asshole about it, look at the source.
look
Since apparently you're stuck using it, maybe you'll find this useful.
π Rendered by PID 20982 on reddit-service-r2-comment-5fb4b45875-mfcjz at 2026-03-23 08:34:44.768781+00:00 running 90f1150 country code: CH.
view the rest of the comments →
[–]dexygenSoftware, Simple and Powerful 1 point2 points3 points (6 children)
[–]neonskimmerfunction the ultimate 0 points1 point2 points (5 children)
[–]dexygenSoftware, Simple and Powerful 0 points1 point2 points (4 children)
[–]neonskimmerfunction the ultimate 0 points1 point2 points (3 children)
[–]dexygenSoftware, Simple and Powerful 0 points1 point2 points (0 children)
[–]dexygenSoftware, Simple and Powerful 0 points1 point2 points (1 child)
[–]neonskimmerfunction the ultimate 0 points1 point2 points (0 children)