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

Java

What is a library and what is a framework

I have been hearing so much about frameworks and libraries but I don't know what they are and all the explanations I see make no sense. Can someone help me understand?

1 Answer

Rick Gleitz
Rick Gleitz
47,876 Points

My basic understanding is that a framework is a structured setup that aids you in building an app or website or other production. A library is basically a collection of things you can use in your code so you don't have to "reinvent the wheel." Someone has already made code you can use, so you just import it or part of it into your code. The things libraries provide include: functions, attributes, modules, etc. Think of framework as the structure of a building (2x4s, bricks, joists, etc.). Think of libraries as things on the inside that give functionality to a home (faucets, toilets, furnace, furnishings, etc.). Hope this helps!