Such a clickbait title you say… But trust me, there are still a few valid points.
First of all, Angular team, I would to thank you for all these three years you’ve spent to make the new shiny Angular 2.0. But your new framework sucks. And I’ll tell you why.
However, there is a very simple principle which I followed in all of my projects, even the biggest ones. The principle says:
Keep it simple, Stupid.
And that’s exactly where the new Angular has failed so many times.
Even though learning curve for Angular 1.x was not ideal, the framework itself was something more or less simple. It did not require TS, HTML compiler, CLIs, specific structure, webpack, Tree shaking, AOT compilation and so on. It just worked. I was able to insert just a bare `angular.min.js` in the file and start writing the code right away (even though I still used Gulp to livereload/build the app).
The whole idea of a good framework is that you start with the simple stuff and you make it more complicated only when and where you want it to be more complicated. While Angular team went in a completely opposite way.
Let’s go in details where Angular 2 is over complicated:
- It is written in Typescript
P. S. I know that I can still kinda use JS with it. But in reality it becomes impossible because then I have to deal with the fact that everything else around Angular is made with TS (like plugins or docs).
2. Angular-made HTML is not a valid HTML anymore
Just think about the next sentence. Angular 2 team had to write a compiler to compile “Angular HTML” into HTML. Because some of the tags angular uses are not valid HTML.
No, that compiler does not make HTML more readable like Jade (aka Pug) does. The only purpose of that compiler to change angular tags into something more valid and (also) add a bunch of garbage into your final HTML.
But not only. The compiler gives an insanely useless traceroutes so whenever you have a error in HTML, well, good luck finding it. The whole app won’t start until you find it.
3. Angular takes an infinity to hot-reload your code
The thing I love the most about JS apps is that I can change a piece of code and see the results immediately in my browser.
Well, with Angular 2.0 it is not true. Not anymore. I have a very powerful quad-core laptop and it still takes me 3–5 seconds to re-compile an empty angular app. For already developed apps like ng2-admin it takes ~10–12 seconds. You gotta be kidding me right?
Using old good Angular 1.0 and a simple Gulp setup I was able to concat all my code and reload the page in half a second.
The webpack configuration of Angular 2.0 is 300 lines long. It is so big and unreadable so they had to make a separate config for a config. Nice, right?
4. Huge size of the initial app
This is something everyone is moaning around for a long time. Bare Angular 2.0 (+RxJS) weights around a megabyte. Yes, a megabyte. It is like 6 times more than previous angular. And 10 more that I expect my users to download over a 3G connection.
But still. Think about it. The initial angular code is so big and complicated so they had to make it even more complicated to make the code smaller. In other words, React or just old Angular are small enough from the beginning so they don’t even have to deal with all these optimization techniques.
I can continue the list but I think I’ve made enough points.
Angular 2 is not that bad. It is completely modular, follows specific structure, uses types and (in theory) allows you to write code with less errors.
But in my opinion, things should stay simple from the beginning. While Angular is not. It seems just over complicated.
I make web applications, not software for spaceships. Angular team has introduced so much added (and unnecessary) complexity, which means:
- There are more failure points. With not so helpful traceroutes, it becomes a headache which then converts into a huge timewasting
- It is hard to adjust the framework for specific needs. I start to fight with the framework instead of writing the actual code
- It is hard for others to dive in quickly. Sometimes, much less experienced developers are working with me and I want them to be able to make changes without going through 200 tutorial videos.
Would I need all this complexity in my small private projects? Ehm, probably, not. In my company’s medium-sized projects? No, I don’t think so. In a big enterprise-sized apps where 10 teams are working on the same app? Yes, maybe, then all this complexity/modularity/precompilation is a good thing. But also maybe if these teams decide to use some other framework, then they might not need so many people working on it ;-)
I could understand all this complexity if it was impossible to make a good stable webapp without it. But as we all know, it is possible and even easier. Just take a look on other frameworks like Vue.js (my current favourite) or on something React-based.
P. S. Adam added a good comment against my points and I generally recommend reading it as well if you wanna look on the opposite side of the story :-)
P. P. S. My latest project — https://pingdisco.com is 100% vuejs, it is a free uptime monitoring tool. Try creating an account there (only takes one field to fill) and see yourself how fast and smooth it is