Library vs. Framework
It struck me that other day that there's a useful distinction between the term library and framework beyond simply things like the size and scope of functionality offered by a given collection of code.
Why would I describe React as a framework but b8rjs or xinjs as libraries, even though in most senses b8rjs and xinjs offer a lot more functionality than React and, at least before you start adding stuff, they're larger?
A framework is, effectively, a "platform abstraction layer". We're used to things like virtual machines that essentially run code in a software-defined environment that presents a consistent universe for software to operate in independent of the actual hardware. But frameworks attempt to do the same thing in a less cut-and-dried manner.
For example, it's very hard to work with React and Angular at the same time. React works great with b8rjs unless you use b8rjs components or data-bindings inside React components, whereupon React becomes "confused" by the changes b8rjs makes to the DOM. b8rjs, on the other hand, aside from privileging a small number of data-attributes, doesn't care what other things do to the DOM.
Similarly, React doesn't like you to handle events by yourself, and it doesn't pass you the actual events, but its own wrappers.
The basic idea of a library is that it lets you do things you couldn't otherwise do, or couldn't do nearly as easily, if you use the library. And that's it. It's perfectly OK for you to do the same thing using two different libraries or your own code. The library doesn't, or shouldn't care. Live and let live.
A framework wants and expects you to live within its bounds. Do anything else and, well good luck.
There's another downside to frameworks, which is that they require you to learn their way of doing things, often at the cost of understanding what's actually going on. They force you to learn about their little world instead of the wider world outside. Instead of learning how to write HTML, you learn to write JSX. Instead of learning how CSS works, you learn how some React CSS framework does CSS. The argument in favor of this should be that it makes you vastly more productive, but in practice it just means you learn things that are less generally applicable to reality.
And worse, you often can't access improvements and new features available in the outside world until they work within your framework.