Live data from Hacker News

Angular 2.0

blog.angularjs.org

31–40 of 169 posts

Re: Angular 2.0

#31

Back last year, (May 2013) Miško said: "We're in early stages of designing Angular 2.0, but some of our goals are: - Angular will use the underlying web platform features available to it (e.g. Node.bind, template integration, Custom Elements, etc...) - Web Components (Polymer, Ember, or any other framework/library) will work seamlessly within Angular apps and directives. - Components written in Angular will export to…

First thing I looked for myself, this doc is titled "Polymer Notes" https://docs.google.com/document/d/16O2Im1ekfdJ4FU8FBbVRYGjq... - sounds like team Angular and team Polymer aren't exactly on the same page quite yet.

Re: Angular 2.0

#33
post #23
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…

I only looked superficially at React, so maybe I got something wrong, but the HTML/XML intermingled with Javascript seems extremely off-putting to me, akin to ASP/JSP/PHP.

'JSX' is also what made me avoid React at first. But once I started using it, it made perfect sense. The 'JSX' is just compiled to Javascript anyway, it's just more convenient for deep nesting of html elements within a component.

In more recent talks the React devs have avoided using JSX in examples and instead use the compiled form as JSX goes far enough from what people expect that it turns people away before they've given it a chance.

The most important idea to take from React is that UI components are much simpler when they are state machines.

Re: Angular 2.0

#34
The actual important stuff:

"Simplify the directive API

Integrate with other component frameworks using web standards

Improve performance

Allow tools like IDEs to analyze and validate templates"

Re: Angular 2.0

#35
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…

[deleted]

Re: Angular 2.0

#36
post #22
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…

This is a critique of the example, more than the framework itself. The "smart-float" directive is not a native angular directive, but rather a directive made for the example. As for the "form.length.$error.float", it probably could be a bit more concise, but is it really that bad? What would be a "more semantic" way? The main strength of angular, is that you are able to point your DOM elements to environment variable…

I'll keep this high level; that's where I have issues with Angular.

Angular wants you to learn its vocabulary, and encourages users to expand it further. Like you point out, smart-float is a directive specific to the example. To me, it is a foreign object I don't recognize in html. In fact, directives, scopes?

The big one. Dependency Injection, factories, modules. In JS, this is a solution looking for a problem. There are simpler alternatives to DI. They have issues, but only in theory.

Clarity matters a lot. ng-show="form.length.$error.float". Is there a more simpler way of doing it? There should be; I can't even tell what that means.

I think there are distinctly two camps. I'm in the one which wants frameworks to make me productive with the languages, specs and standards I already know. React (+ router) does this. Backbone does this too, depending on what you're building.

(Edit: replaced semantic with clarity)

Re: Angular 2.0

#37
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…

> How semantic is ng-show="form.length.$error.float?

I agree with your conclusion, but I think you're misusing semantics. This isn't semantic, but neither would anything else be. As soon as we get to using logic, we don't have semantics.

That line is unclear and not easy to understand. That is why I object to it.

Re: Angular 2.0

#38
post #37
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…

> How semantic is ng-show="form.length.$error.float? I agree with your conclusion, but I think you're misusing semantics. This isn't semantic, but neither would anything else be. As soon as we get to using logic, we don't have semantics. That line is unclear and not easy to understand. That is why I object to it.

Thanks; I will read up on the proper definition. I had been using it to imply 'meaning' (more or less), from Semantics which wiki says is the 'study of meaning'.

'unclear' is a better choice. And less pretentious too, than 'semantic'.

Re: Angular 2.0

#39
post #5

ES6 support with ES5 fallback, I am stoked. As to the mobile-first changes, we'll see - I have some reservations on using Angular on lower specced mobiles, for the $watch()-cycle seems to me huge drain on batteries. But since the Angular guys know what they are doing, I am looking forward to nothing but goodness. Why not just include restangular as one of the resource modules if they decide to go all-out modular? I a…

Using heavy javascript computation in low performant mobiles, isn't the same as playing Playstation 4 games on a Playstation 3?

You will need to go Playstation 3 native for performance, otherwise, you will not be able to do much computation.

Re: Angular 2.0

#40
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.

I write Ember applications using CoffeeScript plus ES6 module extensions, and everything gets transpiled down to JavaScript. And yet, I find it pretty easy to debug the generated code: It looks more-or-less like what I wrote, it's nicely indented, and there's just a little extra boilerplate here and there.

Do you have any reason to believe that the Traceur compiler generates unreadable output with Angular?

Post reply on HN