Should I upgrade my Angular 1 app?
- If you have an Angular 1 app that meets all your user requirements you probably don’t need to worry about upgrading/migrating or running a hybrid app.
- While not everyone agrees that running a hybrid app is a good idea, Victor Savkin thinks this is just fine.
- One of the larger Angular apps we’re working on is currently running as a hybrid app, with a mix of Angular 1 and Angular 2 components and services.
- It saves you development time – you don’t have to spend the time required to migrate the entire app, just add the Angular 2 components you want and they’ll run side by side with the Angular 1 components.
- But if you’re looking to add new features you might just want to migrate one step at a time, and run a hybrid app.
Biznas talks about why you should or shouldn’t upgrade your app from Angular 1 to Angular 2 and the potential benefits of a hybrid app.
@biznasapps: When should you upgrade your #Angular 1 app to Angular 2? #angularjs #webdev
If you built an app with Angular 1, you’re facing a question: should I upgrade to Angular 2, or stick with Angular 1?
While there are a number of benefits of Angular 2, there is also a case for, “if it isn’t broken, don’t fix it.”
Thankfully, you don’t have to fully migrate your entire Angular 1 app to Angular 2. You can run both.
On episode 123 of Adventures in Angular, a panel of leading Angular experts (led by Victor Savkin) discuss migrating from Angular 1 to Angular 2 and predict there will be many applications that are running Angular 1 and Angular 2 for a long time.
While not everyone agrees that running a hybrid app is a good idea, Victor Savkin thinks this is just fine. And we tend to agree.
The nice thing about running an app with both Angular 1 and Angular 2 is:
A hybrid app gives you great flexibility to upgrade/migrate when and how you like. But as with all decisions related to your technology stack, there are some drawbacks.
When hybrid isn’t the answer
One of the most obvious drawbacks of running both Angular 1 and Angular 2 is that you now have to support multiple frameworks. Which might work fine for now, but as support for an older framework wanes, you’re stuck with a framework that has a limited community of contributors and fewer and fewer developers who know how to work with it.
We’ve uncovered an even more immediate issue: performance.
One of the larger Angular apps we’re working on is currently running as a hybrid app, with a mix of Angular 1 and Angular 2 components and services.
For the most part it performs as needed. Until we start running it with Internet Explorer. We much prefer that users choose another browser, but most of the users of this app are stuck with IE.
While other browsers are able to handle a large hybrid app with over 200 screens, IE has been giving us memory leakage and overall performance issues. We suspect this is being caused by latent memory leaks and inefficient components in the existing Angular 1 code, and therefore we’re migrating the app to be fully Angular 2.
We tested our suspicions by selecting a few components to see what performance improvements we could achieve once they were migrated to Angular 2.
After reviewing the initial results, the performance gains we can achieve with Angular 2 should improve performance for all users, and most importantly, satisfy the requirements of our IE users.
If you have an Angular 1 app that meets all your user requirements you probably don’t need to worry about upgrading/migrating or running a hybrid app.
But if you’re looking to add new features you might just want to migrate one step at a time, and run a hybrid app.
Be aware that if you have a large application with a significant user base on IE you should consider skipping a hybrid migration and commit to a full Angular 2 app.