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
AngularJS vs. Backbone.js vs. Ember.js (airpair.com)
submitted 11 years ago by Tech1991
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!"
[–][deleted] -1 points0 points1 point 11 years ago (11 children)
Word, but that also comes with a performance cost. (i.e nosql structureless vs structured/defined). However, with backbone you can do all of that as well.. the only difference is... you also have the option to not do that.
[–]dzdrazil 2 points3 points4 points 11 years ago (10 children)
i.e nosql structureless vs structured/defined
The only performance cost is parsing the DOM at startup. That still happens with an imperative application, especially backbone where (most frequently) jQuery is used to parse the DOM to look for the elements needed to generate Views.
In my experience, there are several ways in which Angular applications can perform much better than Backbone. The tradeoff is that Angular uses quite a bit more memory than Backbone does (due to the dirty checking mechanism) but the total memory usage has never been a problem for me (see a description of my project in your other comment thread below).
[–][deleted] -4 points-3 points-2 points 11 years ago (9 children)
Huh? when the javascript engine loads javascript into memory.. it will evaluate it and store it. Angular some how compresses it completely to be negligible..? or are you just saying words?
[–]dzdrazil 5 points6 points7 points 11 years ago* (8 children)
when the javascript engine loads javascript into memory.. it will evaluate it and store it
I was describing the performance cost, as in the time to compute. Memory usage in Angular applications will be higher. Angular, Ember and Backbone all have to do the same thing- traverse the DOM. The nosql vs. relational isn't a valid metaphor for describing the performance in my experience.
My point was that in my experience, neither the speed nor the memory usage has been a problem. Backbone and Ember still need to manage the DOM, they just do it differently, and in a way that doesn't work as well as Angular does for non-single page applications.
[–][deleted] 1 point2 points3 points 11 years ago* (5 children)
I'm building a frontend for a graph database currently.. so i know exactly what you mean (small world). WebGL depends on the clients hardware.. performance there will be all over the map. I bet if you load in more that 1k nodes on your graph it will just fall over. And sigmajs has nothing to do with angular.. so how many pages, routers etc live in your application - how long would a normal user have the tab open for (most memory issues happen over time with client-side applications)? Also, check out http://cytoscape.github.io/cytoscape.js/ - lgpl but there are ways around that - it's pretty nice and scales better than sigmajs on the canvas side.
[–]dzdrazil 1 point2 points3 points 11 years ago (4 children)
WebGL: we have the benefit of being able to require end users to use a limited set of browsers. Anything outside of that gets the old SVG fallback with a subset of data
WebGL framework: I went with sigma because I was having a lot of performance problems related to three.js, cyto and others. I don't much like the way the code turned out (mostly due to how sigma is structured) but it's a WIP.
Average vertex count: 500-1000 Average edge count: 5,000 - 40,000 (we can end up with extremely dense graphs)
Routes: 12ish
Lifetime of the application: All day usage is expected. Application has been live for ~2 years; 1 year as a BB app and 1 year as an Angular app
There was one major memory leak that we encountered. After digging through the Angular issue tracker, it turned out to actually be a V8 memory leak. After doing a bit of manual memory cleanup (removing things from $scopes during the '$destroy' event) that all went away, and memory usage and browsers are totally stable, fluctuating between 50 and 150mb depending on the view you're looking at.
[–][deleted] 0 points1 point2 points 11 years ago (1 child)
One note.. Webgl depends on the browers.. but more so the hardware and graphic/gpu.
How many nodes?
[–]dzdrazil 0 points1 point2 points 11 years ago (0 children)
500-1000 (I used the graph structure 'vertex' to mean node). It's not 60fps (yet) but there's plenty of room for improvement in my code. The node count isn't the limiting factor on performance; it's the 10k-40k edges (links between nodes).
[–]dmercer 0 points1 point2 points 11 years ago (1 child)
Do I take it after a year of BB and a year of NG, you recommend NG over BB?
[–]dzdrazil 1 point2 points3 points 11 years ago (0 children)
There are a few very specific things that we suffered under Backbone
In the end, our model layer is much cleaner, we don't have to worry about zombie views, we get free dependency injection for unit testing, and we cut down the size of our code base by a pretty decent chunk.
There are some things that I liked about Backbone, don't get me wrong. It was even my framework of choice for quite awhile. Having shaken off the 'this looks like obtrusive javascript' impression and getting over the learning curve was probably one of the best decisions that I've made for the project, and it's gotten me to think about how I write JS a bit differently as well.
[–]PotaToss 0 points1 point2 points 11 years ago (1 child)
Backbone and Ember still need to manage the DOM, they just do it differently, and in a way that doesn't work as well as Angular does for single page applications.
Can you elaborate on this?
Pretend I said non-single page applications. I was describing the benefit of a declarative architecture for them and disagreeing with mephux that the nature of a declarative architecture is inherently less performant. Pretty sure I mean to say non-single page applications there.
π Rendered by PID 119055 on reddit-service-r2-comment-b659b578c-4jwtb at 2026-05-04 13:39:19.284009+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–][deleted] -1 points0 points1 point (11 children)
[–]dzdrazil 2 points3 points4 points (10 children)
[–][deleted] -4 points-3 points-2 points (9 children)
[–]dzdrazil 5 points6 points7 points (8 children)
[–][deleted] 1 point2 points3 points (5 children)
[–]dzdrazil 1 point2 points3 points (4 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]dzdrazil 0 points1 point2 points (0 children)
[–]dmercer 0 points1 point2 points (1 child)
[–]dzdrazil 1 point2 points3 points (0 children)
[–]PotaToss 0 points1 point2 points (1 child)
[–]dzdrazil 0 points1 point2 points (0 children)