Why you should upgrade to the latest version of Angular?

Why you should upgrade to the latest version of Angular?

Probably everyone whom are working with Angular, has already encountered with Angular upgrade issues. As Angular ships major versions in every 6 months, minor and patch versions frequently, there is a need for ongoing projects to be updated regularly to get the latest features and bugfixes. But sometimes the business decision has been made: no more Angular upgrade and the project stucks at an exact Angular version. Sometimes this version means AngularJs, even if AngularJS support has officially ended as of January 2022. Sad story, but true.

In this years’s Angular Global Summit there was a fascinating presentation of Stephen Fluin about why we should upgrade to Angular 13 (or to the current latest version). His key message and close reasoning have totally confirmed my opinion about the necessity of the upgrades.

Angular upgrades can be indeed exhausting

Angular keeps evolving as the web technologies evolve. Regular Angular upgrades provides essential features for developers to create easily scalable web applications, with out of the box solutions, compared to other framework and technologies where we have to decide which libraries and packages to use, how to configure the choosen build system, and so on. According to Stephen, as human can accept a certain amount of change over a certain amount of time, the proper balance between making improvements (like Angular upgrades with new features) and preserving the current state or technology level is crucial for development teams.

Fixing the breaking changes in case of major Angular versions may consume some time especially if the project is pretty complex and the developer team can also face issues which can be solved not only with the help of the upgrade guide but requires some refactoring of the existing code as well.

Stephen pointed out three major reasons why we should upgrade to the latest Angular version.

Technical reasons

Every Angular release has new cool features which help to build state of the art web applications, but the most important factors are the improved bundle size which directly affects the user experience; the version compatibility between Angular and the complex ecosystem around it, where a version mismatch can lead to unexpected problems, but with the proper matching versions everything continues to work together; improved build performance helps not only building apps faster but improves the compilation and test processes as well; Angular team maintains a high level of security regarding the framework and the CLI; tooling improvements help developers making better architectural and technical decisions.

Business reasons

As Stephen described, there are external and internal business reasons for Angular upgrades. Improving technical conditions will improve the customer experience, which will influences the business revenues. Improving security is also important as directly affects the business and the users of our web application.

I would like to lay emphasis on that developers don’t like to work with out of date technologies. Although someone somewhere has decided that old technologies are cheaper to maintain than replace, in the world of rapidly evolving web technologies it’s just not the case, especially if we are talking about an ongoing development project with new features requested by the client and not just maintaining an old web application. There are tons of new and well-written features/packages which are easy to use and have proper documentation, for this reason it’s easier to find solutions to the upcoming problems during the feature development. Just looking at 8 years old unanswered Stackoverflow questions about the same problems can make any developers cry for new technology. Overall, it costs time and patience of the development team, ultimately the money of the client to implement missing functions which are already written with newer technologies since then.

Building a successful application expects collaboration from teams. Sharing code across multiple applications requires that every developer be on the same version and stucked in an older version will hold back the team and the company after all. As a developer moves to a new team, the code cohesion ensures that the code feels the same regardless of the architecture, and new developers can join the team without extra effort and can work effectively almost immediately as they know the latest version.

Societal reasons

The cost of regular upgrades are eventually much cheaper than struggling with old versions and mimicing the behaviour of the missing features with custom code. If such things take extra time, that cost energy and effort for the society as well. Old and unmaintained versions doesn’t attract new developers either and definitely doesn’t make the web a better place.

The longer you wait, the harder it becomes to upgrade

As regular upgrades are really worth the effort on the long run, skipping many versions can be difficult after a time. As the upgrade with the provided user guide and Angular CLI is not possible anymore, because of the huge gap between current and target versions, here comes the hopeless case: the team has to create a new Angular project and move the code base. If the code base doesn’t use the standard Angular packages and methodologies (like RxJs, state management), there is no more choice only to rewrite the application. Let’s try to avoid that!

Happy Angular upgrades! 😊

Thank you for reading my article! You can share your thoughts in the comment section and feel free to connect on LinkedIn.

Link to the presenter: https://twitter.com/stephenfluin If you have time, you can watch the presentations of the Angular Global Summit 2022 (Junior track) in youtube: https://www.youtube.com/watch?v=Ytj-Z3HdCOM&ab_channel=GeekleOfficial

This arcticle reflects the views of the author and was created based on the presentation of Stephen Fluin in the Angular Global Summit 2022.