Home > Uncategorized > From Angular 1 to Angular 2: Is it Good Time Now?

From Angular 1 to Angular 2: Is it Good Time Now?

September 30th, 2016 Leave a comment Go to comments

In the middle of this months, Google announced the Angular 2.0 at a meet up event in one of its Mountain View offices. I was lucky to hear the announcement on site and asked a couple of questions. That was truly exciting news as I had followed up the Angular 2 for a while.

Since its debut in 2010, Angular has been a very important, probably the most important, Javascript framework. It’s the first framework I felt done right and spent quite some time programming (should I say scripting) day in and day out. Our cloud serach engine product is built on top of Angular 1. As you can try for free and find out by yourself, the GUI performance is very good.

Time to learn how to "Google" and manage your VMware and clouds in a fast and secure

HTML5 App

Like any other software, Angular evolves over time mostly with incremental changes. The Angular 2 is, however, a very big jump. It’s fair to say that the only unchanged is the name itself. The disruptive changes break all the applications written for Angular 1. That is why quite some people consider Angular 2 is essentially a new framework. Whatever learned on Angular 1 is no longer applicable in Angular 2.

There have been many articles talking about the benefits of the Angular 2 and advantages over Angular 1. While performance is a big selling point, what I really like the most is the built-in (you can use Typescript with Angular 1 with some tweaks) support for typescript, which makes Angular 2 ready for large enterprise applications. Coming from C/Java programming background, I really miss the intellisense feature and the refactoring feature which are impossible with pure JavaScript.

While Angular 2 comes for a good reason, it could be a pain for existing application developers. For existing applications to work with Angular 2, you got to re-write your application code. It may be possibel for Angular 1 and Angular 2 to co-exist and then migrate gradually. Getting it work may take lots of time as well.

Now, most people in the big Angular community start to wonder: should we move onto Angular 2 now? Is it possible to migrate all code? What is the cost of migration? These are not only technical questions, thus need broader evaluations. Let’s stay on the technical side.

For people who just came to the Angular community, the answer is easy: go for Angular 2 directly.

For people who have created applications already, the answer really depends for now. If you have small applications, migration probably takes not much time. If you have big applications which should get you the most out of migration, migration can also be costly and sometimes not possible.

When I evaluating the migration for our product, the challenge actually goes beyond our code. We use a few 3rd party libraries to speed up development. If these libraries are purely built on top of Javascript like underscore, it’s easy. However, if they are built on top of Angular 1 like some GUI widgets, it can be hard if the library has not yet supported Angular 2. For example, the nvd3 library has already support Angular 2, it’s fairly easy to switch to the new library. The ui grid in the Angular UI project is not ready for the Angular 2, the migration is thus impossible. While we have the source code of the ui-grid, we don’t want to get into the business of migrating 3rd party libraries.

So for us, we probably have to wait a little time for the 3rd party libraries finish migration, or we can find alternative libraries that are Angular 2 ready. I think there are many developers facing the same issue. Hopefully in a few months, the community will get marjority Angular 1 libraries migrated to Angular 2.

As a side note, while reading articles on Angular 2 migration, I find some are talking: since Angular 2 is essentially a different framework, why don’t we move onto yet another simpler framework called Aurelia? Haven’t done much homework but read a tutorial. It seems simple and elegant. But until digging into it deeply, it’s hard to conclude which is better for now. Maybe something I will do when I find time.

Categories: Uncategorized Tags:
  1. September 30th, 2016 at 13:35 | #1

    From Angular 1 to Angular 2: Is it Good Time Now? https://t.co/OFMQZ7NtiK via @sjin2008

  2. Cagatay Civici
    October 1st, 2016 at 11:06 | #2

    Checkout PrimeNG if you need a UI suite for Angular2.

  3. October 9th, 2016 at 01:19 | #3

    Thanks Cagatay, just did. Like the great product!

  4. October 14th, 2016 at 13:46 | #4

    For Angular 2 and a User Interface Suite that really works well, you might want to check out PrimeNG!

    Geoff Talbot
    InfoPath Alternatives

  5. November 1st, 2016 at 02:02 | #5

    Thanks Geoff! I looked at it and like it very much. Awesome library with great components. The charting part is not as good as nvd3 which has ng2 support already. -Steve

  1. No trackbacks yet.