4 ms·
I haven't used either of these frameworks but I have used Batman.js[1] which has a very similar feel as Ember.js albeit it's written using CoffeeScript. The tw
by rubiquity 13y ago
I haven't used either of these frameworks but I have used Batman.js[1] which has a very similar feel as Ember.js albeit it's written using CoffeeScript.
The two issues that this author are singling out aren't exactly addressed fairly so I sort of feel inclined to defend Angular here.
Author states that one downside of AngularJS is that it doesn't conform to the Uniform Access Principle. JavaScript the language itself doesn't conform to this either. From what I can tell from my brief review of AngularJS, it tries to be as close to the implementation of JavaScript as possible. I don't see this as a bad thing but rather as a good thing. Using methods like #get and #set drove me crazy when I was using Batman.js. I understand why they exist, but why are #get and #set acceptable ways of accessing object properties but #area isn't? I think they both have the same performance implications, don't quote me on that as I'll never claim to be a JavaScript method cache expert.
His first point is that in AngularJS you don't have a true base object that your models inherit from and instead you use plain JavaScript objects. This sounds like another bonus to AngularJS in my eyes! And if it doesn't seem like a bonus to you, you can quickly create a light abstraction to serve as a Model.
All in all, having not used either of these frameworks this blog post actually makes me want to use AngularJS more than it makes me want to use Ember.
1 - http://www.batmanjs.org http://www.batmanjs.org
- erikpukinskis 13y ago> why are #get and #set acceptable ways of accessing object properties but #area isn't? Because Ember only has to recalculate the area after set is called on length or width. If area is just a function, it gets recalculated every time it's called/get'ed.