4 ms·
> Performance is a big one for many. Given how poor Angularjs performs that's not really the point of Angular. > such as use of global DOM selectors like $(
by camus2 13y ago
> Performance is a big one for many.
Given how poor Angularjs performs that's not really the point of Angular.
> such as use of global DOM selectors like $('.foo').
Which is perfectly valid especially when doing event delegation.
The point of Angular is not to replace jQuery,the point of Angular is to have a clean way to integrate DOM manipulation into pages that have a complex application logic. Something devs should do with or without AngularJS,just that Angular forces (some) S.O.C.*
But one still does DOM manipulation in directives. with jQLite BUNDLED with Angular. AngularJS is no magics ,AngularJS has its own limited jQuery. Makes sense because the unique point of jQuery is DOM manipulation,not building applications with complex logic.
So people saying "I replaced this fairly large jQuery app with AngularJS" are lying, You cant write a "fairly large app" just with jQuery,You need to roll your own framework on top of it, at least.
* : My advice to anyone jumping in the next framework bandwagon is never couple your application logic to any framework. But that's what we see with AngularJS, everything in controllers or services tied to AngularJS apis... so much for separation of concerns...
- singingfish 13y ago> But that's what we see with AngularJS, everything in controllers or services tied to AngularJS apis... so much for separation of concerns... The web is a complex beast. Front ends doubly so. The idea here is to keep your web based interactions as thin as possible and keep all of the logic in the business logic models. Combine with dumb templates and you have stuff that will scale out or up fine, given the availability of appropriate processing power on the client end.
- Bahamut 13y agoNot sure about what you mean about how poor Angular performs - Angular performs pretty well, unless you're naively doing inefficient things. I've written some medium sized Angular apps that are pretty performant.
- lerouxb 13y ago> unless you're naively doing inefficient things This counts for anything including your original jquery example.