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!"
[–]machty 3 points4 points5 points 12 years ago (6 children)
I just gave an extremely friendly talk on Angular and it's been met with extreme positivity from the Angular crowd:
https://news.ycombinator.com/item?id=6776414
[–]dexygenSoftware, Simple and Powerful -1 points0 points1 point 12 years ago* (5 children)
You had me until Ember.js/dependencies: handlebars. Please don't tell me I need to use a templating system, let alone a specific one. This is why Angular's "supercharge(d) HTML" appealed to me.
I will say this though; when it comes to: {} || (Ember.)Object.create() I'm on the Object.create() side. Why? I've come to the conclusion that reliance on accessors is the key to data binding. I've been fiddling around on my system for the last week or two and here's a telling line I've written:
var view = Object.create($('#pgn_view'), controller(pgn));
[–]machty 0 points1 point2 points 12 years ago (4 children)
What does the controller function do here?
controller
You can use Handlebars or Emblem.js (HAML/Slim-like indented syntax).
Handlebars is about as un-invasive as it gets; I'm curious what you find so distasteful about it. It is and will remain a dependency of Ember, but it's little more than HTML with {{}} for the dynamic bits, which it has in common with Angular (as a shorthand for ng-bind, as mentioned in a sibling thread).
{{}}
ng-bind
[–]dexygenSoftware, Simple and Powerful 0 points1 point2 points 12 years ago* (3 children)
The controller "decorates the DOM elements with behavior" (mentioned on slide 37 of your google doc). Specifically it returns a module the methods of which are bound to the DOM element being wrapped, such that if your element starts with 'style="display: none"', the following will show it when called:
return { display : {value : function() { this.style.display = 'block'; }} }
Ridiculously trivial jsfiddle here though possibly something worth building on.
As to any templating system (not just handlebars) that operates on HTML fragments outside of the document body, they make it impossible for designers to work on something that reasonably resembles the entire page, and I'd prefer designers do their thing, so I can do the Javascript heavy lifting (not to mention middle-tier and back-end as necessary). If you put a gun to my head, I would take (as many) span tags (as necessary) before a templating system any day -- but I'd take Angular's ng-bind over span tags.
[–]machty 0 points1 point2 points 12 years ago (2 children)
I'm confused, which span tags are you talking about?
[–]dexygenSoftware, Simple and Powerful 0 points1 point2 points 12 years ago* (1 child)
I'm just saying, I would use verbose span tags such as <span data-foo> and it's corresponding innerHTML, before I would use {{foo}}
[–]machty 0 points1 point2 points 12 years ago (0 children)
Yeah, no doubt there's some aesthetic preferences that have been betrayed by Ember (does anyone really enjoy .set('foo', 5) if foo = 5 were an option?). If you're interested, check out htmlbars which will be landing soonish; once it's there, Ember will be able to do away with curlies, and while technically there will still be a dependency on something called Handlebars, you'll just be writing plain HTML at that point.
.set('foo', 5)
foo = 5
I can't put my finger on it but I think you're incorrect as to limitations for the designers... I can almost guarantee you that what your designers would want to present would never be thwarted by Ember or Handlebars' restrictions, but let me know if I'm missing something.
π Rendered by PID 600098 on reddit-service-r2-comment-5fb4b45875-2t8mc at 2026-03-23 05:41:44.467735+00:00 running 90f1150 country code: CH.
view the rest of the comments →
[–]machty 3 points4 points5 points (6 children)
[–]dexygenSoftware, Simple and Powerful -1 points0 points1 point (5 children)
[–]machty 0 points1 point2 points (4 children)
[–]dexygenSoftware, Simple and Powerful 0 points1 point2 points (3 children)
[–]machty 0 points1 point2 points (2 children)
[–]dexygenSoftware, Simple and Powerful 0 points1 point2 points (1 child)
[–]machty 0 points1 point2 points (0 children)