Joe Maller.com

Re-thinking AngularJS

The Angular 2.0 preview roadmap was recently posted to HN and after reading it, I’m starting to think adopting Angular might have been a mistake.

Having built a few small projects with AngularJS, I’ve found the framework a pleasure to work with. Once past the initial learning curve, features started flying together. Most of my trouble-shooting time was spent getting backend data delivered correctly, Angular just worked. Based on this positive experience, I’ve been moving towards adopting Angular as the standard frontend of my web toolkit.

Choosing Angular wasn’t without doubts. Introducing this many new conventions, syntaxes and practices doesn’t come without a cost. The problem with re-invention is longevity: Either these new ideas succeed and become the norm, or they’re left for dead on the side of the road as technology marches on.

Parts of the 2.0 roadmap sound great. But it also sounds as if this future Angular will be very different from the Angular we know now.

How big is this rewrite?

Huge revisions rarely end well. From-scratch rewrites have famously been called the “single worst strategic mistake that any software company can make.” The goals always sound noble and the plans make sense, but by definition, engineering resources will be split between maintaining the original version and developing its successor. Either the original suffers or the rewrite falls behind or both.

Does a revision of this scale imply that the current codebase is impossible to maintain? I’ve looked through some of Angular’s source code, there’s some near-magic craziness in there. Is it too crazy?

If the Angular team doubts their own code and will presumably move towards conventions used in competing frameworks, wouldn’t it be smarter for users to jump ship now for those other tools? Competing codebases automatically become more mature if Angular basically starts over.

Questions about backwards compatibility

Regarding porting from Angular 1.2.x, the devs imagine “porting will be fairly straightforward but not free.” The arrogance of this position makes me doubt Angular more than anything else. The JavaScript world is ruthlessly forward-looking and moves very, very quickly. If upgrading to 2.0 is only moderately less painful than switching to another framework, Angular is doomed.

Angular blindsided many enterprise users in December 2013 when they announced they were dropping support for IE8. Even without API changes, jQuery’s usage statistics show their ie8-incompatible 2.0 branch is seeing dismal adoption rates. Python 3’s breaking changes have been a disaster for their mindshare. PHP’s dogged insistence on keeping nasty old code working is likely a factor in that language’s recent renaissance. Existing Angular code should probably be considered end-of-life.

Documentation fragmentation

Angular’s documentation has been a problem area for years. There’s no reason to believe documentation won’t lag behind again if the core functionality of Angular is significantly changed.

Outside resources and tutorials are a different problem. Most won’t be re-written, and search results will end up polluted with out-of-date information.

Google’s track record

When it comes to supporting technology, Google is phenomenally undependable. They’ve acquired and demolished a ton of popular web products (Reader, FeedBurner, Blogger, Picnik, Buzz, Wave, “Don’t be evil”, etc.). The only thing they’ve stuck with is the horrid Google+ monstrosity. Google’s support for the Angular project was initially an argument in favor of adoption, but really, the Google name is neutral at best and almost a negative. At least the Angular source code is open source and out in the wild.

And then there’s AngularDart. Google’s Dart meta-language seems kind of stupid to me, but for the most part, so does CoffeeScript (though my resolve is weakening). At very least Dart feels like one of those throwaway side-projects that a rogue team of Google super-geniuses put together–I don’t expect it will have a long life. Dart aside, the bigger question is the resource-cost of supporting a large, complex framework across several languages/dialects. This lack of focus doesn’t build confidence.

What’s next

I’ve really enjoyed working with Angular, but I’m doubtful for its future. Over the years I’ve seen too many great products die from rewrites or overly ambitious direction changes. The first Great JavaScript Awakening saw dozens of libraries before jQuery eventually won out. I hope I’m wrong, but I’m going to be looking at Backbone again, as well as React, Mithril and anything else to fall back upon if Angular proves to be a dead end.

Joe Maller
March, 2014

cross-posted here: https://gist.github.com/joemaller/9643049


  • randomNoob

    Have you looked into Polymer? The only “problem” with it is it too focuses on evergreen browsers, like angular 2.

    Love the posts! Keep them coming!

  • Ella Mapple

    Certifications will definitely increase the
    salary significantly. For project management professionals, I would suggest
    them to attend any genuine agile
    scrum certification
    courses (eg. Scrum
    Master Certification
    ). If not anything, at least it will give a boost
    to your career and salary.

  • Olivia Jennifer

    To stop making avoidable mistakes in project
    management one can also try attending good PMP classes conducted by
    any of the PMI registered REP’s for gainig expertise best processes of project
    management. Any good PMP prep
    course
    will provide students with lots of actionable insights in
    project management along with preparing them for PMP certification.

  • gotofritz

    As you said, AngularJS is open source, and there is a vast army of good developers using it – even if Google drops it, it won’t die (or at least, not immediately), someone will take up development of it.

  • Fabio Biondi

    I think anybody should use what’s better for him.

    I often use Angular 1.x in my projects simply because is one of the best solutions to create fast, solid and scalable web and hybrid applications/prototypes.

    When a better framework (angular 2 or whatever) will be released, I probably will try and use it.
    So atm I don’t see any reason to change but however I agree with you about the risk to change so many things.

  • Jonathan Birkholz

    +1
    The more I see of Angular 2.0, the more I want to move away from Angular. The appeal of Angular was that it just worked and I could get things done. I obviously don’t have enough hands on coding experience to say 2.0 isn’t fantastic. What I can see though is that it isn’t Angular. They might as well call it something else.

    • Phil

      Look at aurelia.js. Its Fine Art done with JavaScript. The only reason why I have not explored it more in recent months is because Angular has a brand name that opens doors…

  • http://wizardsofsmart.net/ panesofglass

    One point I haven’t seen discussed much is that where Angular 1.* allowed you to supply functions as parameters, Angular 2.0 is looking to adopt classes as much as possible. For those with a bent towards OOP, that’s probably terrific news. I’m a FP kinda guy, so one of my perceived advantages of Angular just walked out the door. I’m keeping an eye on React, Mithril, Ractive, and WebSharper’s UI.Next, as well as potential uses of js-csp and transducers. Things could get interesting over the course of the next year.

    • hhvdblom

      the classes thing is raping javascript. they want javascript to be something its not. all those javascript frameworks want to do to much. Mithril may be can do the trick for me.

  • http://www.jobsfame.com sanjana agarwal

    I’m glad you enjoyed the post.- I like that. A little tormenting is always good .Thanks for sharing all of your wonderful ideas here! You are a great blogger and a great teacher! You are awesome! Keep on teaching, Teacher! Naukri

  • hhvdblom

    I looked at Mithril, its Simple, the fastest there is and Compact the way I think it should be. Next project I will use it in combo with jQuery because I use the super jqGrid component.

  • Phil

    I think we better re-think Twitter Bootstrap instead. Angular 2.0 came like 4 years after Angular 1 came out. Angular 1 is dated and React.js was eating Angular’s lunch bit by bit. It made sense to reboot. Twitter Bootrap has breaking changes/reboots almost annually- to the point where upgrading is a pain and you are doomed if you are 2 versions behind.