I love helping people with upgrade problems because it is such an emotional subject. People come up to me at conferences with this war-torn look in their eyes, trying to keep it together to tell me about a problem with AOT or testing or something else that is driving them up the wall.
I hear these a lot:
- "We're three years into our upgrade."
- "We've been migrating components for a year and a half."
- "I honestly don't know if we'll ever finish this upgrade."
- "I'm so ready to be done with this and only work in Angular 9/10/11+."
Is that you? If it is, you're not alone. I call this the Upgrade Pit of Despair (a reference to one of my favorite movies,The Princess Bride).
Here are six ways you can climb out of the Upgrade Pit of Despair:
- Decide with your team on the "Definition of Done." Are there parts of your codebase that will remain AngularJS forever? Make sure everyone is clear on that. What does a "finished upgrade" mean for your team?
- Plan a definitive and detailed timeline for the upgrade. Estimate and plan out the remaining upgrade work the best you can. Get really explicit on which features will be migrated when and how migration will relate to other project work you have to do.
- Focus on the finish line. Take a minute to remember why you're doing this in the first place. This may sound corny, but in the middle of a big refactor, it will keep you going. Are you migrating for performance? TypeScript? Faster development time? RxJS? The CLI?
- Boost your motivation with quick wins. Sure, some features will be a long slog due to lots of dependencies or complex logic. But there's gotta be a component or small feature somewhere that won't take long to migrate. Another variety of this tip is to build a new feature in Angular (2+). You've got a hybrid app set up, take advantage of it! Get your feet wet with the new power of Angular.
- Invest in training resources. There's been enough distance since the announcement of Angular 2 and ngUpgrade that a lot of great material is out there on AngularJS migration. Of course, I'm biased to Upgrading AngularJS for the ngUpgrade path, but it's only one of many great resources out there. If a few hundred dollars can save you hundreds of hours of work and thousands of dollars in developer salary, isn't it a worthy investment? (By the way, if you find a useful resource, be sure to add it to the ngMigration Wiki.)
- Hire professionals before you think you need them. Look, I get that no one wants to spend money on a consultant. Management especially has a really hard time with this one. "Why should I pay more developers when I have my own on staff?" The truth is that most Angular developers will do a single major upgrade, whereas consultants will have done several. The hardest upgrade is the first one. An upgrade that will take your team 2 years might only take a consultant 2 months!
I have good news for you on that last one: I partner with Aaron Frost, the co-organizer of ng-conf and the founder of HeroDevs, on AngularJS to Angular migration consulting. Between the two of us, there's no upgrade problem we can't solve.