Stick, switch, or upgrade: What should I do with my AngularJS (1.x) app?
The different framework communities love to claim to be the best option for modern front end development. Deep down, though, I think we all recognize that not every tool is the right one for the job.
With all the hype around Angular (2+), does it make sense for you or your company to upgrade? Is it worth the time and money it will take?
Researching this can be overwhelming. For example, is this you? You burn through a bunch of articles about the process of migrating from AngularJS to Angular and your eyes glaze over. Webpack, TypeScript, observables — what the heck is all this stuff? You rage-flip your desk (terrifying your cat) and shout with clenched fists in the air, “Forget it, we’ll just stick with the old version!” or “We may as well just switch to React!”
But are those really equivalent to upgrading? And most importantly, are those the right decision for your company and your team? If you’ve got an AngularJS (1.x) application, let’s take a critical look at your three options:
- Stick with AngularJS
- Switch to a different framework (React, Vue.js, etc.)
- Upgrade to Angular
Let’s start with whether you should just stay on AngularJS forever (like those businesses that never update from Windows ‘95). For a long time, there was a big question as to whether AngularJS would continue to be supported or would just disappear from the internet like you wish your embarrassing pictures on Facebook would (spoilers: they don’t).
There’s good news, though: there is an official LTS schedule for AngularJS. It boils down to this:
- All AngularJS versions will continue to work indefinitely and will never disappear from CDNs or package managers
- There will be one final release of AngularJS (1.7)
- AngularJS will enter a 3-year long term stable support period from July 1, 2018 to June 30, 2021
Should you stick with AngularJS? The answer is yes if you identify with the following:
- My app is not being actively developed (maintenance and critical bug fixes only).
- My app will not exist within 3 years.
- I’m not using AngularJS as a SPA (for example, it’s inside a .NET MVC project or an iFrame).
- I don’t want the benefits of TypeScript or a robust build process (I’m fine with my current setup like script tags or task runners).
- Feature X of AngularJS is critical to my app (I don’t have examples of this off the top of my head because it shouldn’t happen, but hey, I don’t know everything).
If these things are true, just stick with AngularJS. Your app doesn’t need to take advantage of new types of architecture or build processes. It’s not being actively developed, so it doesn’t matter if the framework is the latest and greatest. There is nothing wrong with this — it may be the best decision for you!
This is a big one. Lots of people like to throw up their hands and say that switching to a new framework like React or Vue.js would be easier than upgrading. But is that really true, or is this just a case of the grass being greener? Will it really be faster (and thus cheaper) to rewrite in another framework?
The answer depends entirely on your team, your timeline, and, at the end of the day, your desire. Take a look at these statements:
- I have the time and budget to rewrite my app from scratch.
- I have the time and budget to learn a brand new ecosystem.
- My team already knows what they’re doing in Framework X (maybe you’ve hired some senior React folks — great!).
- I want to hand pick each package in my build chain and middleware (technically you can do this with Angular, but it’s not the path of least resistance).
- I like the community surrounding Framework X.
- I just want to, okay! Leave me alone!
If this is you, switch to a different framework with my blessing. You’re already part of the way there, and you’ve got the time and desire to learn a new ecosystem and become part of a new community. You may also just prefer the coding paradigms of another framework. Go forth and switch!
Let’s talk about upgrading to Angular now. Do you resonate with any of these?
- I’m actively adding new features to my app.
- I don’t have time to rewrite — I need to be able to upgrade gradually.
- I want an established set of build tools and best practices like a CLI.
- I want the benefits of a framework written in TypeScript (compilation, type-checking).
- I want to use specific Angular tech like ngRx (note that most architecture patterns or paradigms are now shared across frameworks, but you’re interested in the specific Angular implementation of these).
If this is you, it makes the most sense for you to upgrade to Angular. You need to be able to maintain and develop your application for years to come, but you also can’t drop everything for a total rewrite. You also want to be able to take advantage of new technology Angular offers like ngRx and TypeScript.
Is it going to be a walk in the park? Probably not. But there’s good news for you:
- The process is well-defined.
- ngUpgrade allows your AngularJS and Angular code to run side-by-side for as long as it takes you to upgrade.
- There are some great resources out there to help you, from the official docs to our own comprehensive course.
Need help with your upgrade?
If you’ve gone through this guide and determined that upgrading isn’t for you, great! There’s no sense in embarking on an upgrade if it’s the wrong path for you.
If you determined you do need to upgrade, are you overwhelmed? If so, I’ve got your back. I’ve got 200+ detailed videos, quiz questions, and more for you in my comprehensive course UpgradingAngularJS.com. I created it for everyday, normal developers and it’s the best ngUpgrade resource on the planet. Head on over and sign up for our email list to get yourself a free Upgrade Roadmap Checklist so you don’t lose track of your upgrade prep. And, while you’re there, check out our full demo.
See you next time!