Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> (..) but the inherent verbose nature of JS frameworks ends up harming more than the structure helps

Does that statement actually mean anything? I don't see how it's anything but nonsense.

Also note that AngularJS (which is what's being discussed) is a library.




Actually, from the AngularJS FAQ:

"AngularJS fits the definition of a framework the best, even though it's much more lightweight than a typical framework and that's why many confuse it with a library."

https://docs.angularjs.org/misc/faq

[NB I was curious as I haven't used Angular and I thought it was a framework and I wanted to check to see if I'd got things completely wrong!]


They can call it a framework all they like, and obviously that word means different things to different people, but I've found AngularJS is more useful when described and treated as a library - a library for building a front-end framework.

AngularJS might exhibit some of the trappings of a framework (e.g. inversion of control), and it has some of the components a front-end framework would need: routing, templating, networking... but these components aren't tied together in a way that impresses an overall architecture. Calling Angular a framework leads developers to assume architectural decisions have been made when they haven't.


Hardly a library in the traditional sense. At best a libra-framework with tons of baggage added.

From their own project page: "AngularJS — Superheroic JavaScript MVW Framework" (empasis mine).

You have to code your logic inside its objects (controllers, directives, services, etc) -- that's not how a library works.


Also above the fold: "AngularJS is a toolset for building the framework most suited to your application development"...

Even internally they're insecure about it. I think library is a more useful definition because it encourages developers to think about architecture before they start building application specific stuff.


You have to be very careful if you don't let it manage all your DOM changes, and in general everything is done via it, so it is basically a framework.

AngularJS is much better than what we had before, but it is still not great, and a bit clunky .. hopefully the lessons will be learned and in the next cycle we'll get some nicer slimline things instead (though this cycle could take a few more years to run through).


In addition, the frameworks actually help you write less code, and certainly more organized and modular code.

The article comes off as whiny without really giving any argument for the viewpoint other than essentially "this pattern sucks because I say so"


So long as you never run into an edge case the framework was not designed to deal with. But oh, the framework itself makes it very hard for you to have a workaround. But that only happens... very often.

The difference between a framework and a library, IMO, is control.

You forfeit control to the framework in exchange for less code. But then you depend on it for your every feature.

Also, when the next big framework comes along that promises you even less code writing. It usually is non-trivial to make them work together, if at all. you just might end up with a legacy framework on your hands or face a complete rewrite.

Disclaimer, I work with legacy code written on top of JSF 1.2 and Richfaces 3. It probably seemed more organized and modular at the time. It's not.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: