Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript The JavaScript Ecosystem JavaScript Frameworks, Libraries, and Developer Roles JavaScript Frameworks and Libraries

Framework and Library

Okay, this may sound as a silly question, but it was not very clear to me if framework and libraries are the same thing or if they are distinct things. For example, in the description of this video we read "Developers often use a JavaScript framework OR library to help increase efficiency and build projects faster." Again, in 0.20 Guil says: "So to help you make some of the low level decisions, increase efficiency, and build projects faster,developers often use a front-end JavaScript encrypted framework OR library.

But right after that we can hear him saying "Many frameworks AND libraries help you write clean modern JavaScript..." and later "React, Vue, and Angular are traditionally client side frameworks AND libraries"

Do they need to work together? Using one eliminates the user of the other one?

1 Answer

HIDAYATULLAH ARGHANDABI
HIDAYATULLAH ARGHANDABI
21,058 Points

A library is a reusable piece of code which you use as it comes i.e it does not provide any hooks for you to extend it. A library will usually focus on a single piece of functionality, which you access through an API.

A framework is a piece of code which dictates the architecture your project will follow. Once you choose a framework to work with, you have to follow the framework's code and design methodologies. A framework usually include a lot of libraries

Hope you have understand to make your work easier. Examples of (web) frameworks are: .net-ASP.net JavaScript- React, Angular, Vue

JavaScript libary-Jquery (Same as JavaScript only have some predefined methods make work done easy)