Back to Blogs
Blog Img

It's all about Angular

With last month's release of Angular 4 and a new JavaScript framework in what feels like every 5 minutes, I wanted to find out what exactly was going on. 

To get a grasp of what’s happening, with one of the most popular frameworks used in web development, I caught up with Meligy. Meligy runs the Angular user group: ng-Sydney and is also a senior consultant at Readify (so you know he’s good).

Meligy explained what's it all about. The Angular 4 upgrade, how this is affecting the community, differences between AngularJS, Angular2 and now Angular.

What also unravelled is Meligy's fascinating journey from being a backend focused developer to falling in love with client side programming. 

Here's what went down:

Sam: So what’s new with AngularJS?

Meligy: Firstly we’ve got to be careful when referring to AngularJS now as the creators won’t like it, as, AngularJS is for version 1. For version 2 onwards, we can refer to this as Angular.

SE: Yeah, I’ve heard this! Everything from now on won’t be Angular 4 or 5 – it’s just Angular.

M: Yeah that’s right. I’m mentoring 5 teams at the moment that are running Angular 2, 2 of which are upgrading to 4 already. I upgraded just yesterday and it took me a day (because of issues with a non-maintained 3rd party library, not Angular itself). Upgrading from 2 to 4 is seamless. Upgrading from 1 to 2 is probably too much, might not even bother!

SE: So what made AngularJS so good was also its biggest weakness?

M: The idea behind AngularJS was to that you could use it on any page, drop some JavaScript script on a page and get it going.

It worked very well, compared to Knockout, because it could detect your JavaScript changes without explicit code, but that caused performance issues when pages grew, too many things to track. The only way to make AngularJS faster was to disable features and this was a problem.

It was originally designed for designers to use and get something interactive without knowing too much JavaScript. Once developers started using it, it started to add more features, but due to backward compatibility, the old features were still there. It was not obvious what features you should use and which you should avoid.

So Angular 2 (or just Angular) was born to fix this, which meant they had to rewrite the whole thing.

As the team likes to say it, AngularJS (v1) is a framework. Angular (today) is a platform.

It’s built on Typescript and comes all of its awesomeness. It comes with its own CLI tool to generate new projects, create optimized builds, and run your unit tests, which is creates skeletons for by default.

It is perfect for writing big single page web applications and especially BIG ones. 

The ideal case is when your entire website is going to be a single page web application. and with the way things are going with web development most applications are heading this way anyway. Once you add some rich client interactions to your website, the users want more.

SE: What’s exciting about where Angular is going?

M: There are a few things happening, but the biggest one might be, server-side rendering with Angular Universal.

Angular Universal allows to run Angular on the server, and then the generated HTML already has all the page information needed for some search engines, or for Facebook and Twitter previews when the user chooses to share the page.

It used to be a very close 3rd party work that the Angular team hosted on their official sites, but now it’s becoming part of the main Angular project itself. I expect it to get way better this year.

SE: What do you love about Angular 4?

M: What I really love about Angular 4 now actually doesn’t have to do with Angular 4, it’s that it is built on the latest version of Typescript. TypeScript 2.1 had a breaking change from 2.0, which forced Angular 2 to freeze support for TypeScript at 2.0. Now this situation is fixed, and unlikely to come up again, so the latest versions of Angular allow me to use the latest version of TypeScript as well.

Typescript just feels likes C#, you find silly errors at compile time instead of at run time. People can pick it up much easier than JavaScript and they are learning about JavaScript in a different way because TypeScript packs the standard JavaScript features with the same syntax.

SE: What advice would you give people starting out in web development?

M: Play around with one framework/platform at a time. Spend two weeks with React.js, two weeks playing around with Angular, with Vue, you name it, and immerse yourself with them one at a time. This will allow you to decide what works best for you and you will be able to focus on this particular technology without being distracted by others.