On the path to Angular2…

James Morgan
3 min readMar 8, 2016

--

I have always been keen on Angular, even since the first time I started to use it. Originally the idea of not fighting with jQuery or wrestling with an internally built library that attempted to remove some of the complexities of a client side programming was a big motivator. Moving from a classic request response JSP application to a much richer and what felt like a cleaner solution to client side Single Page Apps Angular always solved my problems. (As well as introducing some new ones)

Recently I’ve spent the last few weeks getting stuck into Angular2 and I’ve been pleasantly surprised, a lot more than I expected to be!

After the many months of fears from the developer community about the changes in syntax and changes in language amongst other things, as well what this will do to the community? Now I feel really theres nothing to be worried about, its not actually that different conceptually from Angular1, with a much lower barrier of entry and a much cleaner solution to many of the problems Angular1 solved & introduced.

I hope that now the dust is settling and the API’s stabilise over the next set of beta and RC releases that people get behind it and push it forward as to me it looks like a great advancement to the framework.

Stumbling across this blog http://blog.ionic.io/angular-is-a-design-pattern/ by the Ionic team really struck a chord with me and really after only recently jumping in.

These 2 statements really hit home, the first was this:

One of the major realizations we’ve had from working on Ionic 2 is how similar Angular 2 and Angular 1 are at a high level, and how understanding this will help developers move from Angular 1 to Angular 2 far more easily. In many ways, Angular 2 isn’t really a new framework at all, just a new implementation of the same one we’ve come to know and love.

The above really strikes a chord with me. Yes I have a good amount of experience with Angular1 but thats actually a benefit to learning Angular2, not a hindrance. Its makes it easy to pick up concepts, translate the new style to the old style in order to ease that learning curve.

This second was this one:

If we apply a standard Angular 1 to Angular 2 syntax transformation, we have code that, conceptually, is identical to Angular 1 and Angular 2. We can look at this code and immediately understand the intention of it, assuming we’re already familiar with Angular.

Again this hits home with me for similar reasons to the first. Originally thinking that it would be hard to pick up, hard to break from the norm of well trodden synapse connections my brain had created for Angular1, but the opposite has happened.

Since Angular is much more a conceptual way of thinking than a framework, doing things in certain ways, applying the same rules, using similar markup for templating, the new version of the framework is just a much cleaner evolution/implementation of this.

So if anyone is holding back checking out Angular2 I say why wait! I think its going to be big with developers enjoying the removal of magic and typescript feeling like a very natural fit. Honestly you’ll find the learning curve not half as bad as you may think. Hopefully we’ll start seeing some uptake in the enterprise space once its out of beta as well!

The above is not to say that things will not be frustrating, require more reading, occasional pain and more practice but I hope not to spend the length of time it took me to get up to speed for 1.x and start utilising the power 2.x, Angular2 is a solid step forward!

If anyone is keen on looking through some of the samples I have been playing with check out this project on my Github angular2-demos, I have added some examples and will add more in the near future.

Feedback always welcome…

One closing point is that I am yet to really tackle how to migrate an existing NG1 app to NG2 and I still fear this may be tricky and challenging. I plan on posting my findings once I tackle this problem.

--

--

James Morgan

Founder of @knownorigin_io @BlockRocketTech @blockchain_manc — NFT nerd, crypto enthusiast, lover of music, humanist, mostly found hacking web3