3 ms·
> ng2 manages to use this and still optimize dramatically over React due to how change detection works in Angular. That's what the angular team claims yet, the
by aikah 11y ago
> ng2 manages to use this and still optimize dramatically over React due to how change detection works in Angular.
That's what the angular team claims yet, there is absolutely no proof that ng2 templates are faster than React, and I did my own benchmarks. You can say "it's still alpha" , but if speed is a business requirement for ng2, alpha doesn't fulfill that promise.
> The Angular 2 DI is much better than the Angular 1 version
Better or more verbose and complicated ? I just don't want to do that kind of DI in the front-end. It will lead to people over engineering their code bases. It will lead to bad and verbose code, everything what front-end development should not be.
- Bahamut 11y agoActual benchmarks would disagree with your claim - the Meteor team did a benchmark and found Angular 2 significantly faster than Angular 1 (I hope so), React, and their own Blaze. The perf gap increases dramatically with the more DOM elements worked with - the best part is that the Angular and Meteor team's benchmarks are both open source! (The Angular team does not compare with React, just Angular 1 and a baseline of no JS generated DOM) The problem I have found with most codebases written with angular is by far the underengineering put into it, sometimes to an appalling degree. The new DI is pretty simple - specify an array of services, or just define the array elsewhere and import it in and set it to a config onject. There is not much complexity on the user's side.
- aikah 11y ago> the underengineering put into it, There is no such things as underengineering, given specific business requirements. On the other hand, writting useless code is something I often see with people abusing IoC containers like Spring. If a minimal codebase passes the acceptance tests it is not "underengineering" ,it's actually doing one's job as a developer. Anyway i'm really against the lack of pragmatism in the new DI. But don't worry , by the time ng2 is realised you'll see an avalanche of blog posts about how horrible it is. Mark my words.
- Bahamut 11y agoThere is such a thing called underengineering - it happens quite often at dev shops where developers do not plan their code out with flexibility, clarity, and modularity, where you run into poor abstractions that are inflexible because not enough thought went into what approach would work best for potential business needs...and unsurprisingly, that sort of code often is difficult, if not impossible, to properly test. Re: ng2 DI, I disagree, I have used the ng2 DI system for almost a year now, in production code as well for a large part of it. The new DI is decoupled from any framework, allows multiple injectors, avoids verbose hackiness, and is more natural to use - all significant improvements to ng1. There is literally nothing lost, only additions in terms of features and flexibility.