Live data from Hacker News

AngularJS 1.3.0

angularjs.blogspot.com

81–90 of 90 posts

Re: AngularJS 1.3.0

#81
post #35

Earlier quoted context omitted.

After working for some time on angular project, I got a conspiracy theory: Google bought this company and threw angularjs to masses so they get all excited and spin wheels reimplementing stuff already done elsewhere, while Google will keep building products :) I am joking of course, but each joke always have part of truth in it..

Minus the fact that AngularJS was developed as a Google internal project / by a Googler / for a Google service (their support / help pages iirc), after they struggled for months building it.

from looking on angular internal code, i still feel they struggle with it :)

Re: AngularJS 1.3.0

#82

I feel Angular is better than almost everything out there but still not quite right. It seems way too complex for what it does, and the syntax looks like somebody vomited all over your code. Does two-way databinding have to be so awkward? Angular does help you in writing maintainable code (which is vital for JavaScript - dealing with large JS codebases is hard), but it also ties you to a technology which is probably…

Have you seen React.js ( http://facebook.github.io/react/ ) and Mithril ( http://lhorie.github.io/mithril/ )? They're supposedly smaller, faster, and easier than Angular, and does roughly the same things, as far as I've read. And they support server side rendering. At least React does.

Thanks for mentioning Mithril, I didn't know about it. It looks very interesting. I've been meaning to try React.js for a while now, just haven't found the time.

About Mithril, HTML generation with JavaScript is an odd design choice. Obviously it's much better from a technical point of view, but nested or complex HTML must get ugly fast, and I really don't want to deal with template code written by non-developers. Having said that, for a certain class of apps with high performance requirements and comprehensive browser support, Mithril is a very appealing option.

Re: AngularJS 1.3.0

#83

Earlier quoted context omitted.

How are you finding it awkward? It's the simplest way of getting data into a template that I know of - assign a value to a scope and done, no hassle. And vice-versa, too. (disclaimer: I come from Backbone, where we did all data and event binding by hand)

Sorry for not clarifying. What I find awkward about it is the Angular-specific baggage and the syntax, which just got more complex. Stuff like ng-model-options="{ updateOn: 'blur' }" is far from straightforward. I guess you could do ng-model-options="model.modelOptions" and define the behavior in the controller, but then your controller would be handling far more than it should. By the way, wouldn't a separate direct…

>When you leave these behind, you have to think about scope hierarchies.

Yes, a prerequisite to using a JavaScript framework is understanding prototypical inheritance

>You have to watch your watchers

What?

>I wish there was a simpler way for it to do its magic.

To date I haven't seen a coherent argument against Angular; complaints seem focused around having to learn framework specific syntax (present in any large MVC framework) or the perceived "heaviness" of the framework (suggesting the apps you're building aren't complex enough to justify something like Angular)

Re: AngularJS 1.3.0

#84
post #79

Earlier quoted context omitted.

The´re a bit different. Actaully the AngularDart has features that 1.3 don't have, like the new router, and I'm sure there is something in 1.3 that don't exist in AngularDart. But AngularDart seems to be the more "advanced" one.

Does using AngularDart means you can code with types and get decent auto-completion ? I know it can compile to regular JS, but does it really works well with non-chrome browser ?

It works just fine with a non-Chromium-based browser. You need to include the shadow DOM script though, since AngularDart depends on that.

Re: AngularJS 1.3.0

#85

Earlier quoted context omitted.

Have you seen React.js ( http://facebook.github.io/react/ ) and Mithril ( http://lhorie.github.io/mithril/ )? They're supposedly smaller, faster, and easier than Angular, and does roughly the same things, as far as I've read. And they support server side rendering. At least React does.

Thanks for mentioning Mithril, I didn't know about it. It looks very interesting. I've been meaning to try React.js for a while now, just haven't found the time. About Mithril, HTML generation with JavaScript is an odd design choice. Obviously it's much better from a technical point of view, but nested or complex HTML must get ugly fast, and I really don't want to deal with template code written by non-developers. Ha…

> but nested or complex HTML must get ugly fast

That's the problem JSX solves - nesting tags and attributes is less syntactically onerous than managing a tree of function calls or nested object structures, with their attendant braces and commas.

Here's the Mithril getting started example [1] done using JSX [2], for comparison (some of the other code has changed since I did this, but the rendering part looks the same)

[1] http://lhorie.github.io/mithril/getting-started.html#summary [2] https://github.com/insin/msx/blob/master/test/jsx/example.js...

Re: AngularJS 1.3.0

#86

Earlier quoted context omitted.

Sorry for not clarifying. What I find awkward about it is the Angular-specific baggage and the syntax, which just got more complex. Stuff like ng-model-options="{ updateOn: 'blur' }" is far from straightforward. I guess you could do ng-model-options="model.modelOptions" and define the behavior in the controller, but then your controller would be handling far more than it should. By the way, wouldn't a separate direct…

>When you leave these behind, you have to think about scope hierarchies. Yes, a prerequisite to using a JavaScript framework is understanding prototypical inheritance >You have to watch your watchers What? >I wish there was a simpler way for it to do its magic. To date I haven't seen a coherent argument against Angular; complaints seem focused around having to learn framework specific syntax (present in any large MVC…

> Yes, a prerequisite to using a JavaScript framework is understanding prototypical inheritance

Obviously, but you shouldn't have to care about prototypical inheritance for simple databinding. The way view-models work in Angular leads to some complicated scenarios which, in my opinion, shouldn't exist in the first place (http://toddmotto.com/all-about-angulars-emit-broadcast-on-pu...).

> What?

See https://medium.com/@kentcdodds/counting-angularjs-watchers-1... for an explanation.

> To date I haven't seen a coherent argument against Angular; complaints seem focused around having to learn framework specific syntax (present in any large MVC framework) or the perceived "heaviness" of the framework (suggesting the apps you're building aren't complex enough to justify something like Angular)

I have no problem with learning framework specific syntax and Angular is actually lightweight, both from an architecture and from a code weight point of view. What I do find problematic in Angular are some design decisions which often lead to complicated, and non-beautiful, code. Angular is no doubt incredibly useful, even for smaller apps, and I'm grateful for its existence. It is a step in the right direction. But I do think it has room for improvement.

Re: AngularJS 1.3.0

#87
post #85

Earlier quoted context omitted.

Thanks for mentioning Mithril, I didn't know about it. It looks very interesting. I've been meaning to try React.js for a while now, just haven't found the time. About Mithril, HTML generation with JavaScript is an odd design choice. Obviously it's much better from a technical point of view, but nested or complex HTML must get ugly fast, and I really don't want to deal with template code written by non-developers. Ha…

> but nested or complex HTML must get ugly fast That's the problem JSX solves - nesting tags and attributes is less syntactically onerous than managing a tree of function calls or nested object structures, with their attendant braces and commas. Here's the Mithril getting started example [1] done using JSX [2], for comparison (some of the other code has changed since I did this, but the rendering part looks the same)…

I like JSX, but I would say that Mithril + CoffeeScript is even nicer.

A coffeescript example (not mine): http://www.reddit.com/r/javascript/comments/20pzbj/mithril_a...

or

https://github.com/Whoaa512/mithril-coffee-gulp-seed/blob/ma...

Looks really clean...

Re: AngularJS 1.3.0

#88
post #42
post #40

Earlier quoted context omitted.

But React + Flux is an alternative to MVC. Still early days for Flux, but the principles are sound and I hope it offers a viable alternative to all these framework that rely mainly on variants of the MVC pattern.

Flux seem so overcomplicated I can't believe what I'm seeing.

The overcomplication (relative to what could be) is due to boilerplate and poorly defined convention for anything but the canonical todo app. It's early days.

There are some frameworks using some form of the Flux spec like Fluxxor and Reflux, but they're not opinionated or complete enough to hit the ground running.

The author of Fluxxor, for example, is himself working out where to put very basic functionality like network service calls.

In the react-router project, there's not an obvious way to either render from server or refetch data on route changes.

This is all very basic functionality for a medium to large project. It will feel like you're in the weeds after a couple of days of development.

We need a Flux++ framework with some stronger opinions, closer to Ember or Angular in scope.

Re: AngularJS 1.3.0

#89
The full list of new features, bug fixes and breaking changes is in this epic changelog: https://github.com/angular/angular.js/blob/master/CHANGELOG....

I trawled through it a couple weeks back and wrote up some of the most interesting new features: https://speakerdeck.com/niallsmart/angular-1-dot-3-whats-new

Re: AngularJS 1.3.0

#90
post #79

Earlier quoted context omitted.

The´re a bit different. Actaully the AngularDart has features that 1.3 don't have, like the new router, and I'm sure there is something in 1.3 that don't exist in AngularDart. But AngularDart seems to be the more "advanced" one.

Does using AngularDart means you can code with types and get decent auto-completion ? I know it can compile to regular JS, but does it really works well with non-chrome browser ?

Autocompletion and safe refactoring in IDE (in WebStorm, for example).
Post reply on HN