Live data from Hacker News

2 years with Angular

fse.guru

121–130 of 216 posts

Re: 2 years with Angular

#121

I find the rise of Angular kind of baffling. Angular's scope system is exactly analogous to the scope system of a programming language. This is a solved problem! When you make a scope system, make it lexical, and require explicit declaration before use. If you're not making those choices, then at least acknowledge that these are the standard answers, with very clear advantages over other scoping systems, and explain…

Angular's scope system is only weird because they picked the name 'scope'; more modern angular applications / usage drop that one and use the 'controller as x' syntax, where instead of assigning values to a $scope object, it's assigned to the controller itself via 'this'. It's still effectively the same, but you won't be confused with scope anymore. The dirty-checking loop is IMO a compromise they made because the ES…

There are many ways to check if a object has changed in JavaScript, Angular's version of it is probably however the worst approach. The fact that it loops its a fundamental flaw that can't be taken seriously. Its a hack and should have never passed code review.

Diff the virtual DOM to determine the minimal amount of imperative real DOM operations needed. Why is this so hard to understand as the optimal solution?

Heck, you can even re-render the entire DOM on every requestanimationframe. This is still better than AngularJS approach! Google Bloop for an example which is very easy to follow and can either support occlusion.

AngularJS is pure hype and ignorance.

Re: 2 years with Angular

#122

Earlier quoted context omitted.

You say: > That said I've found Angular to be more than flexible enough to meet the needs of your typical CRUD apps The OP says: > Are there any use cases where Angular shines? > * Building form-based "CRUD apps". So I guess you and the OP pretty much agree.

The author and I don't agree, except that Angular is not suitable for high-performance frontends (like games). The author suggests that Angular is only suitable for prototyping and that simply using the framework is technical debt. I particularly disagree with this statement: "Accept the fact that you will suffer in the future. The lowered expectations will help you stay happy sometimes." It seems like the author is…

The OP said he thought it would probably be great for a typical CRUD app.

From you wrote, you implied that maybe you mostly make only typical CRUD apps, when you write that's where you've found Angular to be more than flexible enough?

So that could explain your different experiences/analyses? You both actually agree it's good for typical CRUD apps?

Re: 2 years with Angular

#123

I also have been using Angular for my entire professional developer career, which in a few days will hit 2 years. This article is pretty accurate for the most part, although some of the minor complaints are not quite so accurate. Performance is something to be careful about, but the Angular team has worked hard at improving it and it has improved immensely with 1.3 - optimizations such as bind once & $watchGroup and…

I wouldn't recommend either Polymer or the current development version of Angular 2.0 for a production application just yet; Polymer leans heavily on the unfinished web components standard and other experimental and unimplemented browser features, and Angular 2.0 is still under heavy development. I also gather they're either going to use ES6-but-with-extras-because-we-can, or with AtScript, ES6-with-types-because-why…

Oh, I agree about not moving to either for a major project currently, although I'm probably going to use Polymer for a small static site project I'll be starting in the next month or two - web components are supported in Chrome currently (shadow DOM and custom elements at least - not sure about the data binding part yet), and Polymer's platform.js makes it very easy to polyfill the missing functionality.

I suspect Angular 2 will be the best we have once it comes out, but I also question some of the decisions made from certain perspectives. At least they're listening to the community, evaluating the feedback and suggestions, and incorporating it into their decision making though, such as the change with the HTML templates.

Re: 2 years with Angular

#124

I find the rise of Angular kind of baffling. Angular's scope system is exactly analogous to the scope system of a programming language. This is a solved problem! When you make a scope system, make it lexical, and require explicit declaration before use. If you're not making those choices, then at least acknowledge that these are the standard answers, with very clear advantages over other scoping systems, and explain…

And it's all so you can type `model.key = value` instead of `model.set(key, value)`. When I began using Angular I thought the latter was clunky and verbose. A few months in I would have loved to have that control back. And yes, the scoping was a nightmare.

Like others here, the app I was working on hit a hard performance limit with the digest cycle. When the main table of our app got to a certain number of rows it started to crawl on a desktop browser and was just unusable on a mobile device. And we tried so many things but there was just no real way out of it. It's crazy to me that people even offer up such things as infinite scrolling as a way out.

The weird thing was, I was by far the most experienced web developer working in that part of the organization, but all the backend/.NET dev and project managers were insisting on Angular as "the future of web development". I recall being spooked by how insistent they were, even though I had nothing against Angular at the time and wanted to learn it. Bringing up some performance caveat about data-binding wouldn't have gone anywhere, even had I the foresight to raise the issue.

I don't work there anymore but as far as I know they just... left it that way. So the most intensive users of the app got the worst experience. I know this is snarky but I suspect that's the kind of shop that should use Angular.

Re: 2 years with Angular

#125

AngularJS owes it success to an easy onboard that allows a user to easily create a gimmicky two-way binding demo. And then the pain begins. It matters little whether some find it productive, what matters is that the engineering principles it is based upon are fundamentally unsound. Control and conditionals in attributes are absurd. Especially when they require learning an expression language unique to that framework.…

> It matters little whether some find it productive, what matters is that the engineering principles it is based upon are fundamentally unsound. I disagree. What matters is whether you can produce a working application - and iterate on that, but after actually releasing. Angular is modular enough to allow for gradual optimization (like integrating React et al), instead of doing premature optimization. Using vanilla J…

True, but Angular reinvents the wheel unnecessarily and at a cost of performance and being difficult to reason about.

JavaScript code can be easily written for reuse and composition. When a framework attempts to co-opt that there should be a very good reason. For Angular no such reason exists.

Re: 2 years with Angular

#126
post #85

Earlier quoted context omitted.

I've not gotten the same impression and expect Angular 2 to be out sooner than later. Here's a code example: https://github.com/angular/angular/blob/master/modules/examp... It looks like `master' is all Angular 2 and coming along well.

It's a rather empty project compared to 1.X at https://github.com/angular/angular.js 138 JS files v > 1000 Fingers crossed that isn't the level of Hello World required either in the world of 2.0 and AtScript.

A lot of constructs become simpler with the addition of web components, O.o, and ES6. Coding it up shouldn't be too bad, the Angular team seems to be trying to make sure the design is as fleshed out as possible.

Re: 2 years with Angular

#127

Earlier quoted context omitted.

Angular's scope system is only weird because they picked the name 'scope'; more modern angular applications / usage drop that one and use the 'controller as x' syntax, where instead of assigning values to a $scope object, it's assigned to the controller itself via 'this'. It's still effectively the same, but you won't be confused with scope anymore. The dirty-checking loop is IMO a compromise they made because the ES…

There are many ways to check if a object has changed in JavaScript, Angular's version of it is probably however the worst approach. The fact that it loops its a fundamental flaw that can't be taken seriously. Its a hack and should have never passed code review. Diff the virtual DOM to determine the minimal amount of imperative real DOM operations needed. Why is this so hard to understand as the optimal solution? Heck…

Clearly you like react, but react also doesn't do as much for you as Angular. It's "only the V in MVC."

Re: 2 years with Angular

#128

Earlier quoted context omitted.

If you were given a chance to choose your stack again, what would you pick now? (Considering all the learning you have gained after going with Angular for your large web-app)

Actually it depends more on the time of development and project specs. For now I'll probably choose ReactJS. If by the time Angular 2.0 is launched then I'll definitely give it a shot, it seems promising and is based on ECMA6 utilizing the new features provided by it will be a plus. IMO AngularJS can be scaled _IF_ used with caution, though I won't recommend it unless one has a good experience with its core.

But ReactJS isn't a full replacement for AngularJS (and I don't see why people apparently fail to make that distinction); React is just the V in MVC, Angular is / can be the rest.

Re: 2 years with Angular

#129
post #4
post #2

I confess I am an Angular fan. But this article is not Angular specific at all, it stays on a very high-level. Replace the word Angular with any other web framework and the article would still make perfect sense. Not that the article does not have some value, just that it has very little to do with its title.

NOTE: Haven't used AngularJS and only scraped the article. But Rails for example, doesn't have a namespace problem, because ruby modules provide a namespace and prevent name clashes easily. That said, I'm not sure Rails and AngularJS are direct competitors as many apps use a combination of both frameworks or more generally Rails + JS-framework.

Rails doesn't have a namespace because Ruby has namespaces and Javascript doesn't - it'll be added in ES 6. Rather late, I think, but there you go. You can actually fake namespaces with Angular if you use a module framework like Require.js, but that involves adding more boilerplate to every module (like Angular 2.0 will actually require as well).

Re: 2 years with Angular

#130

I find the rise of Angular kind of baffling. Angular's scope system is exactly analogous to the scope system of a programming language. This is a solved problem! When you make a scope system, make it lexical, and require explicit declaration before use. If you're not making those choices, then at least acknowledge that these are the standard answers, with very clear advantages over other scoping systems, and explain…

I knew someone who consulted a large bank not to use Angular for financial apps. They were insistent to use Angular until he finally showed them a fairly typical requirement of an app like that in angular: 5 tables with 100 rows and columns. It literally crawled when running on a Dell Workstation laptop.

It is kind of nuts that angular is big.

Post reply on HN