I won't be using Angular for my next project...and neither should you.

added by Robert Greyling
1/27/2015 8:35:21 AM

52 Kicks, 54517 Views

Here's why: TLDR; * Angular 2.0 is a ways off and doesn't fix any of today's problems * Views and data-binding are a mess, and seriously degrade performance * Juniors are learning bad habits instead of good practices * There are way better players in the ecosystem today worthy of use


14 comments

Dom Barker
1/28/2015 6:09:49 AM
hey rob, can you elaborate on the bad habits that juniors are picking up? I'm curious!

Robert Greyling
1/29/2015 9:29:58 AM
Hey Dom, sorry about the delayed reply. I started responding and eventually realised I was composing an entire article :) So I did the logical thing and [created it here](/stories/3718)! Hope that answers your questions.

Dom Barker
1/28/2015 5:21:11 PM

Paul Wheeler
1/28/2015 8:14:15 PM
We're currently using Angular at work and luckily haven't run into any issues. That's probably because we're using it in a very simplistic way to render the views and all the important stuff happens behind the api on the server. I've read enough articles at this point that I'm almost just waiting to find myself in some sort of situation that I can't find an elegant way out of, but gladly it hasn't happened yet (we're up to about 30 screens or so on our current app). I've got to say that Aurelia looks like all the stuff we love from Angular without the needlessly complex nonsense, so I wouldn't be surprised if we start spiking with it at some point.

Robert Greyling
1/29/2015 9:45:49 AM
hey @paulwheeler - is you're lucky enough to be able to move onto something like Aurelia, I would definitely recommend it. Been spiking a few things out over the last few weeks and there's some seriously good stuff there. The packaging side still has a ways to go, but it's great for dev POCs at the moment

Braun Goodson ✞
4/8/2015 11:44:27 PM
I've literally never signed up in such a hurry to comment on such a bloated and undermining article. As I read this--with a haste of excitement that someone finally found a legitimate reason why angular should be avoided--I immediately began to suspect the writer was, "one of those .NET guys." Fortunately, my intuition was correct. The more I read the less I saw in terms of actual facts and examples that prove angular should be left in the dust. As a matter of fact, there really only are two pseudo-true statements, and one actually true statement, in the entire article: the first being that angular does pack everything javascript under its hood (which, well, duh, that's the point of a front-end framework), the second being that it's too loosely declarative in the sense that it's easy to use it incorrectly, and the third (the only real true statement) being about angular's two-way data-binding performance (which can easily be resolved with react virtual dom). But, we're adults here. So, let's act like it. Anyways, in the end, I'm laughing, because .net is what should be avoided, not angular.

Aidan Gee
4/10/2015 9:35:14 AM
Hey Robert , I use Angular a lot in my job and personal projects and although some of your post sounds very anti-angular I do think you make some great points. I've been a developer professionally for around 3 years now and been using angular for about 2, so have immediate experience about how it can obfuscate your view on javascript as a junior. It's quite easy to pick up angular as a junior and follow the documentation to create great apps with essentially little knowledge of whats actually going on... it just works. This is fine until the next new javascript framework comes along and your essentially starting again because you don't have that core knowledge. Not sure I agree with your pretty gruesome analogy of "like a cancer in your views" though. Maybe its because i've just become accustomed to it over the years but I think angular gives you some good ways of keeping your HTML looking like HTML. Good post , made me think. Ultimately, theres so many javascript frameworks now is there really a right / best choice?

Robert Greyling
4/10/2015 1:31:02 PM
Thanks for your thoughts @Aidygee - it really helps to hear from devs who are fairly new to Angular and JS at the same time - I sometimes forget. For me I jumped for joy when Angular came out, but I had been writing JavaScript since 1996, I've been through some pretty interesting times and already had a decent foundation of knowledge in place before ever picking up Angular. I loved how easily and quickly you could get up and running and build something useful - it was quite literally the silver bullet I'd been looking for when it came to apps on the web. I was very careful (just like you) to keep my views tidy, but only because I had past experience of the pitfalls and I was aware of just how ugly they can get as I'm sure you've seen in your two years of using it. My analogy of "cancer" came about because just as a patient doesn't necessarily notice the signs of cancer and it can progress pretty far before it's caught, so too did I see this same thing happening with my junior developers. The number of code reviews I sat through, painstakingly explaining what was wrong, and why, and how to do it better was for me a massive time sink, and I think this article (and the follow up one specifically about juniors) was the result of the final straw that broke the camels back. The choosing of my title for this was very deliberate as you can imagine. The last part might seem quite sensationalistic (...and neither should you) - and I can see that now, but at the time my thoughts were: _this is my advice to you developer - don't use it_. And the inclusion of the the words "next project" was also very deliberate for many reasons which I highlight in the article. Angular 1 in my view is too painful to introduce to new developers, and Angular 2 is close enough to release yet and changes a bunch of stuff, so we're stuck on the Angular front, can't use v2 yet and don't want to use v1. Does that make sense? I don't want to throw away the Angular knowledge I've built up over the last few years, nobody does, so of course I'll be taking Angular 2 for a spin and see how it holds up against some of the new players in this space. You ask a question as to what is the right choice, well far be it from me to dictate, but since you asked, here is my opinion as of now: For me React is doing some very interesting things in this space, and is worth checking out, but as many will tell you, it's not a framework, it's really just a rendering engine when you boil it down, but it's a good one at that. From there you need to introduce something like a Flux framework, Router etc to build some real apps with it, but that does kinda make it modular enough to give you the freedom to choose - sometimes that freedom makes it harder though. Secondly, you've got Backbone, and what I like to think of as the spiritual successor Ampersand which takes the best of Backbone and has achieved a truly modular solution which I really like the look of. I've built some POC stuff with it and so far it really shines. Lastly, and this would be my current personal favourite, is the Aurelia framework for a number of reasons, and I'll be writing another article here in the next few days which will include a full breakdown of why. But the key factors that attract me are: I'm writing ES6 today, the getting started story is nothing short of braindead simple, the docs are good, it's incredibly modular - I could render with React if I want - and the community around it is unbelievable when you consider it doesn't have a Google or a Facebook to push it yet. Anyway - thanks for stopping by - great to get some feedback :)

John
5/28/2015 5:04:23 PM
I'm surprised you made no mention of Karma or Protractor and the TDD foundation behind Angular development. Closely integrating unit and E2E tests into the daily development process is a huge component to Angular, not well matched by any of the other client-side frameworks. I think that's a big part of why it's so attractive. I'm also quite happy that Angular 2.0 is a long ways off. I don't agree with the structural changes that have been proposed and I will likely stick with Angular 1.x even after 2.0 is released and stable, at least until I have a working grasp of ES 6.

Robert Greyling
5/28/2015 5:08:26 PM
@real_currents Hey John, thanks for the comment - glad you like the site :) Good to have you back! I've used Karma, Jasmine, Protractor etc. in any number of combinations across many projects built in Backbone, Angular, Durandal, Ember, Aurelia, Mithril - you name it. It's definitely not unique to Angular :)

Guillaume Balaine
6/7/2015 8:01:26 PM
@RobertTheGrey So you've been using an E2E testing library and tool created by the Angular team which you rant don't design their framework for testing. Okay.

Robert Greyling
6/7/2015 8:23:49 PM
@Igosuki If you're using Protractor to test logic that should be in your controllers, but has actually leaked into your views, then that's part of the problem I mentioned above because I believe it makes apps hard to debug. Unfortunately, it's one of the traps that many people fall into when building with Angular. At no point did I say (or rant) that Angular wasn't designed for testing - it's JavaScript, of course it can be tested. But there are such things as brittle tests. Those often come from relying on E2E for logic (or unit) tests instead of simulating pathways through the software which is its primary focus. Embedding logic in your views is a first class ticket to that world of pain. Let's also make one thing clear - the "Angular Team" that built Angular back in 2009 is significantly different than the team who built Protractor in 2013 - even if it's some of the same people, they will haven't learned a lot in 4 years. And the proof of that is evident in the way Angular 2 is designed - it's very different to v1 with many of the learnings applied.

John
5/28/2015 5:05:10 PM
P.S. JSK is looking great. Glad to see some original articles here :)

Thomas Roch
7/17/2015 5:15:20 PM
I don't think Angular is that broken, but it is a complex tool (too complex) that you can't put in everyone hands. The learning curve is long and it takes time to settle (that's true for a lot of frameworks). From experience leading a team on a greenfield project: not everyone gets it, and things can spiral quickly out of control (I used to live coming back from a two weeks holiday). However, there are some good bits with angular: use of promises, factories, code reusability, dependency infection... A lot of skills acquired with angular are transferable. Its main issues are ignorant watchers, app wide digest cycles and directives are non composable. I totally agree with your parallel with SharePoint. I consulted for 6 months on angular based applications on a horror codebase, mostly written by designers and .net devs, and people had had such a bad time on it that none wanted to question their own codebase and skills. But i don't know whose fault it is: an industry moving to quickly creating its own skills draught, angular marketing itself as super heroic or being too popular (so devs are not trained enough or don't realise it). A bit of everything I think. And oh, the angular community is also responsible for spreading misuse with bad boilerplate code. Google too with angular material. I don't want to finish on a too negative note, there are great things with angular and it is possible to create very good apps. I always feel it provides a good skeleton, the view lets it down.

Robert Greyling
7/22/2015 10:29:46 PM
Thanks @tcroch for the insights. Who knows what will happen with ng2.0 in the next few months, but we will see. I do hope the community don't end up spreading the misuse once again and that the team are very clear with best practice guidance. I think the lack of that strong guidance is a big part of the reason Angular has become so hard to find good examples/docs for.