Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

It's Going to Be Angular 4.0, or Simply Angular

DZone's Guide to

It's Going to Be Angular 4.0, or Simply Angular

Igor Minar, lead dev on Angular, announced that the successor to Angular 2 is going to be Angular...4? What the heck is going on?

· Web Dev Zone
Free Resource

Start coding today to experience the powerful engine that drives data application’s development, brought to you in partnership with Qlik.

At the 8th and 9th of December 2016 was NG-BE, Belgium’s first Angular conferenceIgor Minar (Angular lead dev) attended as the keynote speaker with some interesting announcements regarding Angular’s release schedule. Please read the entire post, there are a couple of important things.

This article has been cross-posted on the official Angular blog .
Thanks to Igor, Brad, Stephen and the whole Angular team for the in depth review of this article. This once more shows how much their care about community work.

Igor was extremely open and transparent about the announcement and even about the way of presenting it. He basically created the presentation openly the day before the conference:

I'll be conducting a major open source experiment at @ngbeconf tonight at 10pm downstairs in the main room. Come if you want to participate.

— Igor Minar (@IgorMinar) December 8, 2016

So here it is:

Why Angular 4?? Why even Angular 3?? What is going on?

Angular Uses SEMVER

Back in September when the , the Angular team also announced they will switch to Semantic Versioning (SEMVER).

As the name already explains, Semantic Versioning is all about adding meaning to version numbers. This allows developers to not only reason about any upgrade we do, but we can even let tools such as NPM do it in a automatic and safe manner for us.

A semantic version consists of three numbers:

Semantic versioning explained

Whenever you fix a bug and release it, you increase the last number, if a new feature is added, you increase the second number and whenever you release a breaking change you increase the first number.

"A breaking change happens whenever you as a developer and consumer of a library, have to step in and adjust your code after a version upgrade."

So what does this mean for the Angular team? As with every evolving piece of software, breaking changes will occur at some point. For example, giving a compiler error for existing application bugs that went unnoticed with the previous compiler version, anything, that will break an existing application when upgrading Angular, requires the team to bump the major version number.

Just to be clear, as Igor mentioned in his talk, even just upgrading Angular’s TypeScript dependency from v1.8 to v2.1 or v2.2 and compile Angular with it, would technically cause a breaking change. So they’re taking SEMVER very, very seriously.

Breaking Changes Don’t Have to Be Painful!

People that have been following the Angular community for a while, definitely know what I’m talking about. We went from Angular 1 to Angular 2, and it was a total breaking change, with new APIs and new patterns. That was obvious: ultimately Angular 2 was a complete rewrite, even though there are upgrade options for you available.

Changing from version 2 to version 4, 5 won’t be like changing from Angular 1. It won’t be a complete rewrite, it will simply be a change in some core libraries that demand a major SEMVER version change. Also, there will be proper deprecation phases to allow developers to adjust their code.

Internally at Google, the Angular team uses a tool for handling automatic upgrades, even of breaking changes. This is still something that has to be planned in more detail, but the team is working hard on making this tool generally available, most probably in 2017 in time for Angular 5.

It’s Just “Angular”

As you might have already guessed, the term “Angular 2” is also kind of deprecated once we get to version 4, 5 etc. That said, we should start naming it simply “Angular” without the version suffix.

It's just #angular

Also, we should start avoiding GitHub/NPM libraries prefixed with ng2- or angular2-.

@toddmotto@manekinekko@jdfwarrior@schwarty but please don't call projects ng2- or angular2-, etc.

— Igor Minar (@IgorMinar) December 10, 2016

Naming Guidelines

Basically from now on, name all versions of Angular simply “Angular”. Try to avoid using the version number, unless it is really necessary to disambiguate.

For example:

  • Use “Angular” by default (“I’m an Angular developer”, “This is an Angular meetup”, “The Angular ecosystem is growing quickly”)
  • “Angular 1”, “Angular 2”, “Angular 4” when talking about a specific release train (e.g. when talking about a newly introduced feature - “This is an introduction to feature X, introduced in Angular 4”, “We are upgrading from Angular 1 to Angular 2”, “I’m proposing this change for Angular 5”)
  • Use full semver version when reporting a bug (“This issue is present as of Angular 2.3.1”)

All the docs — even for Angular 1 — will be aligned to this in the coming weeks. Yes, they’ll be dropping “JS” from AngularJS where possible. Also in blog articles, courses, books or whenever you are targeting a very specific version of Angular, consider adding a header line which states that "This articles uses Angular v2.3.1."

That helps avoid confusion for your readers, especially when you are writing about specific APIs. (I’ll update here accordingly)

Why Not Version 3 Then?

The core Angular libraries live in one single GitHub repository at github.com/angular/angular. All of them are versioned the same way, but distributed as different NPM packages:

Image title

Current misalignment of versions with Angular router

Due to this misalignment of the router package’s version, the team decided to go straight for Angular v4. In this way again, all the core packages are aligned which will be easier to maintain and help avoid confusion in the future.

Why was the router even at version 3 already? Here is the official announcement of the Angular team when they released v3 of the router.

Also it is important to understand how Angular is being used and integrated inside Google (Igor speaks about this here in his keynote). All Google applications use Angular version equal to the current GitHub’s master branch of the Angular repository. Whenever a new commit lands in master, it will be integrated into Google’s single, giant mono-repo, where also other products such as Maps, Adsense etc. live. As a consequence all of the projects using Angular internally at Google will run their extensive test suites against this new version. This makes the team very confident to cut a new release, since it will contain the exact combination of versions of Angular packages that have been already battle tested inside Google. Thus, having aligned versions totally makes sense and makes it easier to maintain them over time, which in turn helps the team be more productive in releasing new features.

Tentative Release Schedule

The fact that breaking changes will arrive, doesn’t mean they will arrive every other week. The Angular team committed to time based releases that occur in three cycles:

  • Patch releases every week,
  • 3 monthly minor release after each major release, and
  • A major release with easy-to-migrate-over breaking changes every 6 months.

The next 3 months will be dedicated to finalizing Angular 4.0.0.

After Angular 4.0.0, this will be the tentative schedule for further releases:

So you can see that major versions will be released approximately every 6 months.

Video: See the Announcement Yourself

Conclusion

There are two main important messages here:

  1. Don’t worry about version numbers
  2. We do need to evolve Angular in order to avoid another Angular 1 to Angular 2 change, but we should do it together as a community in a transparent, predictable, and incremental way.

Also, I’d like to thank Igor for being so open at presenting this data, especially since he knows what a sensitive topic breaking changes are and have been in the past. This means a lot and I hope that the community will realize why all these changes are good for everyone involved.

Thanks to Igor, Brad, Stepehn, and the whole Angular team for reviewing this blog post. This once more shows how much their care about community work.

Still Questions?

Let me know.

If you enjoyed this post you might want to follow me on Twitter for more news around JavaScript and Angular 2.

Create data driven applications in Qlik’s free and easy to use coding environment, brought to you in partnership with Qlik.

Topics:
angular ,web dev ,google ,semantic versioning

Published at DZone with permission of Juri Strumpflohner, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}