DEV Community

Discussion on: What is the difference between a Library vs A Framework?

Collapse
 
deciduously profile image
Ben Lovy

It's tough because it's a little bit nebulous. CSS Grid and Flexbox are actually neither - instead, they're APIs, or sets of functions that are available for developers to use. They are modules built right in to browsers, so they work more like a built-in feature of the CSS language than an external library.

Bootstrap is a little tricky. I'd call it a library, and the website describes itself as a component library, because you can pick and choose pieces from it to include in your app however you like. However, I believe Bootstrap use often ends up using some pretty strict patterns, in order to fully utilize what it offers, so it's used a lot more like a framework. React.js is another tool like this that kind of straddles the line. It's just a library, but in reality it to get the most of it you're better off sticking to the pattern they impose, so it's really a framework-y style of development.

Thread Thread
 
tacomanick profile image
Nick Shattuck

Thanks for the succinct response. I didn't think to consider them API's. I still have a lot to learn!

Thread Thread
 
deciduously profile image
Ben Lovy

I still have a lot to learn!

Don't we all :)