Blog
Angular 1 or 2: Which is the Best for Your Project?

With Angular 2 coming out of beta, it is now available as a front end framework for your new project. Yet, some developers are still choosing to code new applications with Angular 1. My colleague wrote back when Angular 1 was relatively new about why you should care, but now it’s time to update this to take into account the newest version of Angular. While Angular is still best for web apps, but not pure content plays, which version you choose will have an impact on stability and maintenance.

Angular 1: A Mature, If Heavy Framework

Angular 1 has evolved since we last discussed it, making it a strong contender among front-end web application frameworks. Angular 1’s maturity means that best practices have been hashed out and are well documented. Chances are, many others have done what you’re planning to do. Also, Angular 1’s extensibility means there are a large number of libraries available to help you quickly build out functionality. This widespread use means that Angular 1 is unlikely to be abandoned.

That last point, though, is speculation. Google, who still supports Angular 1, has not spelled out its future plans for the framework. Also, the code for Angular 1 is rather large, mitigating against its use for small projects.

Angular 2: Immature, but Light and Flexible

To call this version 2 is misleading. There are significant differences between the two, so the jump from 1 to 2 is not straightforward. Many consider Angular 2 to be a completely distinct front-end web application framework. And then there’s Angular 2’s relative newness, which will impede your ability to come up to speed quickly since the documentation is still coming together. Perhaps more importantly, if Angular 1 is anything to judge by, the relative youthfulness of Angular 2 may mean that future updates may break your application.

Let’s not paint too dire of a picture for Angular 2, though. Because it follows a component-based architecture, there is an increase in the potential to re-use code. Additionally, Angular 2 is built to use Typescript which compiles down to Javascript but has numerous advantages including type enforcement which makes code more readable and easier to collaborate on. Also, Angular 2’s performance is better than its predecessor. So, if you accept the cons we called out, you’ll have a smaller and faster application.

Issues with both Angular 1 and 2

Despite the significant differences between the two, there are issues that they have in common. As with our initial assessment, both are not SEO friendly out of the box, but there are tools now to help you with this issue.

So, What’s the Verdict? Angular 1, 2 or Neither?

We recommend that you stick with Angular 1 for existing applications already written in it. For new projects, you should consider Angular 2 unless it’s for a critical application where reliability is a key success criteria. Despite the existence of Angular 2, Angular 1 is still a reasonable choice and in many cases, Angular 2 may not be mature enough to meet your needs.

Categories: Blog, Software Development

Tags: , , ,

Laurie Barth
03 Feb, 2017


Leave a Reply

Your email address will not be published. Required fields are marked *