Live data from Hacker News

2 years with Angular

fse.guru

111–120 of 216 posts

Re: 2 years with Angular

#111

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…

No idea what you mean when you say dirty checking is O(n^2) - each watcher is checked once per loop. With 100 watchers you get 100 checks, not 100 * 100... I agree with a lot of what you say, but wonder if you're being rhetorical when you say Angular's popularity is baffling. Do you actually think that people pick tools by reviewing the CS literature and picking the one that best reflects the state of the art? :) Ang…

It is not, in the technical sense, O(n^2). Since it is being performed on a persistent basis, asymptotic analysis is not even quite the right tool to use - there is no single "input" and "output".

What is more precisely true is that the time taken by dirty checking per second scales with d×w×l, where d is the number of digest loops triggered per second, w is the number of watches, and l is the length of the digest cycle (the number of times that the watches are rerun before values stop changing).

Specific applications may find these variables to increase in different ways - all three will generally increase with application size, but for example, adding a digest on mousemove will immediately send d to a very high value.

What I really meant when I said O(N^2) was nothing precise though - just that, when I first read "every time you trigger a digest, we traverse every watch," it sounded like N^2 - it fit the pattern of "for every one of (growing number of things), do each one of (growing number of things)".

Re: 2 years with Angular

#112
post #25

I recently wrote about my experience with Angular in a different forum. Sharing it here: I worked on Angular last year building an app with a few complex views. The initial days were full of glory. Data-binding was new to me, which produced much goodwill towards the framework. Things started falling apart as I had to inevitably understand the framework in a little more depth. They practically wrote a programming lang…

Somewhat, but not completely unrelated to your story... > Google recently released a new version of their developer console ( https://console.developers.google.com ) which is built on Angular. Which actually works worse than the previous version. The layout is non-responsive and creates massive amounts of scrollbars on "portrait"-monitors, while 90% of the screen is effectively white-space. Completely wasted. Complet…

Your complaint is about the styling and UX though, not about the functional underlying framework.

Re: 2 years with Angular

#113

Earlier quoted context omitted.

> It rather makes me worry it is going to be the Python 3000 release all over again in terms of how much is changing. The underlying technology is changing so fast (ES6, web components, mobile web, etc.) that it's going to make upgrading an obvious choice even if it involves relearning a lot of stuff.

couldn't agree more on the Python example, I think one of the main agendas for the 2.0 release will be to make it more popular on mobile side of things ( https://www.airport-parking-shop.co.uk/blog/built-app-2-week... is one such example though not from the core AngularJS team) for which they may have compromised backward compatibility infavour of performance. and also do you think they'll continue with the 1.x relea…

There is probably going to be at least a 1.4 release. The new 1.x dev team that Google just created talks about their plans for the future here:

https://www.youtube.com/watch?v=LG9VkCDbte0&feature=youtu.be

They say the exact plans for how long they are going to support 1.x won't be finalized until after 2.0 gets released, so that they have some idea of how difficult it's going to be to migrate.

Re: 2 years with Angular

#114
post #56
post #52

Earlier quoted context omitted.

Angular will force you to convert all your rendering logic into its declarative API: ng-if, ng-repeat, ng-include etc. With React, you can simply write your program logic in Javascript and compose, reuse and pass around parameterized components with ease. Try building a simple nested tree in both Angular and React to see how both feels. Khan Academy has open-sourced their QA builder that supports creating questions a…

Thanks, the idea to use code instead of a limited set of declarations to create the view is convincing.

And now we go around in circles. ASP and classic PHP were the forerunners of using code to do the view!

Re: 2 years with Angular

#115
post #72
post #32

Earlier quoted context omitted.

YES! Thank you! I think I'll die if I have to read another developer arrogantly defining what should and should not be, and how he, in all his glory, hereafter defines this framework to "NOT BE WORTHY". I can't stand how some articles simply s&*t on years of software architecture principles and the work of very talented engineers and simply dismisses them like it's nothing. If you disagree with a framework's perspect…

The Angular 2 presentation given recently at ng-europe made it clear that many of the fundamental parts of 1.x are not built on solid architectural principles, which is why they are killing most of them off. I'd be interested to know how many of your large team were not experienced web developers before starting with Angular given that is one of the big criticisms in the article.

My team has mixed people but most of them are reasonably experienced. What we find most useful about Angular is that it offers a "right way" to go about things, which removes the necessity for endless discussions about "which architecture is best". When you have a large amount of apps that need to be built and maintained concurrently, having a similiar structure across all projects is very helpful.

Re: 2 years with Angular

#116
post #25

I recently wrote about my experience with Angular in a different forum. Sharing it here: I worked on Angular last year building an app with a few complex views. The initial days were full of glory. Data-binding was new to me, which produced much goodwill towards the framework. Things started falling apart as I had to inevitably understand the framework in a little more depth. They practically wrote a programming lang…

The performance problem is well-known and will probably be some of the first blogs / words of caution you'll encounter when starting out with AngularJS, and there have been numerous solutions for it - 3rd-party bindOnce directives, and in Angular 1.3 native support for bindOnce has been added (prefix the value with a double colon (ng-repeat="item in ::myList").

React handles rendering completely different though, and it's not a drop-in replacement for all of Angular. I probably would look at React if actual view rendering becomes an issue though. For the app I'm working on it's not, it's usually a single rendering pass without too much interaction.

Re: 2 years with Angular

#117

Earlier quoted context omitted.

No idea what you mean when you say dirty checking is O(n^2) - each watcher is checked once per loop. With 100 watchers you get 100 checks, not 100 * 100... I agree with a lot of what you say, but wonder if you're being rhetorical when you say Angular's popularity is baffling. Do you actually think that people pick tools by reviewing the CS literature and picking the one that best reflects the state of the art? :) Ang…

It is not, in the technical sense, O(n^2). Since it is being performed on a persistent basis, asymptotic analysis is not even quite the right tool to use - there is no single "input" and "output". What is more precisely true is that the time taken by dirty checking per second scales with d×w×l, where d is the number of digest loops triggered per second, w is the number of watches, and l is the length of the digest cy…

Oh ok, we're agreed. You'll not be having digest loops per second though, that'd be quite a weird situation :)

Digest on mousemove wouldn't be a good idea - look at _.throttle etc. You shouldn't realistically need digest loops more than once per 100ms, as people can't perceive changes happening faster.

Re: 2 years with Angular

#118

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-not. I can't say I agree with those motivations (and I'm sure I've got it wrong), and I quite like the more vanilla JS feel of Angular 1.x.

Anyway, my point is, both of those aren't production-ready.

Re: 2 years with Angular

#119

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 JS like you recommend will lead to a lot of reinventing the wheel, and for new developers to have no clue what's going on (they have to learn the framework you thought up). At least you can make predictions about applications when it says 'AngularJS' on the job advert.

Re: 2 years with Angular

#120
I think people are failing to see that not all apps are huge monolithic applications; for most of those apps Angular works just fine.

In fact we should be striving to get away from all of those monolithic code bases as much as we can. In the cases where we can't get away from that then we should be going with tried and trusted methods of building those apps and probably relying on the server a hell of a lot more for those kinds of really large/enterprise/corporate apps.

Most use cases for angular are to make a web app that pulls and pushes data from some Restful service. Angular lets us take that web app, through cordova/phonegap/etc, and wrap it into a mobile ready application that you can push to an app store.

Whats wrong with that?

Post reply on HN