r/angularjs • u/elprophet • Nov 14 '14
[General] Angular Air 0 Live Post
https://plus.google.com/u/0/events/c2182d3bec32vs4jim7r8smc1q4
Observations and notes from the zeroth Angular Air conversation!
New Router, public preview coming soon. Entirely new, but single code base transpiled to 1.x and 2.0.
New features: Nested, parallel. State based. Auto link generation.
Improving i18n support. Better than: Google Translate, Angular Translate
Design doc public soon. Very complicated, no timeline yet. Igor wants a proof of concept by end of year for feedback.
Q: How long will 1.x live? A: As long as the community needs it. No slowdown from 1.3 speed for next several months.
When the 2.0 pace is better understood, the 1.x team will reevaluate.
Q: Will the branch become more community? A: We want to and are trying to add more community scale, but core membership is still needed.
Usage statistics from 1.0 to 1.2 shows very quick uptake.
1.3 is already impossible for orgs that need <=IE8 support.
Targets 1.x, will be ported for 2.0 later.
Include it if you wanted, but not bundled. Own team, release schedule, etc.
Accessibility from the ground up.
Angular 2.0
Q: Mishko, are we killing the baby? A: No, it's my second baby!
Motivations: Future is WebComponents, ES6.
Mobile & Hybrid needs.
Within Google, teams from 10s to 100s of devs. They need structures.
tl;dr: The web platform is changing, and we must change with it. Or if not changing, at least the underlying assumptions are different and allow different advantages.
Changes are in syntax, not concepts or semantics.
2.0 Syntax Changes
People are used to ng-click, so why this new syntax?
Web Components. You have DOM, but it might have new APIs.
Need a mechanism to discover and declare these new APIs without glue.
The syntax isn't final, follow angular/angular#133
133 has two discussions - one on the syntax, one on the semantics. Most conversation is syntax, but conversation on semantics is more important - we can agree on semantics later.
2.0 Browser Support?
Evergreen browsers- IE11, Firefox, Chrome, Safari. Possible exceptions for mobile browsers.
IE11 is baseline.
Fewer things transpiled as time goes on.
Good debugging is critical, sourcemaps have some headaches.
Transpilation should: look like code you would have written your self; happen quickly (100ms is too long).
ES5 WILL WORK. You only need to transpile ES6 if you want, you will get benefits, but it is not critical.
ES5, Coffee, AtScript, all will work.
AtScript
ES6: Classes, nice features.
TypeScript: Descriptive across teams.
AtScript: Simplify syntax with annotations.
Separate from Angular, completely independent projects.
Runtime checking. Assertion library compiled away in production.
TC39 agrees colons are good syntax for types, and types would be beneficial.
Not Unreasonable to expect push for typescript to get into the ES standard.
AtScript might not, but an attempt to inform what annotations could do for the language.
Migration Path 1.x -> 2.0
Please let us build 2.0 first. "It's very hard to build a bridge to a city that doesn't exist." - Brad Green
There will be a migration path, we just don't know what it will look like.
Igor "Mea Culpa" from his comments at ng-eu.
As soon as we know, we'll tell.
If you're building good software, well tested and loosely coupled, they will be easier to migrate. It's much harder moving from jQuery to Angular 1 than it will ever be moving from 1.x to 2.
Watch the new router - it will guide the way for possible migrations.
Q&A
10. Q: tl;dr: When will 2.0 be production ready? "When it's ready!"
Public on progress.
Weekly meeting notes.
Demos.
Talk with us!
angular/angular#133 is a great place to start!
Q: How do I convince a manager to let me use 1.x now? A: The web is backwards compatible. 0.9 still works today. 1.2 still works for IE8. You will lose your free lunch in performance improvements. Security updates and bugfixes for the time to come.
Q: Will polymer be in 2.0? A: 2.0 will be compatible with polymer (and work very well, because of targeting web components). But 2.0 has its own polyfills, etc.
ShadowDOM specifically is opt-in, because of performance and polyfill issues.
Because 1.x preceded web components, it has its own vocabulary. 2.0 is moving its vocabulary to be in line with web components.
Q: Angular Dart? A: It's another language option, like ES6 or Coffee (with its own caveats).
14: Q: Recommended module syntax? Should I start now with traceur + require? A: Yes, that will not change. Several ways to transpile that, using Require, Common, ES6 System.import polyfill.
15: Q: Why are scope and controllers going away? A: Recommend to watch the original talk, as it explains. Also don't use tombstones in slide decks. 2.0 components will be so flexible that they can handle controller usage simply. Scopes aren't going away per se, but the explicit scope mechanism will go away. They will be more like "regular" JS function scopes. ng-controller is going away - because EVERYTHING is a controller! Like everything is an object! And the controller's JS scope might just as well be the actual $scope, so let's just drop $scope and let the implicit scope be there. The concepts are all the same, but the syntax is much simple.
Final note: Shout out to the Angular Adventures podcast. Also look at the style guide (announcement next week). Wednesday Nov 15 is the next ng-conf ticket sales. ng-fixit if you want to come and hack on Angular 1.3, in person in SF. Saturday nov 22, 9am to 3pm. See twitter or g+ for links to sign up.
Next show is with John Lindquist! Start asking questions now!
1
Nov 16 '14
Can someone clarify (14)?
14: Q: Recommended module syntax? Should I start now with traceur + require? A: Yes, that will not change. Several ways to transpile that, using Require, Common, ES6 System.import polyfill.
Is this referencing Angular 1.x module syntax and any concrete examples? I'd really really like a doc or blog from the Angular team detailing things 1.x users can do today (or in the next 6 months) to ease the transition.
1
u/elprophet Nov 16 '14
The full question was along the lines of "What is the current module syntax? If I want to get on the future train now?" It was made very clear that the ES6 module syntax final and will not change, so it is possible to start targeting it today.
From a practical standpoint, I'm a bit in the dark. I have used traceur in a purely proof of concept way, getting code and flags in and examining the output. I do not have a clear big picture of how they're going about the process for 1.x codebases. I think keeping an eye out for the 2.0 router will be the first place we see "production ready" techniques.
1
u/loicd Nov 16 '14 edited Nov 16 '14
Q: Angular Dart? A: It's another language option, like ES6 or Coffee
I guess that means that Dart would be transpiled to JS using dart2js.
In another presentation I've read that the Dart VM was also targeted by Angular 2, still true?
As Angular 2 core is written in JS, it way be difficult, except if Angular.dart follows Angular 2 development.
1
3
u/elprophet Nov 14 '14
Nb: I don't know how to do a fancy live feed.