Live data from Hacker News

2 years with Angular

fse.guru

101–110 of 216 posts

Re: 2 years with Angular

#101
I've been using Angular for a SaaS for 7 months, the project is launching in about a month from now.

It is not just a CRUD app. It has:

~170 views ~70 custom directive ~100 controllers

Many directives can execute on the same page.

A single page can have multiple tabs, forms, modals, charts.

I hit some situations where performance dropped a lot but if you take the time to benchmark and test you can fix it.

The key to keep it stable is to load the UI (directive) when you need it and destroy it when you are done.

Personally, I've not found any serious issue so far.

Re: 2 years with Angular

#102

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? :)

Angular is productive, people want to get things done; thus Angular is popular.

Re: 2 years with Angular

#103

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 author and I don't agree, except that Angular is not suitable for high-performance frontends (like games).

Would you really use DOM/virtual DOM templates to make a game? it makes little sense. I dont believe any "MV*" framework is suitable for games,even if the game is DOM based.

In a game,what you want is to make sure that at time T,the screen reflects the state of the game.Since you are manually pooling all states with a timer in order to render the game on screen,there is no need for databinding.

Re: 2 years with Angular

#104
post #37

I've worked on Angular projects of varying sizes -some as large as 30KLOC (products where every page has enough interaction to justify an Angular controller)- and I can never find myself agreeing with these articles. Have I just drunk too much kool-aid? Or is it possible that with the right team, the right architecture, Angular can actually be a really great framework to use? The common theme for every large Angular…

I think the keyword here is "state". A lot of bad code is written because people think they need to access (global) state all the time. Maybe you drunk too much good practice-aid ;)

Exactly. It seems to me that you can very well code the way react tells you to ( flux) in angular. Now it means you may not use two way data binding but the result will be probably much more undertstandable,

Re: 2 years with Angular

#105

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…

1) Google was behind angular, Google has a huge marketing team, and there is a surreal amount of Google love in the developer community.

2) Angular was the first framework where you could take developers who didn't know JavaScript (or hated it for its worst parts / memories from the bad old days), but were used to learning frameworks (think Java people) and dealing with framework workarounds, and say, use this, you'll feel right at home.

Re: 2 years with Angular

#106
I've actually never used any javascript framework. It is stuff like this that drives me away. If you pick any one framework, you get half of a crowd telling you that it sucks, and then a year later your version is now deprecated/replaced and you get to re-do everything again. I've attempted to avoid the whole web-app scene, but with the current job market, looks like one has to know one of these frameworks...

Re: 2 years with Angular

#107
post #49

This seems to be the summary of every tech flame war ever, and applies rather well here: A: I've used tech X in a lot of Y contexts, and I find it's not great. I will generalise slightly imply that tech X is not the panacea that it has been presented as. B: Yeah? Well, I've used tech X in a lot of Z contexts, and I find it works fine! You're wrong! You're using it wrong! Maybe you're not wrong in context Y, but for m…

Amen. Look back 10 years ago and we were having the exact same discussions about mod_perl, php, and java servlets. Nothing has really changed except perhaps for an increase in the number of regurgitated comparisons.

Re: 2 years with Angular

#108

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 ES6 standardisation body and consequently browser support for object observable is very, very slow - although it's been added in Chrome 35. I'm sure they'll rely on that full-time in Angular 2.0, maybe even as an option in a future 1.x Angualr release.

I agree on the module system, it's weird, causes naming clashes and I don't think it adds much since it's also not linked to a script loader of any kind.

As for the rest of your statement, I'm still going to say that application frameworks in Javascript are in its infancy; the single-page application paradigm is only ten years old (with Gmail being the first major one), and there have only been frameworks dedicated to SPA's in the past five years, with AngularJS only becoming popular in the past two (and solving a number of issues from its predecessors, like two-way binding, testability, etc).

Angular has its faults, but the alternatives aren't flawless either. Angular 2.0 will be the defining front-end framework for the next five years to come. It takes the lessons learned from Angular 1.x, Angular Dart, Durandal, and applies the bleeding edge in client-side scripting (ES 6). It's still got its weirdness (like square and round braces around HTML attributes, I have no clue what that's about), but I'm sure that none of the weirdness in that framework has been without thorough research and design discussions - I'd argue that it will be the most well-designed and well-thought-out front-end application framework in history, instead of a lot of current-day frameworks that sorta evolved into what they are today over the years.

Re: 2 years with Angular

#109
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 optimizations around the $digest cycle and $watch make it a huge improvement over 1.2. I want to say there is a chart floating around showing over 30% improvement.

As far as frameworks go, I believe Angular is the best we have currently. It does a lot for you without getting too opinionated in general, and some of its tooling is just flat out better than much of what you can find in the wild.

I have been experimenting with Polymer lately though with an eye towards web components - there is a lot of change coming in how we will have to structure our code. I suspect that those using React will also not be shielded from the pain of integration with ES6 and web components as well, and so I have been hesitant to recommend it in a core product. Ember claims they will make the breaking changes slower, but I also suspect that it will limit its growth as well.

Frontend seems to be rolling on as fast as ever - I don't see much of a way around everyone having to scrap their code regardless of the major library chosen for their projects. I'm hoping the pain dies down once ES6 and web components becomes the norm though.

Re: 2 years with Angular

#110

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…

Actually the digest loop will iterate until either there's no changes or it hits a configured limit of cycles.
Post reply on HN