Live data from Hacker News

Why you should not use AngularJs

medium.com

41–48 of 48 posts

Re: Why you should not use AngularJs

#41
post #37

Earlier quoted context omitted.

"Explicit" ties in to readability and from there, long-term support-, maintain-, and debug-ability. While OP did issue a blanket statement, this idea is fairly language/framework independent.

Yes, but it still isn't that clear cut. IMO and generally speaking, implicit is better when there is an obvious default behaviour that should be used in most cases. It may still be necessary to be able to override that default behaviour, but having to restate the obvious everywhere is not something that is good or desirable for the points you mention, since it will only make it harder to see what the differences are…

The problem is that the "obvious thing" relies on implicit knowledge of whoever is designing the API and might be nonobvious to someone else.

Re: Why you should not use AngularJs

#42
Interesting post, not sure I agree that the points raised mean AngularJs is a bad choice. Consider first objection - two way binding. Not only there are user-space solutions (bindonce), but now there is standard one-way binding in ng v1.3.

The Angular does nice job allowing simple interactive apps to be written in 30 minutes by anyone familiar with HTML and JavaScript. At the same time, if the app performs what is needed by the client, the app can be profiles, and each bottleneck can be optimized in a couple of steps.

For example, we went through this process and described the steps we used in http://bahmutov.calepin.co/improving-angular-web-app-perform...

Re: Why you should not use AngularJs

#43

> There is a fundamental rule in programming, it relates to absolutely any technology or language, this rule says that explicit is always better that implicit. Is this a fundamental rule? I thought it was something highly valued by python culture but not by, say, ruby on rails.

Yes it is. That's why explicit memory management is still the standard today and implicit memory management with garbage collectors will never lead to understandable or maintainable systems.

Re: Why you should not use AngularJs

#44

> There is a fundamental rule in programming, it relates to absolutely any technology or language, this rule says that explicit is always better that implicit. Is this a fundamental rule? I thought it was something highly valued by python culture but not by, say, ruby on rails.

Correct. It is actually opposed by ruby on rails, which is why when Rails apps get sufficiently large they become difficult to understand/maintain.

One example is overriding an association proxy to have other side effects. Sure it makes for a few very sort lines of code to cause whatever those effects are, but unless someone has read the implementation of the code that behavior becomes completely opaque.

Similarly, acts_as_foo plugins that add implicit behavior everywhere.

The core idea was clever at the time -- that one could do better domain modeling than a few sql statements in a file by using AR and callbacks, but after the app gets a bit complex the domain model classes typically become very tightly coupled and much logic has been flushed away into implicit behaviors to make the remaining code halfway readable.

I have yet to see a Rails app that can stick with the basic structure with over 20 models and still feel remotely well engineered.

Re: Why you should not use AngularJs

#45

> There is a fundamental rule in programming, it relates to absolutely any technology or language, this rule says that explicit is always better that implicit. Is this a fundamental rule? I thought it was something highly valued by python culture but not by, say, ruby on rails.

Yes it is. That's why explicit memory management is still the standard today and implicit memory management with garbage collectors will never lead to understandable or maintainable systems.

more realistically:

app.php

   

The includes are being used like sloppily defined function calls which do a muddled combination of rendering and state modification.

The same can be found in Rails in partials.

Also, in Rails, helpers are essentially crippled presenters that have access to lots of effectively global state and thus cannot be reused.

Re: Why you should not use AngularJs

#46

> There is a fundamental rule in programming, it relates to absolutely any technology or language, this rule says that explicit is always better that implicit. Is this a fundamental rule? I thought it was something highly valued by python culture but not by, say, ruby on rails.

Yes it is. That's why explicit memory management is still the standard today and implicit memory management with garbage collectors will never lead to understandable or maintainable systems.

And is that why each C++ iteration is adding more tools to finally implement C++ garbage collectors?

Re: Why you should not use AngularJs

#47
post #6

While I'd be the first to agree that Angular does a bunch of things I think are a bit crazy, articles like this don't really move the needle for me. The author doesn't like the design of Angular and feels it isn't efficient enough. OK, that's OK! However, there's not some massive conspiracy here - go ahead, use React/Ember. In my own experience, Angular is performant enough for most web applications, and the convenie…

No conspiracy, just a bad choice by Google to throw a bunch of money and promotion at a substandard framework.

Re: Why you should not use AngularJs

#48
Couldn't find any specific reason in this article to NOT use AngularJS!

One can always talk about any framework like this.

Good reasons to NOT use a framework might be: Lack of hope in future improvements, Inability to deliver the necessities, etc.

AngularJS delivers and there is a lot of hope around it and that's exactly the reason people use ReactJS too.

AngularJS is a very powerful framework and implements many of the common patterns in rich web applications. It has a learning curve which is normal, and poor documentation which is being improved day by day.

Adopting AngularJS will result in less coding in the near future which in turn will result in less bugs and support. Therefore making it worth the learning curve.

Post reply on HN