I have been following Angular development for a couple of years now. As Angular 2 is almost ready I figured I would give it a try. I was asked if I could develop a simple site for a class my girlfriend teaches and I figured that would be a low risk opportunity to try Angular 2.
I started by implementing the “Heroes” app to get the lay of the land. This was easy enough and gave me a good overview of Angular 2 concepts. Angular 2 is definitely a significant step up in terms of complexity compared to the first version. I’m not new to web development but Angular 2 is definitely quite overwhelming.
To develop an app one should be familiar or familiarize them self with:
After lots of reading and try and error I got my app working. The app I implemented is a regular site (HP, category pages, detail pages), with the data stored in a JSON file. Unfortunately I don’t think that Angular is suitable for a project like this.
page load Time
My main gripe with Angular is that the initial page load is extremely slow. The front page of my very simple app takes 3-4s to load. While the app is loading nothing displays on the screen but the “Loading …” message. By today’s standards that is so slow that the user might get the impression that something is broken.
Initially I had implemented the app without using Webpack. The initial page load would load 400 JS and template files which is of course ridiculous. Webpack drastically reduced this by merging all these files into a still large (800kb) bundle.js. Unfortunately this adds another component that is basically required to run your app.
I knew before developing the app that SEO would be a problem. In case of this app it’s not a major concern but for most of the sites I work on this would be a show stopper. There are ways of pre-rendering the pages and serving cached pages to the crawlers and at the last ng-conf there has been talk about combining pre-rendering with input caching to speed up the initial content delivery to the user, but none of this is production ready yet. The additional overhead required to make this work, in combination with the already high complexity, makes me wonder if this is not pushing things a bit too far.
Errors & Debugging
Another major pain point are the cryptic error messages and stack traces. I would say in 95% of the cases it is not immediately clear how the stack trace relates to the actual error. I assume with time one becomes more familiar with what type of error causes what stack trace but this certainly adds another major hurdle.
Complexity and Ecosystem fluidity
Coming from a more traditional full stack background I struggle to see how the insane amount of complexity modern JS frameworks bring with them improve the overall end product. There is simply too many layers involved to run your application and each of these layers represents a potential failure point. I have worked with many frameworks in the past and never struggled as much as when trying to get this simple application running. Because it took me a while to develop the application I also noticed how the fluidity of the ecosystem basically forces you to constantly update your application. If you don’t keep up with the constant API changes you will reach a point where you are better off rewriting your app from scratch than to update your application. There is a massive amount of technical debt built into JS apps starting with the first line of code you write.
As it stands, I don’t think I will add Angular 2 to my regular toolkit. Slow page load times, a slow development cycle due to complexity, horrible stack traces and a built in technical debt are a showstopper for me. Many of these issues are not an issue with Angular itself but with the JS ecosystem in general. I wanted to like Angular but in my opinion its totally over-hyped.