Live data from Hacker News

Angular 2.0

blog.angularjs.org

111–120 of 169 posts

Re: Angular 2.0

#111
post #57
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…

React solves all the problems in the world with their nestable but still autonomous components approach. It dispenses controllers -- and automatically give control to the component which deserves it --, it dispenses templates, and automatically gives the power to make the entire app in modular small pieces of HTML, it dispenses models, because models are already embedded in the components in which data is rendered. R…

When I investigated React in detail, I found that there is a lot to like about it, but it's certainly no "holy grail." Specific downsides: you have to go back to manually writing event handlers (instead of getting automatic two-way data binding) and the virtual DOM is a leaky abstraction.

Here's my article where I analyze this in much more detail: http://blog.reverberate.org/2014/02/react-demystified.html

Also React does not "solve all the problems in the world" -- it says nothing about routing, validation, testability, and many of the other problems that Angular has solutions for.

Re: Angular 2.0

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

> things will literally be hell to debug

The word "literally" has officially lost all meaning.

Re: Angular 2.0

#113
post #72
post #65

Earlier quoted context omitted.

This is true. AngularJS is much better than what we had before, it is kind of large and monolithic. The cycle probably goes thusly: Large monolithic framework comes and shows everyone a new way of doing things (Angular/Django). People think it is too large and monolithic, so make microframeworks (Flask/Whatever comes after Angular). The next step will be a kind of happy medium.

imo AngularJS can be pretty micro and scales nicely. Its one of its major strengths, as you can use it to just build a tiny widget inside an existing page or all in and build a huge application.

Micro in the code you write, not the code that's loaded, so it doesn't seem practical to me.

Re: Angular 2.0

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

smart-float is an HTML attribute. It does not "sound" like C++. Maybe you should learn HTML5 first? Why this is the top comment is beyond me. This is whining.

Except that it appears to be an angular directive...?

http://docs.angularjs.org/guide/forms

Re: Angular 2.0

#115
post #83

Earlier quoted context omitted.

Backbone doesn't do data binding; it's a completely different thing. (That's why things like rivet and epoxy exist; because backbone doesn't do it right)

Correction: Backbone doesn't try to be the kitchen sink like Angular. Its source code is about 500 lines, and its docs say as much: "Two way data-binding" is avoided. While it certainly makes for a nifty demo, and works for the most basic CRUD, it doesn't tend to be terribly useful in your real-world app. Sometimes you want to update on every keypress, sometimes on blur, sometimes when the panel is closed, and someti…

This. I would add angular is good for teams requiring extensive structure. The cost is control. If you're building a corporate webapp, angular is great to keep everybody neat. If you're doing something unprecedented such as 3D rendering or a new UI element, angular will hinder more than backbone.

Re: Angular 2.0

#116

Earlier quoted context omitted.

smart-float is an HTML attribute. It does not "sound" like C++. Maybe you should learn HTML5 first? Why this is the top comment is beyond me. This is whining.

Except that it appears to be an angular directive...? http://docs.angularjs.org/guide/forms

What do you think an Angular directive is?

It is a DOM marker (HTML attribute, element, class or comment) with behavior (JavaScript) tied to it.

Angular lets you create your own HTML attributes. That's what a directive is.

Re: Angular 2.0

#117
post #30

All I really need are client-side templates and awesome DOM binding. What's the current best options?

Backbone.JS, it's exceptionally bare bones, but hey it's YOUR code. You don't have to memorize an entire framework like Angular. Pick up a Backbone book and in two weeks your dangerous enough to use it. A month, you're in the groove. 6 months: Angul-who?

If you are going to use Backbone for the first time in a big project, beware that you don't end up with low-level code that is duplicated in different flavours all over the place.

When you have implemented features enough to notice that it takes too many steps to make new views that resemble old ones, ease off from feature building, and make proper custom abstractions suitable for that particular project.

Also check out Backbone extension: Marionette for modularizing and backbone-documentmodel for non-linear forms.

Re: Angular 2.0

#118

An yet another simple text blog that is 100%, completely, utterly broken an useless without JavaScript enable. There isn't even any compelling feature. Besides the sliding out mention there is _no_ reason JavaScript even needs to be on this page. I don't get why BlogSpot an so many other sites require javascript to o absolutely nothing of value just to see the site. It's maddening and appalling.

It's maddening and appalling to you because you deliberately disabled an essential part of the web platform on your browser. Your problem, not theirs.

Re: Angular 2.0

#119

An yet another simple text blog that is 100%, completely, utterly broken an useless without JavaScript enable. There isn't even any compelling feature. Besides the sliding out mention there is _no_ reason JavaScript even needs to be on this page. I don't get why BlogSpot an so many other sites require javascript to o absolutely nothing of value just to see the site. It's maddening and appalling.

It's maddening and appalling to you because you deliberately disabled an essential part of the web platform on your browser. Your problem, not theirs.

What about the blind who use screen readers or braille displays? Why should the page become so bloated that I can't read simple text simply?

Re: Angular 2.0

#120
post #96

Earlier quoted context omitted.

I cringe when I hear the words "global" and "event" together in the same sentence. Projects I've worked on in the past that relied heavily on global events often became a maintainability nightmare.

Why? Please share your experiences. I don't understand what's the utility of event emitters if not for serving as glue to all the separate components of an app. Am I wrong?

You're not wrong. It's definitely one way to solve it. I just find it harder to jump into a project with heavy reliance on global events and be able to quickly understand what's going on. It gets even harder if you have events firing other events.
Post reply on HN