Live data from Hacker News

Angular 2.0

blog.angularjs.org

11–20 of 169 posts

Re: Angular 2.0

#11
post #6
post #2

"All code in Angular 2 is already being written in ES6. As ES6 doesn’t run in browsers today, we’re using the Traceur compiler to generate the nice ES5 that runs everywhere. We’re working with the Traceur team to build support for a few extensions like annotations and assertions." That's pretty cool.

While "cool" and "clever" and any other half-positive adjective you like, it does mean things will literally be hell to debug until native ES6 support is available in current browsers. I thought the internals of Angular already had a reputation for being pretty horrible and indecipherable already. I doubt this will improve on any of that criticism.

Really? Do you mean it's just super optimized and advanced, or coded badly? I kind of always assumed that famous libraries built by a team of open source geniuses would be super tight and tested for major errors and performance inefficiencies.

No snark, I really did think this. Of course, Wordpress and Drupal do seem to have a lot of crazy architectural decisions that made maintenance difficult, so maybe I am just completely off.

Here are two JS files from a framework that I've written myself over the past few years, for my own use. Is the angular source code pretty much like this, or much more optimized?

https://github.com/EGreg/Q/blob/master/platform/plugins/Q/we...

https://github.com/EGreg/Q/blob/master/platform/plugins/Stre...

Re: Angular 2.0

#12
I was at ng-conf back in January and there were some great presentations on a lot of these topics, such as the new DI model. I'll have to pull out my notes.

It's great to see a framework team take a fundamentally new approach. Many frameworks get stuck in a mindset while other frameworks pop around them with new and more innovative approaches.

Good luck to the Angular team.

Re: Angular 2.0

#13
The new DI looks confusing. The old way is super simple to understand. You inject the location provider and call it. In the new way however I don't understand what's going on at all.

Where can I find a simple example?

Re: Angular 2.0

#14
post #11
post #6

Earlier quoted context omitted.

While "cool" and "clever" and any other half-positive adjective you like, it does mean things will literally be hell to debug until native ES6 support is available in current browsers. I thought the internals of Angular already had a reputation for being pretty horrible and indecipherable already. I doubt this will improve on any of that criticism.

Really? Do you mean it's just super optimized and advanced, or coded badly? I kind of always assumed that famous libraries built by a team of open source geniuses would be super tight and tested for major errors and performance inefficiencies. No snark, I really did think this. Of course, Wordpress and Drupal do seem to have a lot of crazy architectural decisions that made maintenance difficult, so maybe I am just co…

It seems that they go as far as creating their own benchmark tool to optimize their performance[1]. They also seem to have a logging tool in the works just to expose the stuff going on under the hood[2].

[1]: https://docs.google.com/file/d/0BwftRCZoTFiyRzhnVml3dlRiR1A5...

[2]: https://github.com/angular/diary.js

Re: Angular 2.0

#15
AngularJS has a J2EE mindset. Where libraries grow to become as hard to learn as programming languages themselves. It does not make semantic sense to me anymore.

Here is an example from the site:

  
      Length (float):
      
      {{length}}
      
        This is not a valid float number!
    
How semantic is ng-show="form.length.$error.float? smart-float sounds like C++. If programming languages worked like this, we wouldn't have built many apps. The problem is that some frameworks assume that everything should be done with using configuration. What ends up happening is that the configuration (and conventions) becomes its own language. This is a waste of time in the long term; library conventions are not a portable skill set.

Some things are just better off with plain JS and simple HTML. FB/Instagram's React is a much better approach to building HTML UIs; you get readable JS and HTML instead of configuration mess.

Re: Angular 2.0

#16
Unless they plan to release this 4-5 years from now isn't it a bit optimistic to release something intended to be used in production for IE11 only? For most real-world applications it's kind of nice to be able to support anything with a browser share over 1-2%, with this requirement it places Angular squarely in the 'startups for the tech crowd'-only world.

Re: Angular 2.0

#17
post #15

AngularJS has a J2EE mindset. Where libraries grow to become as hard to learn as programming languages themselves. It does not make semantic sense to me anymore. Here is an example from the site: Length (float): {{length}} This is not a valid float number! How semantic is ng-show="form.length.$error.float? smart-float sounds like C++. If programming languages worked like this, we wouldn't have built many apps. The pr…

You know, I disagreed at first, but then I looked at React's semantics and couldn't agree more afterwards.

Re: Angular 2.0

#18
post #15

AngularJS has a J2EE mindset. Where libraries grow to become as hard to learn as programming languages themselves. It does not make semantic sense to me anymore. Here is an example from the site: Length (float): {{length}} This is not a valid float number! How semantic is ng-show="form.length.$error.float? smart-float sounds like C++. If programming languages worked like this, we wouldn't have built many apps. The pr…

That's not necessarily semantic, but that's declarative and it's what I like with Angular. No need to think cinematic such as "when this change, update that", but just declare links.

Re: Angular 2.0

#19
post #16

Unless they plan to release this 4-5 years from now isn't it a bit optimistic to release something intended to be used in production for IE11 only? For most real-world applications it's kind of nice to be able to support anything with a browser share over 1-2%, with this requirement it places Angular squarely in the 'startups for the tech crowd'-only world.

There are a lot of intranet applications where you know the browser you target.

Re: Angular 2.0

#20
post #16

Unless they plan to release this 4-5 years from now isn't it a bit optimistic to release something intended to be used in production for IE11 only? For most real-world applications it's kind of nice to be able to support anything with a browser share over 1-2%, with this requirement it places Angular squarely in the 'startups for the tech crowd'-only world.

The intention is to use it with Traceur, which is an ES6->JS transpiler that works right now. It's like writing a framework in CoffeeScript or dart2js - users shouldn't care about the implementation language, the ultimate binary is just a blob of JS that works on browsers - except that the source code will eventually run natively in the browser.
Post reply on HN