Why is learning Angular 2 so painful?

A few months ago, I decided to give web development a try.. Angular 2 was brand new at the time, so I decided to download it and started building a website. For someone who is originally a Java developer, this was both a new and interesting experience. I followed the famous "5 Minute Quick Start Guide" and after an hour and a half of battling with Angular 2 and its plethora of dependencies, I had something running..
Then I started building a real app. I decided to build a blogging platform from scratch, mainly to learn, and also because I've wanted to start a blog for ages. The desire to have a blog would be the carrot that would motivate me to learn new technologies and allow me to build my project.
Month after month, I followed the releases of Angular 2 and every weekend, I plodded along on the blog. Did I say painfully? I actually meant to say “banging my head against the wall” over and over again, trying to understand and master the very creepy JavaScript ecosystem.
Maybe I'm just used to Java libraries whose robustness has been slowly tested on the battlefield… Maybe learning web development starting with Angular 2 is like trying to learn a video game starting right away with the hardcore mode… I don't know.
All I know is that the release of Angular 2 was, from my perspective as a Java engineer, a super creepy disaster. Each minor release made many breaking changes. Every time I watched the damned “5 Minute Quick Start” again, it had nothing to do with it. Not to mention the Angular 2 router. It was a real fiasco, an agony for users, especially those who are not used to the Javascript world.
I find myself writing this post in a moment of passion, ranting about the latest release of Angular that was announced a few days ago. Angular 2 has been released for good this time, and you can upgrade without having to anticipate drastic changes for at least 6 months ! This is how I naively thought I should upgrade my blog from @angular 2.0.0-rc.4 to @angular 2.0.0.
Here is the epic that I lived:

  1. Upgrade to @angular 2.0.0
  2. Remove all 'directive' fields from my components. Apparently Angular2 has decided that modules are the best way to go.
  3. Delete all imports that end with _DIRECTIVES.
  4. Upgrade @angular/forms from 0.3.0 to 2.0.0. For some reason @angular/forms was way behind the rest of Angular in terms of release. Until this release.
  5. Upgrade angular-material to 2.0.0-alpha.8–2 (do you realize how ridiculous it is to have a version called 2.0.0-alpha.8–2??).
  6. Upgrade to typescript 2.o, which, and it was a bad surprise for me, is currently in beta. After finally reaching a relatively stable release in Angular, it's appalling to realize that angular-material, a key tool in my stack, relies on unstable dependencies that are ahead of Angular's dependencies. 2.

At this point 'npm start' was working. Now is where it gets tricky because I've had to deal with extraordinarily obscure error messages that have plagued me since I started learning Angular 2. Like this one:
01
02
 
After some troubleshooting, (I've since gotten pretty good at deciphering unnecessary System JS error messages), the problem came from this errant line in my systemjs.config.js file:
// No umd for router yet
packages['@angular/router'] = { main: 'index.js', defaultExtension: 'js' };
I guess @anguler/router now has UMD. Whatever this UMD.........
The next issue I ran into was this:
03
04
 
Great! A very creepy syntax error in an angular-material. There is no useful error message, nor line number. No help to guide me. I don't know if I should upgrade or downgrade dependencies, install new ones, change the syntax of my tsconfig.js file (which probably changed when I upgraded to typescript 2.0). I'm lost in a sea of ​​confusion and frustration.
Now, that's probably easy to fix for those of you who are seasoned web developers. That's not where I'm coming from. It's not that specific case. It's the fact that the JavaScript ecosystem is absolute chaos.
Each new version of each new library comes with a lot of radical changes. New libraries are released before their APIs are stabilized. Beta libraries are outdated and only alpha libraries are new and interesting.

On Stackoverflow, posts 6 weeks old are old and more relevant because they talk about problems with an old version that I no longer use.

The Java engineer that I am is mad with rage against this ecosystem. Into what madness has web development sunk? What the f**cking f**ck is going on with Javascript these days???
Okay, I guess it's about time I take a step back and say that I actually love Angular 2. Once all the dependencies have been upgraded, and everything is working, when Intellij points out this should the be, and my typescript compiler is working fine, Angular 2 is awesome.
To be honest, I've used versions of libraries that haven't been officially released yet. Maybe you would say it's my fault if I try to download and use a version of the library that's still in alpha/beta/release candidate and expect it to work and be easy to use. you would probably be right. But if we consider that hundreds of thousands of developers already use Angular 2, we should ask ourselves the question: is it really responsible to publish libraries that are still work in progress? Does it make sense to announce a release candidate and then make tons and tons of drastic changes along the way from rc.1 to rc.6?
How many hundreds of thousands of hours of human labor have been wasted in pain trying to upgrade a version of Angular 2 and all of its dependencies? And as most engineers will attest, developer hours are a valuable commodity in today's job market. How many developers have been totally gutted by the experience of trying to use Angular 2 and vowed to ditch Angular in favor of React? How many other JavaScript libraries lying around have caused their users headaches and anxieties?
Perhaps the JavaScript ecosystem is experiencing its first growing pains. Perhaps the developers are figuring out the mistakes in their initial design and are working hard to correct them through each iteration to produce better versions every time.
Perhaps the Javascript world is where the vast majority of developers will soon live, since tools tools will have evolved quickly and efficiently.. Maybe people will accomplish more with JavaScript and tools written in JavaScript will be easier to use than those written in other languages...
Or maybe, maybe the Javascript world will be some kind of hoax, a place where hipster engineers go to waste time and feel like they're on the cutting edge of innovation, when in reality they're in a universe chaotic and crazy, throwing hours and hours of productivity out the window just so you can use the latest and coolest tools out there.
But I'm just a humble Java developer.
What interests me the most is what do you think?
Original article de Liz Bennett
Translated by JS Staff
[separator type=”” size=”” icon=”star”] [actionbox color=”default” title=”” description=”JS-REPUBLIC is a service company specializing in JavaScript development. We are an approved training center. Find all our technical training on our partner site dedicated to Training” btn_label=”Our training” btn_link=”http://training.ux-republic.com” btn_color=”primary” btn_size=”big” btn_icon=”star” btn_external =”1″]