Super Hero Framework? Try Arch Villian
Last Month, I tried out Angular 1 for the first time. It was like getting hair waxed off. First it was smooth, as the honey covered my skin. Then in a furious rip, it hurt like crazy.
In less than 15 days, I found out that Angular 1 was being replaced by Angular 2. My experience with Yii2 made me feel I should just jump into 2 because of all the wonderful features. Why go backwards. It would also save me learning time as 2 was a completely rewrite of the framework.
The first thing you realize about Angular 2 was it is a complete framework. Not just a bolt on like 1. You had to load typescript and everything was in Component Form (Class). Learning curve steep? Try vertical.
One of the biggest problems was that the documentation was just so poor. SuperHero framework? Way too complicated.
Bootstrapped Me Down!
Next, it was bootstrapped. Nothing worked out of the box, you had to import classes and components, everywhere. It was like renting a completely empty room where you needed to ask for a toilet bowl as it did not come standard.
You couldn’t work anything without 20 different settings and imports and configurations. So unlike Jquery which was a plug in go.
At the same time, the whole package couldn’t be remotely run. You had to download the framework and import the modules. That took another 20 minutes kicking around the NPM and the config.json.
Angular2 works like an invisible butler. The problem is when something goes wrong, you can’t even see him. Everything in hidden in magic JS needing to debug it is a nightmare.
So why go 2?
Ok, I peeked back at 1 and then looking at the Typescript, i went… screw it, let’s go. Typescript saves typing. It also makes sense, especially from a class OOP style. Some of the ideas are fancy. The routing is horrible.
Next, performance. All this bootstrapping, but then they tempted me with improved performance. That made sense. So I would sacrifice short term hair pulling for much faster applications.
Robust framework. Ok, I came from PHP. I like scripting and hacking. But when it comes to building an application longer term, you need to be thinking about a whole structure that is stable. You want to make a sandwich, grab a fork a knife and whatever is in the fridge. But if you want to open a sandwich shop, you have to be thinking different stations like Subway, segmenting the work into different ‘components’ so that people don’t step over each other. Once NPM is configured, it’s 1 line launch ready to go.
Documentation Needs Help
Angular 2 tutorials and documentation need help. They suck. It’s not an easy language to learn because there’s so many new concepts. I’ll try to do my part. I do see the light at the end of the tunnel. Really powerful well coded applications and websites. But man, its a stiff climb.