BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Angular 2 Split, Dart Codebase Separated

Angular 2 Split, Dart Codebase Separated

This item in japanese

Just as Angular 2 nears its final release, the project has announced one more twist in the road. Instead of using TypeScript to compile to JavaScript and Dart, the Dart portion will be spun out into its own codebase with its own team.

As announced on both the Angular Blog and on Dart News, the split is intended to benefit both Dart developers and JavaScript developers.

Dart is used internally at Google for critical projects and the Angular team struggled to keep up with those demands and the demands of the much larger JavaScript community. Initially the idea of compiling TypeScript to both JavaScript and Dart was done because Dart on Angular 1 wasn't getting the attention it needed. By having a single language transpile to two others, the thinking went, they could make sure both flavors were complete. In practice, this caused both projects to suffer, said Naomi Black:

While this single-source multi-language approach worked in theory, in practice it made it much harder for new contributors to add to the project. Even simple changes could quickly become complicated by cross-language compatibility concerns, and many changes could only be made by someone who understood the entire compilation process and both language targets.

The template syntax won't change regardless of which flavor you're using. According to Black, the API will be the same "where appropriate". This means, however, that future features may not be automatically available on both. For example, the new Angular Dart team announced that they will release their Material Design library for Angular 2 which they already use in production inside Google. This is written solely in Dart and therefore is not available to those using JavaScript. The Angular Material library for TypeScript continues on its own course.

The Dart community response has been very positive. Google software engineer Kasper Lund commented that Angular Dart will be even better now:

Dart thrives because it is being used to build truly critical apps. Making Angular 2 for Dart faster and better strengthens the case for choosing the Dart and Angular combination for such apps even further.

TypeScript and JavaScript developers seem to welcome the news if it means getting Angular 2 done sooner. Hacker News user zoechi commented that the combination slowed Angular's progress:

The combined development (TS+Dart) was slowing Angular development down and contribution was painful because one needed knowledge of both languages. There are notable downsides for the split development but I fully understand the decision. Implementing everything in a way that it can be translated into the other language was a real pain and limited both versions to a common denominator which prevented both versions to benefit from the advantages of their respective language.

The newly freed Angular 2 for Dart is available on GitHub and is currently at version 2.0.0-beta.18. The TypeScript/JavaScript version is now at 2.0.0-rc.4.

Rate this Article

Adoption
Style

BT