aboutsummaryrefslogtreecommitdiff
path: root/articles/2020-11-11-allying-the-enemy.md
blob: c63fecd5e34c65a71b3db86ae713765673c7d329 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
title: Allying the enemy
route: /allying-the-enemy
date: 2020-11-11
description: Why I've decided to finally pickup <b>REDACTED</b> and some of thoughts and things that I'm looking forward to (and not so much looking forward to).
---

Here we are, me, finally letting in...

For quite a while now, I've been a hardcore [React](https://reactjs.org/) junkie, not giving a single chance to the competition. But at last, I've given in.

I say this with zero regrets, I will be spending the next few weeks learning Angular. Yes, [Angular](https://angular.io/), the most dreaded framework of all.

# Here are a couple reasons for my decision, just to name a few;

1. Angular is a **framework**, meaning that almost everything I will *probably* need to start out a production application should already come with the Angular framework, it just makes it seem cozy and prepared. Now I know that you are going to mention that due to the amount of features that come with Angular, there will be bigger bundle sizes, and from what I've researched, it doesn't make as big of an impact that people make it out to have.

2. The Google ecosystem! (No political or ethical comments will be found here...) Google has everything you would ever need to ship a production application; the Google Cloud Platform, Firebase Analytics, and more! Angular easily integrates into the Google ecosystem and has a few Google specific goodies.

3. [TypeScript](https://www.typescriptlang.org/)... the best thing to happen to JavaScript since [jQuery](https://jquery.com/) (subjective). Me, having come from declarative, statically typed languages, having a static typing system and conventions for JavaScript is amazing and makes me feel at home. A typing system which resembles Rust, a Java-like class system are a couple of the things that stand out to me.

4. THE ANGULAR CLI!!! This tool is amazing, it is was React is missing in my opinion. Yeah there's create-react-app, but it's not the same in any comparable way other than the initial creation of the project files. The Angular CLI handles making new components, serving, building, and more. It's truly amazing.

# Now, for some of the things that I will be missing from React;

1. The simplest templating system of all the libraries/ frameworks. Of the UI libraries and frameworks I've ever taken a look at, React takes the cake when it comes to simplicity in the re-usability and templating aspect. For example, lets say I make a component which has a paragraph tag that just displays "Hello, world!";
```jsx
import { Component } from "react";
export default class HelloWorld extends Component {
    return <p>Hello, world!</p>;
}
```
To use this in another component/ view, all I would have to do is import it and use it as if it a was a standard HTML element;
```jsx
import HelloWorld from "../components/HelloWorld";
export default class App extends Component {
    render() {
      return(
        <HelloWorld />
      )
    }
}
```
As you can see, it is dead simple to reuse components wherever you want. In Angular, it's still *relatively **not super complicated***, but it was definitely a bit weirder if you are coming from React.

2. Passing data between components. I still don't get this...

3. Huge project directories. This is definitely a little scary if you are comparing it too a React directory, but I hope I'll get used to it. I mean, everything must have a reason right?

# What I'm looking forward to?

1. Learning about PWAs and the creation of them using Angular. Somewhat in reference to my first point of where I explained why I made my decision, Angular is a huge framework, and having PWA support basically out of the box is pretty nice.

2. [AngularDart](https://github.com/dart-lang/angular). Though I don't typically use Dart, I have fun messing about with it, and I await to see how Angular and Dart can play together.

3. Just all out, the process of learning Angular. Learning a new framework can always be a little daunting, but seen as there's so many resources out there for Angular, hopefully it'll be a breeze.

Well, I hope you enjoyed my little update, hopefully, like I was, maybe this might inspire you React elitists to get up and try something new!