We Have Seriously Underestimated Angular

I was putting together the keynote for the upcoming NativeScript Developer Day conference, and I had a slide placeholder in to talk about Angular. NativeScript has supported Angular 2 since it was released in RC at ng-conf in May. You can check out our quick 2 minute segment of the keynote where we announced our support…

As I was putting together the slides, I thought, “What exactly am i going to say about Angular?” Hasn’t everything already been said? Like 20 times? Instead, I started doing some research into exactly why we chose Angular 2 for NativeScript to begin with.

I always thought that it was based off of an email that Brad sent me in February 2015…

email-from-brad

At that time, NativeScript was already at beta and headed for a full release (May 2015). We had our own binding framework, as well as full support for TypeScript and ES6. I remember thinking, “what exactly do we need Angular for?”. Angular 2 looks complicated, they seem to re-write it every 2 weeks and it feels like an uneccessasry tax to pay on JavaScript.

I, like so many other people, seriously underestimated Angular.

There have been so many articles on React, Angular, blood, guts, and how all JavaScript frameworks are more or less killing us slowly like too much Taco Bell (which, btw, is super unfair because Taco Bell has done a lot to improve the quality of it’s food lately). Man, is it easy to just completely drown in the noise. We also tend to forget why we even made certain decisions in the first place. I’m not sure how anyone ships anything anymore.

I got caught up in this nonsense myself. As it turns out, there are really good reasons why we chose Angular for NativeScript. We could have chosen React, Aurelia (an excellent framework right there) or any number of others. I mean, we could have fully implemented jQuery for NativeScript if we wanted to.

But we didn’t. We went with Angular. And the reasons why are far bigger than you would expect. Starting with the fact that nobody fully understands the adoption Angular enjoys.

Angular Adoption

We knew that we needed to provide an application framework for NativeScript. We still have our own binding solution and vanilla JavaScript model that many developers love, but a great many more need more from NativeScript than just “go nuts with JavaScript”. That’s where Angular comes in.

I don’t think anyone would argue that Angular is popular. I just think that nobody really understands how popular it is. Consider this scoped Google Trends graph…

google-trends

When you look at this strictly from the angle of what people are searching for, Angular has nearly twice the adoption of the next highest. I didn’t even include any others besides React in the comparison because they are so slight that they are all essentially flat lines on the graph when put up against the behemoths that are jQuery, Angular and React. React is definitely a juggernaut, but it is still half of what Angular is in terms of interest on Google search. Furthermore, at the current pace, Angular will be more popular than jQuery in terms of Google searches by the end of 2017. Let me repeat that in case you didn’t fully catch it – Angular will soon be more popular than jQuery.

That should blow your mind. None of the hype that we hear on a day to day basis would suggest that this is the case, but it is. Don’t like my Google trends? OK, let’s do another. How about StackOverflow?

While the recent 2016 developer survey from StackOverflow shows that React is the trendiest topic, if you look at the tags page, Angular is number 20 down the list with 250 questions asked just today and 1615 this week.

React is on page 6 right before the oddly specific “visual studio 2012” tag, with 82 questions asked today and 515 so far this month. That’s roughly 1/3 the amount of Angular. This is not a slam on React. React is on a ridiculous upwards trajectory. I’m simply trying to point out what real mass adoption looks like.

Now I’ll be the first to admit that StackOverflow is a certain subset of developers, like the fact that their own survey reports that 4 of the top 10 tech stacks per occupation include either C# or SQL Server (roughly 78%) which would indicate that these are primarily enterprise and line of business developers. But who do you think is out there writing 90% of the software everyday? It’s line of business developers, not startups in San Francisco. As a side note, guess which other technology shows up in the top 10 tech stacks by occupation? I’ll give you a hint, it starts with “A” and ends with “ngular”.

I’m saying all of this to point out that the reason why we selected Angular was in large part based on it’s sheer adoption numbers. How do you know when a technology isn’t going anywhere anytime soon? When 2 of the top 10 tech stacks by occupation name it specifically instead of just lumping it under “JavaScript”. The fine folks on the React Native team nailed this when they said, “Learn once, write anywhere”. That’s exactly right! Why should you have to learn our binding, templating and application patterns when you already know Angular? You shouldn’t. That’s how people get worn out and fed up with programming, and rightfully so.

“But Burke! These stats are all Angular 1! Angular 2 is way different and everyone hates it!”

Good point! You’re sharp. That’s a fair concern, but also another huge underestimation. Mostly because Angular 1 is Angular 2.

Angular 1 Is Angular 2

I didn’t realize this until Todd Motto pointed it out to me, but the Angular team has been moving 1.x towards 2.0. If you haven’t looked at Angular 1.x in a while, you might not even recognize it. Consider the following simple application component/module in Angular 1.x.


const AppComponent = {
  template: `
    <h1>Root Component</h1>
  `
};

angular
  .module('app', [])
  .component('app', AppComponent);

Now here is that same thing as a component in Angular 2….


import {Component} from '@angular/core';

@Component({
  selector: 'app',
  template: `
    <h1>Root Component</h1>
  `
})
export class AppComponent {}

They look ridiculously similar! Aside from some of the newer additions such as the @Component annotation and leveraging an actual module standard, they are virtually identical. Everyone has this idea in their head that Angular 2 and Angular 1 are drastically different. They are, but the team has been very sneaky in the way that they have merged the API of Angular 1 into Angular 2. The leap from one to the other is significantly shorter than anyone thinks.

There is also this notion that people don’t like Angular 2. That’s just simply not the case. Angular 2 has been the most unstable JavaScript framework ever – by an enormous margin. The team over at Google ships breaking changes almost once a month. And yet, look at the State Of JavaScript survey that came out recently which reports that 64% of people are happy with their Angular 2 development experience. What?!? That’s crazy. This is like 64% of people being pleased with a car that consistently leaves them stranded. Imagine how much higher this number will be now that Angular 2 Final has been released.

Lastly, there’s something here that we haven’t even considered yet that causes people to intrinsically want to move to Angular 2 over any other framework out there, and that’s TypeScript.

TypeScript

TypeScript has been the subject of a lot of consternation for web developers. Why do we need types in JavaScript? What in the name of everything that is holy do interfaces possibly bring to the table for JavaScript developers besides bloat? Why are we trying to complicate something that is so simple to use. Keep your stupid OOP concepts. They aren’t welcome in our browsers.

The trouble is, those concepts that JavaScript so elegantly eschews are the same ones that are the foundation of solid applications. You know that age old argument about how JavaScript isn’t suitable for large applications? That’s because large applications require interfaces, some healthy amount of inheritance (gasp! I know) and the myriad of other structures that typed languages enjoy (and yes, modules). Those things were put into languages by really smart people for a reason. Not so that we could just throw them all out in favor of a language that was created in 10 days.

There are a lot of developers out there with solid OOP backgrounds in C# and Java that have no interest in just ditching decades of hard learned programming experience. For them, TypeScript opens up the door to a whole world of application development that they otherwise would have little to no interest in. This means that when these developers go looking for a framework to build their TypeScript apps with, they will end up in Angular’s front yard like John Cusack in Say Anything.

say-anything

I’m sure you already know that Angular 2 is built on and for TypeScript, and so is NativeScript. What you may not know, is that other JavaScript frameworks such as Aurelia, Ember and even Dojo are headed towards TypeScript as well. Regardless of your opinion on TypeScript, it is a phenomenon that is sweeping through the JavaScript community, and it is pulling millions of developers into JavaScript along with it.

Be Skeptical But Watch Closely

Nobody can predict the future. And just because this blog post is on the internet does not make it true. If anything, it should make you very skeptical. But skeptical you should be. I’m simply suggesting that none of us fully grasp the enormity of Angular and the crushing influence that it has, even if they did decide to re-write it from scratch and break everything on the daily.

In the end, Angular is far bigger than any of us realize and 2.0 has some aggressive aspirations to be far bigger than just the web. NativeScript is part of that realization, but I don’t think we’ve seen anything yet.

Header image courtesy of Marc Majcher

[cm_ad_changer campaign_id=121]

Comments