Criticisms of Angular
leanpanda.com
leanpanda.com
I feel like Angular's biggest problem is the documentation. It starts out talking about things like dependency injection and why that's good, instead of simply displaying how to use the framework. It's got a steep learning curve and it just seems that people get scared of the documentation and run away before they really give it a try.
I agree on the documentation being unusual. I found the Angular Style Guide to be a huge help: https://github.com/johnpapa/angular-styleguide
Anedoctally, as the author of another JS framework (http://mithril.js.org), I see a lot of people migrating away from Angular due to complexity, bloat and performance issues. I, myself, spent a good two years wrestling w/ Angular problems full time before jumping ship. Our apps were quite complex and we were fully invested in trying to make Angular work, and definitely not just making a half-assed effort to like it. So it's definitely not just newbies.
So while this post is mostly FUD, your points are valid, I feel all frameworks come with a tradeoff.
Making the virtual DOM tree a first-class value that can be treated as a persistent data structure is a huge win. Templates are functions that return a virtual DOM node. Rendering a list is a map from Thing -> virtual DOM node. Redundant rendering is avoided with memoization. "Partials" are just functions. The system handles escaping and prevents XSS vulnerabilities by distinguishing plain strings from DOM nodes, which string-based templating systems do not do. All of the complexity and difficulty of working with templating systems goes away when we can just use the usual functional combinators we all know and love to compose views.
On top of Mithril, I recommend working in a functional reactive library (Kefir, Bacon, Rx, whatever else) to make the whole application declarative and functional. Angular just doesn't compose well with other things like Mithril and other primarily functional libraries do. I should really write a blog post on this.
How are you using an FRP library with Mithril? I thought with vdom libraries you never touch the real DOM.
VDom lets you express UI as a function of the state
Observables let you express state as a function of user interactions
One major problem with older "build-DOM-in-code" approaches was ability to integrate to third party libraries, but I feel that this problem has been solved by newer frameworks (e.g. via lifecycle methods/mixins in React, `config` in Mithril, etc).
Personally, I find that mapping the DOM structure onto Javascript a la Mithril, React, et al works out better than mapping scopes and closures and logic onto HTML (a la Angular), simply because it's easier to refactor code that is, well, code, rather than something that tries to emulate having programming-language-like properties in HTML by shipping its own quirky implementation of scopes, expression parsers, compiler, etc.
I disagree on cost of migration. It's not exactly trivial to migrate from Angular to any framework that I know of, for example, especially once you start using things like form validation flags or filters. The only migrations that sound somewhat straightforward to me are Meteor/Ember (since both use Handlebars flavors) and - perhaps ironically - React/Mithril (assuming JSX/MSX), but for mostly anything, you're pretty much stuck with manually porting framework-specific syntax. With that being said, it's not necessarily impossible. I know of success stories of people porting non-trivial codebases from Ember to Mithril and even from jQuery spaghetti to Mithril (via its template converter too). At the end of the day, I think it comes down to tooling. With React's renderToString or mithril-node-render, it's quite feasible to automate a large portion of the work of porting templates away from these newer frameworks, should you need to do so down the road.
How is that specific to Angular?
The learning curve is steep, but when you get into the groove, when it finally clicks, then you can really take off with it.
I love the tooling (node, Yeoman, Grunt, jshint, karma, protractor etc.). While not perfect, it's definitely helped me write better, more readable code.
The one article that helped me get to my 'gotcha' stage was this one by Todd Motto: http://toddmotto.com/rethinking-angular-js-controllers/
I think part of the problem is that everyone wants there to be The Next Thing that will solve all problems, when that doesn't exist.
Looks to me angular is a round peg disguised as a square one.
React solves all of those in a cleaner way.
>I like using nearly straight up HTML as my template.
And yet you don't. You use Angular-ized HTML as your template.
If you're using Flux, you end up with an immense amount of boilerplate action and store code around every input field. The other option is to violate the model, make all your inputs uncontrolled and have boilerplate onChange listeners for each one.
Choose the right tool for the job. Angular's no-questions-asked data-binding is perfect for this scenario.
For example, I don't find fixing occasional performance issues when using two way binding a big deal. Two way binding makes my UI code much more concise and free from bugs concerning keeping models and the DOM in sync. I've worked with Backbone before for instance and found that dealing with listeners and syncing manually was a huge source of bugs.
Most of the time all you need is a computed property. It simplifies the code base and allows the framework to make optimizations where it needs to. If you really need a two way binding you can always do it with a computed alias.
Thank you! I never understood the big push towards server-side rendering. I did server side rendering for 10+ years in JSP land. I love having a clean separation between client and server, freeing me to experiment with different languages and frameworks on the server side. Likewise, if I want to experiment with a React component consuming my REST API I can. Not to mention my AWS expenses are kept minimal as most of the processing is offloaded to the client side.
> "I like using nearly straight up HTML as my template." Agreed again. Am I the only one who works with people who know HTML, CSS, and a little bit of Javascript who can contribute to the front end design? I feel like if I threw a "DOM in code" type of approach at them they would feel lost.
I personally find Knockout to be almost the sweet spot. Very lightweight, plays well with others, doesn't "take over" or try to impose a top-down ordering on the page.
I know the rest of the developer world has moved on but I'm hoping I can hold on to using Knockout long enough until another MVVM system which separates view and model but binds them together comes along.
On the server side rendering front I'd be curious to know if you do LOB apps. In my in house dev world where people are almost always within 100m of the server and used to Oracle Forms the experience you are describing is easy, fast and blows user's minds.
Why? You're obviously not the only one, considering Angular's immense (and deserved) popularity. The simple fact is that popularity does not immunize it to having some problems. Angular is great, but it's hardly perfect. The issues with scope (gone in 2.0), the complexity of directives (also gone in 2.0, I think) are well known and being addressed.
What's ironic is that angular 2 is fully rewritten in part to fix all of these issues, but none of that is mentioned, and the only focus is on how much Angular 2 sucks because it's not compatible with 1. There is also no mention of clear migration path and ability to run angular 1 and 2 side by side [2]
I've put 4 Angular sites in production and never faced issues due to any of these problems. I've had issues with caching, end to end testing of ajax calls, sharing functionality with non angular parts of the site. The very fact that the OP listed these issues tells me that he's not actually used Angular in production. Angular 1.x has limitations for sure but it works quite well in most scenarios.
[0] http://larseidnes.com/2014/11/05/angularjs-the-bad-parts/
[1] http://jimhoskins.com/2012/12/14/nested-scopes-in-angularjs....
[2] http://angularjs.blogspot.com/2015/08/angular-1-and-angular-...
EDIT: shortened. EDIT2: added conclusion
I've used it in production in a few scenarios and it's worked just fine. They're fairly complex applications and performance hasn't been an issue. Granted, with the author trashing Angular and then talking about how awesome their React article is going to be I think we can all see where this is heading.
Now he says this is a problem for Angular 1.x because there's no carry-over of knowledge into 2.x, but that's in no-one saying Angular 2 sucks like you are suggesting.
Not convinced yet? Well, what if we were to tell you that the next major version of Angular will take a scorched earth approach to the existing structure that means it will have zero retro-compatibility with what exists today?
Did I miss some subtle novelty about this post, or is Angular ennui just that popular on HN?
His JSFiddle examples are all using angular 1.1.5. Angular 1.2 properly binds scope inside an ng-if.
I agree that angular 1.1.5 had it's warts, if that's what this is supposed to be about. The current release version of angular is 1.4, about to be 1.5.
Edit: After fully reading through this blog post; it's almost all wrong.
Dirty Checking: Yes, we have have to sacrifice ease of use for performance sometimes. So keep it in mind and don't make so many simultaneous data bindings. Why you would need 2000+ in any given state(ui-router)/route is just mystifying. Don't abuse ng-model.
Dependency Injection: Are you kidding me? He's not even using the array notation for proper DI with minification.
Pointless Complexity: This is an actual valid argument, and the only one on the blog. Google has some pretty bad documents for angular, especially when describing directives that isolate scope.
Server Side Rendering: Uh, the whole idea behind stuff like angular is decoupled frontends from your server. Build a REST API and point angular at it; no need to ship layout code with services.
Angular 2: There's an upgrade path that should allow the two to exist in tandem. There's no reason to not keep writing angular 1.x code right now. It's not like Angular 2 being released means all your previous code is worthless.
As someone who's going to need to make a recommendation soon about whether or not to use Angular on a new project, this part worries me. The apps my company builds are full of data grids (Enterprise CRUD-based stuff) and it's entirely reasonable for us to have a 100-row grid with 20 columns as just one of the components on our page. So that's 2000 data bindings right there just for the data values. We'd also have metadata on every cell bound to classes and validation state. If we allow in-place editing, a single one of those fields can be updated. We can't have the entire grid re-checked after every update if that's going to hit the limit on acceptable performance. We'd need to limit it to the row (eg: cross-field validation rules) and elements outside the grid (eg: change toolbar button states.)
Does Angular 2 have similar limitations? Should we wait for Angular 3 and Object.Observe?
However, I don't think that the performance hit you would take would be that noticeable depending on the implementation.
Here's a jsperf test that can demonstrate angular performance with 10k watchers:
http://jsperf.com/angularjs-digest/72
Chrome 45 gave me about 3.2k ops/sec
Totally agree, but my business is auto-generating fully-featured applications based on database schema inspection and a code-generation wizard, for clients with large enterprise databases. So the app has to work reasonably well with out-of-the-box generation before we start tweaking it to customize and improve the UI for the most important tables and most common workflows.
Thanks for the jsperf test. It's good to know the range of results for different browsers. Our app needs to run on everything, including Mobile browsers, and that test proves that we can't get away with using the typical Bootstrap responsive "hide some columns for xs" approach. We need to not generate markup for most of the columns at all. That means we're going to have to enhance our generation wizard to let us specify, per-table, device-size-specific column lists instead of just a single column list.
"Performs well with large data sets; even 10,000+ rows"
If the individual cells in your grid aren't changing dynamically, you can use a one-time-binding[1] which will improve performance by removing the watchers after the expression is populated.
You can also always use a directive to do the DOM management yourself, and still use Angular-y templating in the rest of your app.
[1] https://code.angularjs.org/1.4.6/docs/guide/expression#one-t...
You will not regret it.
This is not a solution because the lack of content from the perspective of UAs that don't process JS (such as some web crawlers) decreases search ranking.
The alternative solution for the architecture you propose (0 rendering on the server) is to add a prerendering server between the Internet and your system.
With JS frameworks that do not depend on the DOM, one can have isomorphic JS that runs in both the browser and node. This means the same code can run on the server, for the first request, and after the rendered code is sent down the pipe further requests use the API.
Sending acontent-less HTML with proceeds to fetch something from some API is a non-answer for websites whose search ranking is relevant.
If I had to chose between isomorphic JavaScript + server-side prerendering OR having an extra layer between my frontend server and the Internet, I rather the former – assuming there are no other language/technology requirements.
The public pages I build for my apps are all static html with some JS for flashy crap that people ask for. Search engines don't need to care about the app itself, just the front page, about page, contact, etc, of the biz.
Unless you're talking about a CMS built in Angular, which can get sketchy. Google's web crawler parses JS now anyway, so it shouldn't be a huge problem.
Can I just say that this is the single thing that really irritates me about Angular?
This has been the "gotcha" forever... why are all the guides not using this syntax by default? Why is this just not "the way you do things" if everyone knows this is a problem?
1) Define $scope.obj in the controller, instead of letting ng-model create it for you. [0]
2) Bind to $parent.obj in the inner scope (not necessary in later versions of angular) [0]
3) Upgrade to a modern version of Angular.
I guess that's why everyone complains that it is easier to build a Todo application in Angular but the troubles grow as you grow bigger. The reason why React is successful might be they did get a chance to experiment the architecture on their own things before releasing it to the public.
I used Angular on medium to large web apps in the past and while its easy to get started you always get tons of problems at scale. Staying at scale without problems requires so much discipline its not even worth mentioning.
The two-way bindings are just the wrong way to go in order to keep things simple as you scale. It becomes nearly impossible to reason about the performance of your app or what is going to trigger if you change a model.
This is way, way too complex to build an application. With React most of this complexity goes away. I'm also using React from ClojureScript through the Om library so these might be contributing to said simplicity!
Sort of. The problem React is solving is a subset of the problem Angular is solving. It's a bit more like comparing an older model sports car to a modern engine.
So, both are garages in this sense.
I don't see how this is any different with React. Building a medium - large scale application in React involves just as much complexity as doing it with an Angular app, because you end up adding a Flux implementation (and all of its boilerplate code and ceremony), some sort of routing engine, a testing framework of your own choosing, a myriad of helpers, mixins, and components that a framework like Angular or Ember provide out of the box, and we haven't even started about the increased complexity in terms of tooling; babel, webpack, jsx trasnpiling. Add to that radical new concepts like css defined in your javascript files, the rapid rate at which breaking changes are introduced to React, and the moving target around data handling (Flux is out, Relay is in?) and you find yourself in a very similar situation.
You're comparing a view layer to an entire framework. It would be more apt to compare React to Angular directives but then your overarching point about complexity would be lost. I've worked on large Angular apps and large React apps and I can assure you the complexity was about the same.
For example the module system is made so because at the time, amd, browserify and ES6 modules were not ready.
And the main point of angular 2 is not to remake angular because it was weird, it is to adapt it to new technologies.
The value comes as you scale the number of developers, the lifetime of the software and the complexity of the product. This holds just as much for Java as it does for Ruby or Javascript.
I generally don't like too much structure unless there are clear benefits and DI doesn't seem to hold up on that scale. The problem it's solving has traditionally been solved with a dozen global variables. And while the purists may scuff at this, I find that in practise it's never an issue in otherwise well structured code.
no they don't. That's a fundamental mistake to say that. DI is about inversion of control , modules don't do that.
Now, on the matter of IOC containers, you can easily roll your own or use a sane one (eg, Guava in Java).
The other thing the author didn't mention is you can't debug your HTML templates. With Mithril, you can set a regular javascript breakpoint in your views. Directives and code-in-HTML essentially reimplement a half-assed version of JavaScript. (The same criticism applies to JSTL which throws out a perfectly good language, Java, and forces you to use XML and tag libraries.)
HTML logic creates complexity because it invents a new programming language in the HTML.
The code-as-HTML is the root problem that causes all the scope issues, all the explosion and complexity of directives, filters, and the inability to set breakpoints in views. With Mithril you don't have this whole directive/filters nonsense, you just write functions.
I've written more about this subject at: https://medium.com/@l1ambda/mithril-vs-angular-vs-react-d0d6...
However, once you learn to avoid Angular's pitfalls, it's a very powerful tool for creating large apps that do not collapse under their own weight.
To illustrate, how often do experienced Angular devs make $scope inheritance errors? If you are, you're not using controllerAs syntax and are coding sloppily. No framework can save you from sloppy coding.
But if the docs are bad, and there are pitfalls that experienced Angular devs know to avoid, how can we distill that down into common knowledge that beginners can avoid?
Can you recommend a book or resource that does that?
* ng-newsletter * bennadal.com (fairly advanced, and sometimes unorthodox) * I found the egghead.io videos very helpful when I was starting * John Papa's angular style guide
If I recall correctly, most of the other resources I've relied on were strewn about the web, and not at any one particular website.
This dearth can lead to lots of code smells, bugs, antipatterns, and other grenades that can present significant problems at scale no matter what framework you choose to go with.
So if it's true that many Angular apps have problems at scale — one hypothesis would be that it may be a reflection of the selection bias of those who choose to use the framework. Which is not to say that advanced JS people aren't using the framework (they clearly are) but anecdotally, upwards of 90% of the Angular-based devs I've interviewed or interacted with personally lack an understanding of many of the aforementioned JS fundamentals.
How can you take the article seriously with that kind of conclusion.
And flux is great and React-first, but it's not technically a part of React. And it is also great, having a choice is usually a good thing.
Still I'm skeptical when people are happy just because they moved from angular to react. Or from any X to Y really. Usually the gain comes more just from rewriting things with better understanding of the project and from more established team. No one does A/B studies on it, right?
I can't say I miss anything from angular in React. If anything it's good that React does not try to go too far down the rabbit hole. Which particular functionality is absent in React that you need?
It's a valid comparison, if you feel Angular tries to solve problems you don't have, and in doing so, causes other headaches.
Personally I like the event/component oriented development style of Flux/React over procedural controllers that tend to become monolithic. The browser model was always event based, but with the flood of server side development talent the JSP / ASP controller model trickled over. It takes time for people to realize there is a better way.
Lots of people keep repeating that.
It's obvious he means React + React Router + some Fluxy helper lib.
Just substitute "React-based solution" when you read React, and the whole "apples to oranges" or "Angular has so much more" fades away.
(Not to mention that some of us find Angular bloated in the first place, so that it handles "so much more" is not really an asset for us).
I could ramble for a long time about it, anecdotally; I have peers who use (and seem to enjoy using) Angular (all .net devs), and others who point out its flaws (front-end architects). I find it a very interesting discussion point.
If you're using Angular, the use case might justify the attitude that everyone has JS running. The same people who hold this attitude when making an Angular app might build perfectly serviceable sites to deliver static content without JS.
Having "enough rope to hang yourself" while our devs were just learning Angular led to an unholy mess. Development slowed to a painful crawl.
We hate Angular. We're an Ember shop now. We love Ember!
Angular gives you enough rope to hang yourself. Ember lets you stand on the shoulders of giants.
In my experience with Angular there is a pretty clear logic on how to structure code. I suppose that logic is not enforced so there is nothing to stop developers from just cramming all code into index.thml. Being a dev manager I've adopted feature structure [0] and it has worked quite well across all our apps.
Furthermore there is pretty clear distinction on what kind of logic should be included in controller vs service vs factory vs module. This has made writing unit tests a breeze in my experience.
I'd be curious to hear what Ember constructs exist that helped you so much.
You have the catholic way of coding: believing in a framework like a church and venerating a bloated edifice with multiple weaknesses to support your most complex code.
Most of the angular coder I have met are just lazy coders believing in magic and tradition not wishing to see coding has a hard earned skilled acquired by craftsmanship.
Coding is not a "tradition", it is a "Beruf".
I am a protestant programmer, and I believe I will achieve better code with more hard work and learning than by venerating any bloated layers in between that will come in my profound gained understanding of programming.
[The one relying on his hard work] is like a man building a house, who dug down deep and laid the foundation on rock. When a flood came, the torrent struck that house but could not shake it, because it was well built. (Luke 6:48)
PS: I do angular. I fix my colleagues' works and it always make me want to puke to dig in this insanity everytime.
= Problem #1: Scope inheritance and dynamic scoping
Use directive controllers
= Problem #2: Dirty checking
Use immutability
= Problem #3: Dependency injection
I'm not really sure what the author is saying here. It sounds like he's confused and thinks DI and modules solve the same problem. The one statement he has bolded is completely false: > Angular forces you to use a third, custom designed alternative mechanism: one that is inferior to the already existing mechanisms available. You can use a module system if you want. Nothing is stopping you.
= Problem #4: Pointless complexity
> providers, values, factories, services, constants [...] All five concepts could easily be assigned a single identity. True, so just use providers if that makes you happy. Angular 2 also simplifies things.
= Problem #5: Server-side rendering
He stated a solution for angular 1. Personally, I don't really care about server side rendering so I won't elaborate. Angular 2 will have angular-universal
= Problem #6: Angular 2
> Not convinced yet? Well, what if we were to tell you that the next major version of Angular will take a scorched earth approach to the existing structure that means it will have zero retro-compatibility with what exists today?
> it would be simply foolish to use Angular 1.x for new applications.
LOL, fear mongering. The angular team has already stated there will be a migration path to angular 2. They also announced they will continue to support angular 1 as long as people are using it. It's funny that he complains about angular 2 when it addresses his problems with angular 1.
It's weird, but it's weird in the exact way that JS prototypical inheritance is weird. So it's important to learn.
Anyways the fix is simple, always initialize your variables before you use them. Either in the controller or using an ng-init.
The problem is just that you're nearly a year too late.
- yep angular has flaws (which framework doesn't?)
- ya, it does dirty checking and yes, that might have perf implications if used the wrong way. But hey, 6 years ago when Angular was created it was a revolutionizing idea, and still holds today. Also, at that time no Objecte.observe existed, nor did SPAs really (well..GWT was kinda the solution at that time). But, did u check what they're doing in Angular 2? Heard about RxJS and stuff?
- DI: strange syntax techniques to work around minifiers? You don't really use those, do u? heard about ngAnnotate?
- Oh...AMD, UMD etc...do not dependency injection. And yes, agree, DI together in combination with AMD/UMD/... creates confusion with newbie frontend developers
- Then: Angular 2 is already live on GitHub, for a while; has even it's own webpage online
- and for god's sake..Angular 2 is compatible with Angular 1...read their blog posts, their Tweets, weekly meetup notes and design docs (all openely available on GDocs)
- oh..and there are even some rumors server-side rendering will be possible in ng 2
I like ur blog, but if you go and rant, please check the latest status, inform yourself, then rant. Nothing against critics, they foster discussion, but only if made properly.
I think Google is getting blowback from the "worse is better" crowd that have supported the meteroic rise of c, php and mongodb. Specifically, the "worse is better" belief that:
"There is a point where less functionality ('worse') is a preferable option ('better') in terms of practicality and usability." [2]
reminds me of his criticism of "excessive" features in Angular, even though those features are there for a reason.
Usually, what happens with "worse is better" is that when people start missing key features, a bunch of bolt on pre and post processor tools show up to add features (e.g linters, "strict mode",Mongo migration tools) that weren't needed in the more complete solution.
1.http://news.softpedia.com/news/google-releases-guide-on-how-...
However, I'm very skeptical about Angular 2. For several reasons. First (I tested it) right now, it is way too complex and unnecessary verbose.
They wanted to support future techs like web components, observables (reactive functional programming) which are great, but it's not that easy to use.
Some people will not like the Rx approach which forces one to rethink the way one codes. There is serious mental gymnastic involved here when one has to think in terms of cold and hot streams, especially when one is used to ng1.
Of course, people who love Typescript will enjoy it,and it's true it's easier to figure out what is what with explicit types, but people who are sticking with ES5 for various reasons will hate all the boilerplate needed to get started.
And they went crazy with dependency injection,this time, this is a divisive issue among programmers and while ng1 DI was light weight, ng2 DI is going full Java which Java/C# folks will like, but i'm not so sure about the rest.
The biggest question is, how is ng2 relevant compared to React + Flux/Relay? since it tries to do the same thing but with more complexity? with that weird template syntax ([attr-read-from]="variable" , (event)="handler" ,[(read-write)]="variable", *template-directive="expression" ... )? React has JSX which is a serious advantage.
ng2 will be ready in a year at best but businesses can be tempted to just move to React in the meantime and then stick with that.
.
Angular 2 is still rough today, and that is why it is still in alpha - the Angular team is still trying to figure out what do they need to expose in the framework for consumers to build flexible components. In addition, the testing situation still needs to be refined some. The UI Bootstrap team is in the beginning of migration to Angular 2, and we already came across some pain points that Google is working with us to try to ease as much as possible.
As far as ng2 vs. React - ng2 uses pure HTML templates still. ng2 manages to use this and still optimize dramatically over React due to how change detection works in Angular. The template syntax is not complicated once you get used to it - it is much easier than remembering all of the edge cases that JSX has had to write around (i.e. className) due to issues of conflict with JS itself, and certainly much easier than remembering all of the little caveats and edge aspects of ng1.
Web component support for Shadow DOM is opt-in, and it does use the template tag for custom components. Observables have some overhead, but the great thing is that it is optional for many things, and easy to use when something is exposed as an observable.
The Angular 2 DI is much better than the Angular 1 version - it is much more powerful and doesn't require a hacky implementation due to its use of decorators.
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.
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.
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.
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.
Funny, I could agree this is true for providers or services. Factories however can't be used for singletons, so I'd rather not know how they implemented shared state and utils.
The scoping in AngularJS can be a bit of a pain but I mean, if you know it's dynamically scoped and you know that the directive (ng-if) is introducing a new scope then it isn't the end of the world. Emacs has dynamic binding and it's been working on pretty well so far and contributes to extensibility.
I wonder how the author would convert Angular to use lexical scoping instead of dynamic scoping; would it even be possible without forcing all directives to have a lot of boiler plate?
http://wildermuth.com/2015/09/01/Angular_v_React_v_Aurelia_v...
Easily solved by using the controllerAs syntax
> Problem #2: Dirty checking
One time binding to the rescue here. Been available for a good while now. Dirty checking does suck though but is usually not a deal breaker.
> Problem #3: Dependency injection
The authors main problem here seems to be with problems minifying the code. All one needs to do is to pass in an annotations array which is an established best practice. So instead of controller('ControllerName', function($scope, $someService){}) one should use controller('ControllerName', ['$scope', '$someService', function($scope, $someService){}]) there are other more readable ways to do this such as $inject but I digress.
> Problem #4: Pointless complexity
This is debatable and more a matter of opinion. I disagree and think the glut of the authors woes come from not taking the time to understand the framework properly. The learning curve is steep yes but I've used a TON of javascript frameworks and Angular consistently comes out the winner long term in maintainability and stability.
> Problem #5: Server-side rendering
Isomorphic javascript to the rescue here. React does it better in this case but its available if you need it. Angular is a single page web app. If you knew that going in and have a problem with it now... well lets just say that its important to understand the trade offs that come with any technology one chooses to include in their stack.
> Problem #6: Angular 2
Yes this was a concern, and then the angular team listened to the outcry from the community and now have been developing a migration path for users of the 1x code. They have also dedicated an entire team to continue development on the 1x codebase for as long as it remains popular thats why there are two angular websites.
While I admit that angular isn't perfect (literally nothing is) nearly all of the authors criticisms are due to lack of following best practices. You can find a pretty good summation here: https://github.com/johnpapa/angular-styleguide
https://www.google.com/trends/explore#q=jquery%2C%20angularj...
> we’ve been working with Angular for almost nine months now (the original article in italian is dated February 2015)
it means this post is just a translation of something experienced a year ago (Angular 1.1) A half of the comments reply to solutions arrived on 1.4, with hindsight.
This delay is definitely not clear, but casts new light on the content.
We often qualify Angular as the J2EE of the front.
EDIT: Warranted a downvote. Wow.